Skip to content
ChatJS
Esc
↑↓navigate↵open⌘Jpreview
On this page

Models

Configure discovery, defaults, capabilities, and model visibility

Your installed gateway supplies model discovery and inference. Core builds the model catalog, derives capabilities, and applies configured defaults. Install Model Preferences when users should manage their own picker settings.

Selecting models in the chat interface

Configuration

Set model defaults in chat.config.ts. This example assumes the Vercel gateway is installed:

ai: {
  gateway: "vercel",
  providerOrder: ["openai", "google", "anthropic", "xai"],
  disabledModels: ["morph/morph-v3-large"],
  curatedDefaults: ["openai/gpt-5-mini", "google/gemini-2.5-flash-lite"],
  workflows: {
    chat: "openai/gpt-5-mini",
    title: "openai/gpt-5-nano",
    pdf: "openai/gpt-5-mini",
    chatImageCompatible: "openai/gpt-4o-mini",
  },
},
Setting Purpose
ai.gateway Discriminator for the installed gateway
ai.providerOrder Provider order in the picker; unlisted providers follow
ai.disabledModels Models hidden from the application catalog
ai.curatedDefaults Models enabled by default
ai.workflows.chat Default conversation model
ai.workflows.title Title-generation model default
ai.workflows.pdf PDF-analysis model default
ai.workflows.chatImageCompatible Chat fallback for image input
ai.tools Options contributed by installed tools, plus follow-up suggestion settings

Changing ai.gateway alone does not install another provider. Use the gateway setup instructions, review your model IDs, and refresh the snapshot after switching providers.

Discovery and refresh

lib/ai/models.ts asks the active gateway for its catalog, transforms the result into application model data, and caches it for one hour. The cache key includes the gateway type. Provider-specific API handling belongs to the installed gateway.

The host supplies a generated fallback snapshot. For example, the Vercel adapter uses it when credentials are absent or discovery fails. Fallback behavior and available capabilities depend on the selected adapter.

Refresh the snapshot after configuring your gateway credentials:

bun run fetch:models

scripts/fetch-models.ts calls the active gateway and writes lib/ai/models.generated.ts. You do not need to implement a separate API fetcher to keep the catalog current.

Visibility and preferences

Core removes disabled models, then builds default enabled IDs from ai.curatedDefaults and newly discovered models that are not in the generated snapshot. When installed, Model Preferences applies saved user overrides and provides the settings interface. Picker visibility is not an authorization policy.

Guest Chat owns its fixed model and locked picker. Guests do not create multi-model comparisons.

Reasoning and parallel responses

Core derives model capabilities from catalog metadata. Models with reasoning support receive standard and reasoning variants. See Reasoning for behavior and configuration.

Parallel responses create independent runs from one or more selected models. That is conversation behavior, separate from catalog configuration and the optional Model Preferences plugin.

Tool and plugin model defaults

Installed tools contribute their own schemas and defaults under ai.tools. Model settings do not install a tool. Image generation, video generation, search, retrieval, code execution, and deep research do not have an enabled configuration field.

Capability Configuration guide
Image model selection and inline image output Image Generation
Video model selection Video Generation
Research and final-report models Deep Research
Text, code, and spreadsheet actions Documents & Canvas
Suggestion generation model and runtime enablement Follow-up Suggestions

See Configuration reference for the complete configuration shape and Prompts for instructions sent to models.

Last updated on Nov 8, 2026

Was this page helpful?