Skip to main content
ChatJS provides access to hundreds of models from multiple providers through a pluggable gateway system. Set models.gateway in chat.config.ts to choose your backend, then configure which models are available and how they behave.
Switching between AI models in the model selector
See Gateways for setup instructions and the full gateway comparison.

Model Configuration

All model settings live in chat.config.ts under the models key:
chat.config.ts
models: {
  providerOrder: ["openai", "google", "anthropic", "xai"],
  disabledModels: ["morph/morph-v3-large", "morph/morph-v3-fast"],
  curatedDefaults: [
    "openai/gpt-5-nano",
    "openai/gpt-5-mini",
    "google/gemini-2.5-flash-lite",
    "anthropic/claude-sonnet-4.5",
    // ...
  ],
  anonymousModels: [
    "google/gemini-2.5-flash-lite",
    "openai/gpt-5-mini",
    // ...
  ],
  defaults: {
    chat: "openai/gpt-5-nano",
    title: "google/gemini-2.5-flash-lite",
    pdf: "openai/gpt-5-mini",
    artifact: "openai/gpt-5-nano",
    // ...
  },
},
SettingDescription
providerOrderProvider sort order in model selector
disabledModelsModels hidden from all users
curatedDefaultsModels enabled by default for new users
anonymousModelsModels available to anonymous users
defaults.*Default model for each task type
Image generation uses a separate defaults.image setting. Language models with the image-generation tag can also generate images inline. See Image Generation for details.

Reasoning Variants

Models that support extended thinking are automatically split into two variants:
  • {model-id} (standard mode)
  • {model-id}-reasoning (extended thinking enabled)
This happens automatically in buildAppModels() for any model with reasoning: true.

Visibility Pipeline

Model visibility is determined through a pipeline:

Authenticated Users

  1. Remove disabled models (models.disabledModels)
  2. Apply defaults (models.curatedDefaults + any new API models not in models.generated.ts)
  3. Apply user overrides from saved preferences

Anonymous Users

  1. Remove disabled models
  2. Filter to models.anonymousModels only

User Settings

Users configure their model preferences at /settings/models. This page lets users toggle individual models on or off. A link to AI Registry provides detailed model information.