Skip to main content

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 registry
  • app/(apps)/image-studio/lib/models.ts — Image Studio catalog
  • app/(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?
These answers affect the user experience just as much as the model name.
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 catalog
  • app/(apps)/image-studio/lib/models.ts — image generation catalog
  • app/(apps)/video-studio/lib/models.ts — video generation catalog
Start with the catalog that matches the app surface you are changing.

Common Mistakes

Watch out for these pitfalls when adding models:
  • Forgetting the provider key — you added the model name but didn’t set the API key
  • Wrong capability flags — exposing a text-only model in a vision flow
  • Assuming shared capabilities — just because one model from a provider supports browsing doesn’t mean they all do
  • Too many similar models — exposing 5 variations of the same model makes the UI harder to use, not better
When in doubt, start with fewer models and expand later. A clean model picker with 4-5 great options beats a cluttered dropdown with 15 confusing choices.