Skip to main content
ChatCLI supports a wide range of models from major AI providers. Switch models at any time with /switch --model <name>. Capabilities legend:
  • πŸ‘ Vision β€” accepts images as input
  • πŸ”§ Tools β€” native tool use (function calling)
  • πŸ“‹ JSON Mode β€” guaranteed structured JSON output
  • πŸ’» Code Exec β€” native code execution on the provider
All providers support streaming via SSE (Server-Sent Events). ChatCLI enables streaming automatically.
Models ideal for code generation and complex reasoning. Support both Chat Completions API and Responses API.
Model (ID)AliasesContextMax OutputCapabilities
gpt-5.4β€”200K tokens200K tokensπŸ”§ Tools
gpt-5.3-codexβ€”200K tokens200K tokensπŸ”§ Tools
gpt-5.2β€”100K tokens100K tokensπŸ”§ Tools
gpt-5gpt-5-mini, gpt-5-nano50K tokens50K tokensπŸ”§ Tools
gpt-4oβ€”50K tokens50K tokensπŸ‘ Vision, πŸ”§ Tools
gpt-4o-miniβ€”50K tokens50K tokensπŸ‘ Vision, πŸ”§ Tools
gpt-4gpt-4.1, gpt-4.1-mini, gpt-4.1-nano50K tokens50K tokensπŸ”§ Tools
ChatCLI uses the Chat Completions API by default. The Responses API can be configured via OPENAI_API_VERSION. Streaming is enabled for all models.

How model selection works

ChatCLI determines which model to use with the following priority (highest to lowest):
  1. --model flag on the command line: chatcli --model gpt-5.4
  2. /switch command during a session: /switch --model claude-sonnet-4-6
  3. MODEL environment variable: sets the default model
  4. LLM_PROVIDER environment variable: determines the provider (openai, anthropic, google, xai, etc.)
  5. Provider’s default model: each provider has a default model defined in the catalog
# Example: set provider and model via .env
LLM_PROVIDER=anthropic
MODEL=claude-sonnet-4-6

Model aliases

Each model has aliases for easier typing. ChatCLI automatically resolves aliases to the canonical model ID. For example:
Alias typedResolved model
claude-4-5-sonnetclaude-sonnet-4-5
sonnet-4-5claude-sonnet-4-5
opus-4-6claude-opus-4-6
opus-4-7claude-opus-4-7
opus-4-8claude-opus-4-8
sonnet-4-7claude-sonnet-4-7
gpt-5-minigpt-5 (mini variant)
gemini-3-progemini-3
Aliases are defined in the model catalog and accepted in all contexts: --model, /switch, and the MODEL variable.

Catalog system

Models are registered in the llm/catalog package with complete metadata. ChatCLI uses the catalog to automatically determine:
  • API version β€” which endpoint and protocol version to use for each model
  • Max tokens β€” context and output limits for managing prompts and responses
  • Capabilities β€” which features are available (vision, tools, JSON mode, etc.)
  • Provider-specific headers β€” for example, the anthropic-version header varies per model
This means that when switching models, ChatCLI automatically adjusts all request parameters without manual configuration.

Dynamic model listing

ChatCLI fetches available models directly from each provider’s API, using the configured token or API key. This ensures you see exactly which models your account has access to β€” including new models not yet in the static catalog.

How it works

  1. When ChatCLI starts or when you switch providers (via /switch, /auth login, etc.), a background request queries the active provider’s models endpoint
  2. Discovered models are cached for use in the /switch --model autocomplete
  3. Each suggestion indicates its origin: [API] (dynamic) or [catalog] (static)

Endpoints per provider

ProviderEndpointAuth
OpenAIGET /v1/modelsAPI Key or OAuth
AnthropicGET /v1/modelsAPI Key or OAuth
Google AIGET /v1beta/modelsAPI Key
xAIGET /v1/modelsAPI Key
GitHub CopilotGET /modelsOAuth (Device Flow)
OllamaGET /api/tagsNo auth (local)
ZAI (Zhipu AI)GET /modelsAPI Key
MiniMaxGET /modelsAPI Key
Moonshot (Kimi)GET /v1/modelsAPI Key (Bearer)
OpenRouterGET /api/v1/modelsAPI Key
StackSpotβ€”Not supported (model fixed per agent)

Smart autocomplete

When typing /switch --model and pressing Tab, ChatCLI suggests available models:
> /switch --model [Tab]
  gpt-4o           GPT-4o (Copilot) [API]
  claude-sonnet-4  Claude Sonnet 4 (Copilot) [API]
  o4-mini          o4-mini (Copilot) [API]
If the API is not reachable, it falls back to the static catalog:
> /switch --model [Tab]
  gpt-4o           GPT-4o (Copilot) [catalog]
  gpt-4o-mini      GPT-4o mini (Copilot) [catalog]
Pressing Enter with /switch --model (no value) lists all available models with source indication (API or catalog).

OAuth and dynamic listing

Dynamic listing works with both API key and OAuth:
  • Anthropic OAuth: uses ?beta=true and Chrome-like headers, with automatic gzip decompression
  • OpenAI OAuth: queries the ChatGPT backend (/backend-api/models) instead of the standard endpoint
  • GitHub Copilot OAuth: uses the Device Flow token to query api.githubcopilot.com/models
After an /auth login, the model cache is automatically refreshed to reflect the new provider.

Anthropic API versioning

Claude models may use different anthropic-version header values in API requests. The catalog manages this automatically:
  • Newer models (claude-opus-4-8, claude-opus-4-7, claude-sonnet-4-6) use the latest API version
  • Legacy models (claude-3-opus, claude-3-haiku) may use older versions for compatibility
  • ChatCLI sends the correct header for each model without any user intervention