Models: defaults, selection, aliases, switching
What is the "default model"?
What is the "default model"?
provider/model (example: openai/gpt-5.4 or openai-codex/gpt-5.5). If you omit the provider, OpenClaw first tries an alias, then a unique configured-provider match for that exact model id, and only then falls back to the configured default provider as a deprecated compatibility path. If that provider no longer exposes the configured default model, OpenClaw falls back to the first configured provider/model instead of surfacing a stale removed-provider default. You should still explicitly set provider/model.What model do you recommend?
What model do you recommend?
How do I switch models without wiping my config?
How do I switch models without wiping my config?
/modelin chat (quick, per-session)openclaw models set ...(updates just model config)openclaw configure --section model(interactive)- edit
agents.defaults.modelin~/.openclaw/openclaw.json
config.apply with a partial object unless you intend to replace the whole config.
For RPC edits, inspect with config.schema.lookup first and prefer config.patch. The lookup payload gives you the normalized path, shallow schema docs/constraints, and immediate child summaries.
for partial updates.
If you did overwrite config, restore from backup or re-run openclaw doctor to repair.Docs: Models, Configure, Config, Doctor.Can I use self-hosted models (llama.cpp, vLLM, Ollama)?
Can I use self-hosted models (llama.cpp, vLLM, Ollama)?
- Install Ollama from
https://ollama.com/download - Pull a local model such as
ollama pull gemma4 - If you want cloud models too, run
ollama signin - Run
openclaw onboardand chooseOllama - Pick
LocalorCloud + Local
Cloud + Localgives you cloud models plus your local Ollama models- cloud models such as
kimi-k2.5:clouddo not need a local pull - for manual switching, use
openclaw models listandopenclaw models set ollama/<model>
What do OpenClaw, Flawd, and Krill use for models?
What do OpenClaw, Flawd, and Krill use for models?
- These deployments can differ and may change over time; there is no fixed provider recommendation.
- Check the current runtime setting on each gateway with
openclaw models status. - For security-sensitive/tool-enabled agents, use the strongest latest-generation model available.
How do I switch models on the fly (without restarting)?
How do I switch models on the fly (without restarting)?
/model command as a standalone message:agents.defaults.models.You can list available models with /model, /model list, or /model status./model (and /model list) shows a compact, numbered picker. Select by number:/model status shows which agent is active, which auth-profiles.json file is being used, and which auth profile will be tried next.
It also shows the configured provider endpoint (baseUrl) and API mode (api) when available.How do I unpin a profile I set with @profile?Re-run /model without the @profile suffix:/model (or send /model <default provider/model>).
Use /model status to confirm which auth profile is active.Can I use GPT 5.5 for daily tasks and Codex 5.5 for coding?
Can I use GPT 5.5 for daily tasks and Codex 5.5 for coding?
- Quick switch (per session):
/model openai/gpt-5.4for current direct OpenAI API-key tasks or/model openai-codex/gpt-5.5for GPT-5.5 Codex OAuth tasks. - Default: set
agents.defaults.model.primarytoopenai/gpt-5.4for API-key usage oropenai-codex/gpt-5.5for GPT-5.5 Codex OAuth usage. - Sub-agents: route coding tasks to sub-agents with a different default model.
openai/gpt-5.5 is supported once OpenAI enables
GPT-5.5 on the public API. Until then GPT-5.5 is subscription/OAuth-only.See Models and Slash commands.How do I configure fast mode for GPT 5.5?
How do I configure fast mode for GPT 5.5?
- Per session: send
/fast onwhile the session is usingopenai/gpt-5.4oropenai-codex/gpt-5.5. - Per model default: set
agents.defaults.models["openai/gpt-5.4"].params.fastModeoragents.defaults.models["openai-codex/gpt-5.5"].params.fastModetotrue.
service_tier = "priority" on supported native Responses requests. Session /fast overrides beat config defaults.See Thinking and fast mode and OpenAI fast mode.Why do I see "Model ... is not allowed" and then no reply?
Why do I see "Model ... is not allowed" and then no reply?
agents.defaults.models is set, it becomes the allowlist for /model and any
session overrides. Choosing a model that isn’t in that list returns:agents.defaults.models, remove the allowlist, or pick a model from /model list.Why do I see "Unknown model: minimax/MiniMax-M2.7"?
Why do I see "Unknown model: minimax/MiniMax-M2.7"?
-
Upgrade to a current OpenClaw release (or run from source
main), then restart the gateway. -
Make sure MiniMax is configured (wizard or JSON), or that MiniMax auth
exists in env/auth profiles so the matching provider can be injected
(
MINIMAX_API_KEYforminimax,MINIMAX_OAUTH_TOKENor stored MiniMax OAuth forminimax-portal). -
Use the exact model id (case-sensitive) for your auth path:
minimax/MiniMax-M2.7orminimax/MiniMax-M2.7-highspeedfor API-key setup, orminimax-portal/MiniMax-M2.7/minimax-portal/MiniMax-M2.7-highspeedfor OAuth setup. -
Run:
and pick from the list (or
/model listin chat).
Can I use MiniMax as my default and OpenAI for complex tasks?
Can I use MiniMax as my default and OpenAI for complex tasks?
/model or a separate agent.Option A: switch per session- Agent A default: MiniMax
- Agent B default: OpenAI
- Route by agent or use
/agentto switch
Are opus / sonnet / gpt built-in shortcuts?
Are opus / sonnet / gpt built-in shortcuts?
agents.defaults.models):opus→anthropic/claude-opus-4-6sonnet→anthropic/claude-sonnet-4-6gpt→openai/gpt-5.4for API-key setups, oropenai-codex/gpt-5.5when configured for Codex OAuthgpt-mini→openai/gpt-5.4-minigpt-nano→openai/gpt-5.4-nanogemini→google/gemini-3.1-pro-previewgemini-flash→google/gemini-3-flash-previewgemini-flash-lite→google/gemini-3.1-flash-lite-preview
How do I define/override model shortcuts (aliases)?
How do I define/override model shortcuts (aliases)?
agents.defaults.models.<modelId>.alias. Example:/model sonnet (or /<alias> when supported) resolves to that model ID.How do I add models from other providers like OpenRouter or Z.AI?
How do I add models from other providers like OpenRouter or Z.AI?
No API key found for provider "zai").No API key found for provider after adding a new agentThis usually means the new agent has an empty auth store. Auth is per-agent and
stored in:- Run
openclaw agents add <id>and configure auth during the wizard. - Or copy
auth-profiles.jsonfrom the main agent’sagentDirinto the new agent’sagentDir.
agentDir across agents; it causes auth/session collisions.Model failover and “All models failed”
How does failover work?
How does failover work?
- Auth profile rotation within the same provider.
- Model fallback to the next model in
agents.defaults.model.fallbacks.
429 responses. OpenClaw
also treats messages like Too many concurrent requests,
ThrottlingException, concurrency limit reached,
workers_ai ... quota limit exceeded, resource exhausted, and periodic
usage-window limits (weekly/monthly limit reached) as failover-worthy
rate limits.Some billing-looking responses are not 402, and some HTTP 402
responses also stay in that transient bucket. If a provider returns
explicit billing text on 401 or 403, OpenClaw can still keep that in
the billing lane, but provider-specific text matchers stay scoped to the
provider that owns them (for example OpenRouter Key limit exceeded). If a 402
message instead looks like a retryable usage-window or
organization/workspace spend limit (daily limit reached, resets tomorrow,
organization spending limit exceeded), OpenClaw treats it as
rate_limit, not a long billing disable.Context-overflow errors are different: signatures such as
request_too_large, input exceeds the maximum number of tokens,
input token count exceeds the maximum number of input tokens,
input is too long for the model, or ollama error: context length exceeded stay on the compaction/retry path instead of advancing model
fallback.Generic server-error text is intentionally narrower than “anything with
unknown/error in it”. OpenClaw does treat provider-scoped transient shapes
such as Anthropic bare An unknown error occurred, OpenRouter bare
Provider returned error, stop-reason errors like Unhandled stop reason: error, JSON api_error payloads with transient server text
(internal server error, unknown error, 520, upstream error, backend error), and provider-busy errors such as ModelNotReadyException as
failover-worthy timeout/overloaded signals when the provider context
matches.
Generic internal fallback text like LLM request failed with an unknown error. stays conservative and does not trigger model fallback by itself.What does "No credentials found for profile anthropic:default" mean?
What does "No credentials found for profile anthropic:default" mean?
anthropic:default, but could not find credentials for it in the expected auth store.Fix checklist:- Confirm where auth profiles live (new vs legacy paths)
- Current:
~/.openclaw/agents/<agentId>/agent/auth-profiles.json - Legacy:
~/.openclaw/agent/*(migrated byopenclaw doctor)
- Current:
- Confirm your env var is loaded by the Gateway
- If you set
ANTHROPIC_API_KEYin your shell but run the Gateway via systemd/launchd, it may not inherit it. Put it in~/.openclaw/.envor enableenv.shellEnv.
- If you set
- Make sure you’re editing the correct agent
- Multi-agent setups mean there can be multiple
auth-profiles.jsonfiles.
- Multi-agent setups mean there can be multiple
- Sanity-check model/auth status
- Use
openclaw models statusto see configured models and whether providers are authenticated.
- Use
-
Use Claude CLI
- Run
openclaw models auth login --provider anthropic --method cli --set-defaulton the gateway host.
- Run
-
If you want to use an API key instead
-
Put
ANTHROPIC_API_KEYin~/.openclaw/.envon the gateway host. -
Clear any pinned order that forces a missing profile:
-
Put
-
Confirm you’re running commands on the gateway host
- In remote mode, auth profiles live on the gateway machine, not your laptop.
Why did it also try Google Gemini and fail?
Why did it also try Google Gemini and fail?
No API key found for provider "google".Fix: either provide Google auth, or remove/avoid Google models in agents.defaults.model.fallbacks / aliases so fallback doesn’t route there.LLM request rejected: thinking signature required (Google Antigravity)Cause: the session history contains thinking blocks without signatures (often from
an aborted/partial stream). Google Antigravity requires signatures for thinking blocks.Fix: OpenClaw now strips unsigned thinking blocks for Google Antigravity Claude. If it still appears, start a new session or set /thinking off for that agent.Auth profiles: what they are and how to manage them
Related: /concepts/oauth (OAuth flows, token storage, multi-account patterns)What is an auth profile?
What is an auth profile?
What are typical profile IDs?
What are typical profile IDs?
anthropic:default(common when no email identity exists)anthropic:<email>for OAuth identities- custom IDs you choose (e.g.
anthropic:work)
Can I control which auth profile is tried first?
Can I control which auth profile is tried first?
auth.order.<provider>). This does not store secrets; it maps IDs to provider/mode and sets rotation order.OpenClaw may temporarily skip a profile if it’s in a short cooldown (rate limits/timeouts/auth failures) or a longer disabled state (billing/insufficient credits). To inspect this, run openclaw models status --json and check auth.unusableProfiles. Tuning: auth.cooldowns.billingBackoffHours*.Rate-limit cooldowns can be model-scoped. A profile that is cooling down
for one model can still be usable for a sibling model on the same provider,
while billing/disabled windows still block the whole profile.You can also set a per-agent order override (stored in that agent’s auth-state.json) via the CLI:excluded_by_auth_order for that profile instead of trying it silently.OAuth vs API key - what is the difference?
OAuth vs API key - what is the difference?
- OAuth often leverages subscription access (where applicable).
- API keys use pay-per-token billing.
Related
- FAQ — the main FAQ
- FAQ — quick start and first-run setup
- Model selection
- Model failover