agent/agent.ts, through your provider’s AI SDK package.
agent/agent.ts
Use another provider
Any provider with an AI SDK package works. The AI SDK’s provider list has each one’s package and the key it reads. For OpenAI:1
Add the provider's package
2
Change the import and the model
agent/agent.ts
3
Give the agent the key
.env.local for pnpm dev.4
Deploy
@openrouter/ai-sdk-provider, import openrouter from it, give the agent OPENROUTER_API_KEY, and use model IDs such as anthropic/claude-opus-5.5.