Skip to main content

The Main Idea

In most cases, adding a model is not about rewriting the whole app. It usually means:
  1. make sure the provider is supported
  2. add the provider key
  3. expose the model in the shared model registry
  4. decide where the model should appear in the UI

Main File To Check First

Start with:
  • lib/ai/models.ts
That is the shared model catalog used by the repo.

Questions To Answer Before Adding A Model

  • does it support text?
  • does it support vision?
  • does it support browsing?
  • does it support thinking/reasoning controls?
  • should it be free or credit-gated?
Those answers affect the user experience just as much as the model name.

Good Implementation Order

  1. add the provider key if needed
  2. expose the model metadata
  3. test it in chat first
  4. then expose it in other apps only if it fits those workflows

Common Mistakes

  • adding the model name but forgetting the provider key
  • exposing a model in a vision flow when it is text-only
  • assuming a model supports browsing because another model from the same provider does
  • exposing too many similar models and making the UI harder to use