04. Models and Effort
Switch models
Pick which Provider model this session uses so the assistant runs against the right tool for the next stretch of work. Matcha CLI does not host a model marketplace. It infers against the Provider you configured, lists the models that Provider exposes, and can reuse a local catalog cache when the live list is unreachable.
How the catalog is assembled
Matcha CLI talks to one current Provider at a time. The five built-in Provider ids are:
--provider id | Display name | Typical credential |
|---|---|---|
xai | xAI | XAI_API_KEY |
openai | OpenAI | OPENAI_API_KEY |
anthropic | Anthropic | ANTHROPIC_API_KEY |
openai_compatible | OpenAI-compatible | the key your gateway expects |
ollama | Ollama | usually none (local daemon) |
The catalog for the current Provider is assembled from custom [model.*] rows in ~/.matcha/config.toml, the Provider's remote model list when that request succeeds, and an origin-and-auth-matched on-disk cache when the remote list fails. Rows loaded from cache are marked (cached) in matcha models and in the picker. A corrupt cache is ignored; Matcha CLI does not retry a second fetch from it.
After the catalog is assembled for the current Provider, the default pick order is:
- CLI
-m/--model MATCHA_DEFAULT_MODEL(the olderGROK_DEFAULT_MODELname is read only when the Matcha name is unset)[models].defaultin~/.matcha/config.toml- First selectable catalog entry
Configure a Provider first
Store a key (or point at a local daemon) before you expect a catalog. Do not put secrets on the matcha command line.
matcha login --provider xai
matcha login --provider openai --from-env
printf 'KEY' | matcha login --provider anthropic
matcha login --provider openai_compatible
matcha login --provider ollamaSee Install, Credentials, and First Success for BYOK details. This article assumes a Provider is already selected.
List what the current Provider exposes
matcha modelsThe command prints an auth banner, the selected Provider as Display (id), the default model id, an optional Catalog source line, then each row as id — Name (Provider) with (cached) when the row came from disk. The current default is marked * … (default).
With no Provider selected the list is empty and the command points at matcha login --provider <id> or [model_providers].
Switch in the session
Slash command
Type / and run /model (alias /m). The name is required:
/model grok-4.5
/model Grok 4.5
/m gpt-4oMatcha CLI resolves a model id or display name, case-insensitively. Display names may contain spaces (Grok 4.5); the command prefers a full-string catalog match so a shorter name cannot steal the prefix.
Bare /model <name> switches this session and writes [models].default for later sessions. A toast confirms Default model: <display name>. Typing /model with no name prints Usage: /model <name> [effort] — it does not open the picker.
For a reasoning model you can add an effort level as a second argument. That form is session-scoped (it does not go through the default-model writer). See Reasoning effort.
/model Reasoning X highAutocomplete: after /model, the menu lists Name (Provider) and tags (cached) / (current). Reasoning models insert a trailing space so a second menu can offer that model's effort levels.
Picker from scrollback
Press Ctrl+M from the scrollback pane (not the prompt). The picker lists the same catalog as /model, including custom [model.*] rows. Insert text stays the model name, so /model grok-4.5 still works after you leave the picker.
Pin a default in config
[models]
default = "grok-4.5"Use an id the current Provider actually serves. A missing [models].default / -m / MATCHA_DEFAULT_MODEL value produces the missing-id hint above.
Headless and one-shot
matcha -p "Hello" -m grok-4.5
matcha --model gpt-4o
matcha agent -m claude-opus-4-6-m / --model wins over env and [models].default for that process.
Confirm the session
/session-info (aliases /status, /info) shows the auth method, the active model, turn count, and context usage.
What Matcha CLI does not do
- There is no MatchaCode-owned default catalog independent of Providers.
- There is no Matcha-hosted model marketplace, account-tier catalog, or remote campaign that silently replaces your default.
- Model ids are never renamed for branding.
- Image generation, video generation, and product web search are unavailable.
[models] web_searchandMATCHA_WEB_SEARCH_MODELdo not enable a MatchaCode search service.