#Auto model select
1 messages · Page 1 of 1 (latest)
In OpenClaw, “auto model selection” is mostly deterministic failover, not “pick the best model for this prompt.”
What you can configure (today)
- Primary + fallback models (automatic on errors/rate limits/timeouts)
- Set:
agents.defaults.model.primaryagents.defaults.model.fallbacks(ordered)
- When the primary fails (or all auth profiles for that provider fail), OpenClaw tries the next fallback.
Docs: https://docs.openclaw.ai/concepts/models • https://docs.openclaw.ai/concepts/model-failover
Example shape:
{
agents: {
defaults: {
model: {
primary: "openai/<your-default>",
fallbacks: ["anthropic/<your-fallback>"],
},
// optional: separate routing for images
imageModel: { primary: "openai/<image-capable>" },
},
},
}
-
Auth-profile rotation / ordering (within a provider)
If you have multiple credentials for the same provider, OpenClaw can rotate them; you can also force an order viaauth.order[...].
Docs: https://docs.openclaw.ai/concepts/model-failover -
Multi-agent routing = the “real” way to auto-route by task
If what you actually want is:
- “my main agent uses GPT-ish stuff for daily chat”
- “but coding work should go to Claude Code / Anthropic subscription”
…then the clean approach is two agents with different defaults, and route by channel / peer / mention patterns (bindings).
Docs: https://docs.openclaw.ai/concepts/multi-agent
About “GPT Plus” + “Anthropic Pro” subscriptions
OpenClaw doesn’t directly “use Plus/Pro” the way Copilot might. In practice, OpenClaw auth is via:
- API keys, or
- provider-supported OAuth / subscription token flows (e.g. Codex OAuth; Anthropic via setup-token from Claude Code CLI).
Relevant FAQ section: https://docs.openclaw.ai/help/faq (search for setup-token / Codex OAuth)
If you describe your desired routing rule (by channel? by “@coding”? by file/tool usage?), I can suggest the simplest binding setup.
The OAuth tokens for Anthropic were not working, it required a code starting in sk_** but Claude setup-token doesn’t generate them in that format. I had to get my copilot agents to make some changes. Here’s the fork https://github.com/InsightsLog/openclaw
Yeah — that tracks with how OpenClaw handles Anthropic now:
- Anthropic “OAuth tokens” aren’t the supported path anymore (the Claude Code OAuth tokens used to be a thing, but the docs now push setup-token or Anthropic API key).
- The setup-token is just a token string generated by
claude setup-tokenand then stored as an auth profile on the gateway. It doesn’t need to match a specific prefix likesk_*(if something hard-required that format, that’s almost certainly a version mismatch or an overly-strict validation check in code).
Docs to point at:
- Anthropic subscription auth via setup-token (FAQ): https://docs.openclaw.ai/help/faq (search “setup-token”)
- Models/auth + failover: https://docs.openclaw.ai/concepts/models and https://docs.openclaw.ai/concepts/model-failover
Practical next step to confirm what your gateway thinks is going on (redacts secrets):
openclaw --version
openclaw models status
If you paste the exact error you were getting before your fork + your openclaw --version, we can tell whether you were fighting:
- an older build expecting an Anthropic API key shape, or