Troubleshoot OpenClaw Model Failover and Auth Errors
We have all been there: you are running a complex task and suddenly everything stops because an API provider hit a rate limit or had a brief outage. It is frustrating to have your workflow interrupted by something outside your control. You want your system to stay up and keep working without manual intervention.
OpenClaw handles these hiccups through a failover system, but sometimes the configuration needs a little attention to work correctly.
How does failover work?
Section titled “How does failover work?”Failover happens in two stages:
- Auth profile rotation within the same provider
- Model fallback to the next model in
agents.defaults.model.fallbacks
Cooldowns apply to failing profiles using exponential backoff. This ensures OpenClaw can keep responding even when a provider is rate-limited or temporarily failing.
What does “No credentials found for profile ‘anthropic:default’” mean?
Section titled “What does “No credentials found for profile ‘anthropic:default’” mean?”It means the system attempted to use the auth profile ID anthropic:default, but could not find credentials for it in the expected auth store.
Fix checklist for “No credentials found for profile anthropic:default”
Section titled “Fix checklist for “No credentials found for profile anthropic:default””-
Confirm where auth profiles live:
- 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
Terminal window openclaw models status
Fix checklist for “No credentials found for profile anthropic”
Section titled “Fix checklist for “No credentials found for profile anthropic””This means the run is pinned to an Anthropic auth profile, but the Gateway can’t find it.
Use a setup-token:
claude setup-tokenopenclaw models auth setup-token --provider anthropicIf you want to use an API key instead:
- Put
ANTHROPIC_API_KEYin~/.openclaw/.envon the gateway host - Clear any pinned order:
Terminal window openclaw models auth order clear --provider anthropic
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?
Section titled “Why did it also try Google Gemini and fail?”If your model config includes Google Gemini as a fallback (or you switched to a Gemini shorthand), OpenClaw will try it during model fallback. If you haven’t configured Google credentials, you’ll see No API key found for provider "google".
Fix: either provide Google auth, or remove/avoid Google models in agents.defaults.model.fallbacks.
If you are still having trouble getting your keys recognized, check out the AI Setup Assistant.
Next steps
Section titled “Next steps”OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.