#Auto model select

1 messages · Page 1 of 1 (latest)

spiral elm
#

Anything i can configure for auto model selection?
So far,
I had GitHub copilot agents implement usage via GPT Plus and Anthropic Pro subscriptions.
I plan to have my main agent running via my GPT sub and give them access to Claude code via my subscription

upper oliveBOT
#

In OpenClaw, “auto model selection” is mostly deterministic failover, not “pick the best model for this prompt.”

What you can configure (today)

  1. Primary + fallback models (automatic on errors/rate limits/timeouts)

Example shape:

{
  agents: {
    defaults: {
#
      model: {
        primary: "openai/<your-default>",
        fallbacks: ["anthropic/<your-fallback>"],
      },
      // optional: separate routing for images
      imageModel: { primary: "openai/<image-capable>" },
    },
  },
}
  1. 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 via auth.order[...].
    Docs: https://docs.openclaw.ai/concepts/model-failover

  2. 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.

spiral elm
#

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

upper oliveBOT
#

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-token and then stored as an auth profile on the gateway. It doesn’t need to match a specific prefix like sk_* (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:

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:

  1. an older build expecting an Anthropic API key shape, or