Add a New AI Model
Adding a model is usually quick. You’re not rewriting the whole app — you’re plugging into an existing system.The Process
1
Check provider support
Make sure the provider is already supported in the repo (OpenAI, Anthropic, Google, Groq, xAI, DeepSeek, Replicate). If it’s a new provider, you’ll need to add it first.
2
Add the provider API key
Set the provider’s API key in your
.env.local file if you haven’t already.3
Choose the right registry
Not every model lives in the same file:
lib/ai/models.ts— shared chat/text model registryapp/(apps)/image-studio/lib/models.ts— Image Studio catalogapp/(apps)/video-studio/lib/models.ts— Video Studio catalog
4
Answer these questions about your model
Before you expose it in the UI, think through:
- Does it support text?
- Does it support vision (image input)?
- Does it support browsing/web search?
- Does it support thinking/reasoning controls?
- Should it be free or credit-gated?
5
Test in Chat first
The Chat app is the best place to verify a new model works. Test streaming, tool usage, and any special capabilities.
6
Expose in other apps (if it fits)
Only add the model to other apps (Image Studio, Vision, etc.) if it actually fits those workflows. Not every model belongs everywhere.
The Main Files
lib/ai/models.ts— shared chat/text model catalogapp/(apps)/image-studio/lib/models.ts— image generation catalogapp/(apps)/video-studio/lib/models.ts— video generation catalog

