How does N8N use private large models? [Help]

The idea is:

I want to connect my private LLM to the AI agent node, but currently this is not supported. My private LLM authorization method is Bearer. I hope to support private LLM in the list of LLM.

My use case:

I have set up my own private LLM on the local network. I hope our private LLM can connect to the chat model endpoint of the AI agent. Currently, I can only choose an external LLM from the LLM list or an LLM adapted for Ollama.

I think it would be beneficial to add this because:

Due to concerns over information security, we prefer to use private LLMs.

Any resources to support this?

Are you willing to work on this?

Yes, I hope to solve this problem.

As you mentioned already, if the LLM is running in Ollama, you can use the built in functionality.
And if you LLM does support the OpenAI API, you can use the OpenAI Chat Model node and change the base url when setting up the credentials.