#AI Agent Component with openrouter

3 messages · Page 1 of 1 (latest)

bright vapor
#

How do I use the agent component with openrouter? And does it need any api keys?

cloud templeBOT
#

Hi @bright vapor. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I'm sorry, but the knowledge sources do not contain explicit information about using the Convex AI Agent component with OpenRouter. The available documentation and examples focus on using the Agent component with OpenAI models via the @ai-sdk/openai package, and do not mention OpenRouter or its integration steps.

Regarding API keys, the documentation shows that when using OpenAI, you need to provide an API key (e.g., via environment variables like CONVEX_OPENAI_API_KEY) for authentication with the OpenAI API. If OpenRouter requires an API key, you would likely need to provide it in a similar way, but there are no details in the knowledge sources about this process for OpenRouter specifically.

If you need to use a provider other than OpenAI, you may need to consult the documentation for that provider or look for updates in the Convex or Agent component documentation in the future. For now, only OpenAI integration is documented and supported in the provided sources AI Agent Component Building AI Agents with Convex.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: