Skip to main content
Your agent runs on the model named in agent/agent.ts, through your provider’s AI SDK package.
agent/agent.ts
Change the model ID to switch models.

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

Add the same key to .env.local for pnpm dev.
4

Deploy

OpenRouter reaches many vendors’ models with one key: add @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.
Last modified on November 13, 2026