Models CLI
See /concepts/model-failover for auth profile rotation, cooldowns, and how that interacts with fallbacks. Quick provider overview + examples: /concepts/model-providers.How model selection works
Clawdia selects models in this order:- Primary model (
agents.defaults.model.primaryoragents.defaults.model). - Fallbacks in
agents.defaults.model.fallbacks(in order). - Provider auth failover happens inside a provider before moving to the next model.
agents.defaults.modelsis the allowlist/catalog of models Clawdia can use (plus aliases).agents.defaults.imageModelis used only when the primary model can’t accept images.- Per-agent defaults can override
agents.defaults.modelviaagents.list[].modelplus bindings (see /concepts/multi-agent).
Quick model picks (anecdotal)
- GLM: a bit better for coding/tool calling.
- MiniMax: better for writing and vibes.
Setup wizard (recommended)
If you don’t want to hand-edit config, run the onboarding wizard:claude setup-token also supported).
Config keys (overview)
agents.defaults.model.primaryandagents.defaults.model.fallbacksagents.defaults.imageModel.primaryandagents.defaults.imageModel.fallbacksagents.defaults.models(allowlist + aliases + provider params)models.providers(custom providers written intomodels.json)
z.ai/* normalize
to zai/*.
Provider configuration examples (including OpenCode Zen) live in
/gateway/configuration.
“Model is not allowed” (and why replies stop)
Ifagents.defaults.models is set, it becomes the allowlist for /model and for
session overrides. When a user selects a model that isn’t in that allowlist,
Clawdia returns:
- Add the model to
agents.defaults.models, or - Clear the allowlist (remove
agents.defaults.models), or - Pick a model from
/model list.
Switching models in chat (/model)
You can switch models for the current session without restarting:
/model(and/model list) is a compact, numbered picker (model family + available providers)./model <#>selects from that picker./model statusis the detailed view (auth candidates and, when configured, provider endpointbaseUrl+apimode).- Model refs are parsed by splitting on the first
/. Useprovider/modelwhen typing/model <ref>. - If the model ID itself contains
/(OpenRouter-style), you must include the provider prefix (example:/model openrouter/moonshotai/kimi-k2). - If you omit the provider, Clawdia treats the input as an alias or a model for the default provider (only works when there is no
/in the model ID).
CLI commands
clawdia models (no subcommand) is a shortcut for models status.
models list
Shows configured models by default. Useful flags:
--all: full catalog--local: local providers only--provider <name>: filter by provider--plain: one model per line--json: machine‑readable output
models status
Shows the resolved primary model, fallbacks, image model, and an auth overview
of configured providers. It also surfaces OAuth expiry status for profiles found
in the auth store (warns within 24h by default). --plain prints only the
resolved primary model.
OAuth status is always shown (and included in --json output). If a configured
provider has no credentials, models status prints a Missing auth section.
JSON includes auth.oauth (warn window + profiles) and auth.providers
(effective auth per provider).
Use --check for automation (exit 1 when missing/expired, 2 when expiring).
Preferred Anthropic auth is the Claude Code CLI setup-token (run anywhere; paste on the gateway host if needed):
Scanning (OpenRouter free models)
clawdia models scan inspects OpenRouter’s free model catalog and can
optionally probe models for tool and image support.
Key flags:
--no-probe: skip live probes (metadata only)--min-params <b>: minimum parameter size (billions)--max-age-days <days>: skip older models--provider <name>: provider prefix filter--max-candidates <n>: fallback list size--set-default: setagents.defaults.model.primaryto the first selection--set-image: setagents.defaults.imageModel.primaryto the first image selection
OPENROUTER_API_KEY). Without a key, use --no-probe to list candidates only.
Scan results are ranked by:
- Image support
- Tool latency
- Context size
- Parameter count
- OpenRouter
/modelslist (filter:free) - Requires OpenRouter API key from auth profiles or
OPENROUTER_API_KEY(see /environment) - Optional filters:
--max-age-days,--min-params,--provider,--max-candidates - Probe controls:
--timeout,--concurrency
--yes to accept defaults.
Models registry (models.json)
Custom providers in models.providers are written into models.json under the
agent directory (default ~/.clawdia/agents/<agentId>/models.json). This file
is merged by default unless models.mode is set to replace.