can I use openrouter with agent?
# ask-ai
r
can I use openrouter with agent?
t
Thanks for reaching out, Goku. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! Just to make sure I’m on the same page, could you tell me a bit more about what you mean by using OpenRouter with an agent? Are you thinking about connecting OpenRouter with LiveKit’s features, or is there a particular use case you have in mind?
r
I want to use a model from openrouter as the LLM node
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
You can use openrouter with agents. They have an OpenAI compatible API so you can use the openai plugin. example:
Copy code
llm=openai.LLM(model="<model name>", api_key=<openrouter_api_key>, base_url="<https://openrouter.ai/api/v1>"),
🙌 1
we're adding an official plugin (from contributors): see this PR
🚀 1
r
Thanks Mike. Appreciate the link