#Keep getting this error

1 messages · Page 1 of 1 (latest)

queen valleyBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

kind peakBOT
#

That error means OpenClaw tried Anthropic, but every Anthropic auth profile you have is currently in cooldown (usually from rate_limit, sometimes timeout/billing/auth failures). With no usable Anthropic profile left, both configured Anthropic models fail → “All models failed”.

Do this:

  1. Check which profile(s) are cooling down + why
openclaw models status --json

Look for auth.unusableProfiles (it’ll include the reason + cooldown time).

  1. Wait out the cooldown (OpenClaw uses exponential backoff), or add another Anthropic profile so it can rotate:
  1. Add a non-Anthropic fallback so you’re not hard-down when Anthropic rate-limits
    Docs: https://docs.openclaw.ai/concepts/models + https://docs.openclaw.ai/help/faq (Model failover section)

  2. If this is happening “immediately”, paste the last ~30 lines around the failure from:

#
openclaw logs --follow

Also: what’s your openclaw --version? Cooldown behavior + failover got tweaks across versions.

kind peakBOT
#

That message isn’t a “crash” — it’s OpenClaw telling you it ran out of usable models:

  • Anthropic got an HTTP 429 / rate_limit, so OpenClaw put the Anthropic provider in cooldown (exponential backoff). When it says “all profiles unavailable” it means it tried every Anthropic auth profile you have and all are currently rate-limited/cooldown’d.
  • Then it tried your fallback (moonshot/kimi) and that also hit a rate limit.
  • With both models failing, you get: “Agent failed before reply: All models failed”.

What to do:

  1. Wait a bit and retry (cooldowns usually clear after the provider window resets).
  2. Confirm you actually have quota on both providers (Anthropic subscription/setup-token especially can hit tight limits; API keys can also be capped/billing-limited).
  3. Add either:
  • More auth profiles for the same provider (so profile rotation can keep working), and/or
  • A third fallback model/provider that has quota, so “All models failed (2)” becomes “(3)” and you still get replies when one provider is throttled.

Debug info that will make this 10Ă— faster (safe to paste; it redacts secrets):

kind peakBOT
#

You’re hitting two separate auth problems during failover:

  1. Anthropic: HTTP 401 … Invalid bearer token
    That means the Anthropic credential you have stored is just invalid (revoked/typo/wrong token type).

Fix (Anthropic):

  • If you’re using Claude subscription auth: generate a fresh setup-token:
claude setup-token

then on the gateway host paste/store it:

openclaw models auth paste-token --provider anthropic

(or run openclaw models auth setup-token --provider anthropic to be prompted)

  • If you’re using an API key instead: make sure ANTHROPIC_API_KEY is set on the gateway host (best: ~/.openclaw/.env if you run the gateway as a service), then restart the gateway.
#

Docs: https://docs.openclaw.ai/help/faq#how-does-anthropic-setuptoken-auth-work

  1. Google Gemini fallback: No API key found for provider "google"
    OpenClaw is trying Gemini because it’s in your fallbacks, but you haven’t configured Google auth for that agent.

Fix (Gemini):

  • Either set GEMINI_API_KEY (again: put it in ~/.openclaw/.env if running via launchd/systemd), or
  • Remove/avoid Google models in agents.defaults.model.fallbacks so failover doesn’t route to Gemini.

Docs: https://docs.openclaw.ai/concepts/model-providers (Google provider uses GEMINI_API_KEY)
FAQ section: https://docs.openclaw.ai/help/faq#model-failover-and-all-models-failed

  1. One extra gotcha: auth is per-agent
    Your error shows it’s looking in:
    /Users/yura/.openclaw/agents/main/agent/auth-profiles.json
    So make sure you’re configuring that same agent (common issue: you authenticated a different agent, so this one is empty/wrong).
violet carbon
#

try to set a fallback if rate limit hits, for example kimi

kind peakBOT
#

Yep — Kimi (Moonshot) is a good “rate-limit escape hatch” fallback because it’s a different provider than Anthropic.

Option A (CLI, easiest): add Kimi as a fallback + remove Gemini

openclaw models fallbacks list

openclaw models fallbacks remove google/gemini-2.5-flash
openclaw models fallbacks add moonshot/kimi-k2.5

openclaw models fallbacks list
openclaw gateway restart

Make sure Moonshot auth is actually usable

You already show MOONSHOT_API_KEY is present, but your probe timed out once. Test just Moonshot:

#
openclaw models status --probe-provider moonshot

If that still times out, it’s usually network/DNS/firewall on the gateway host (or the provider endpoint is having a moment).

Important: fix the broken Anthropic profile too

Your probe shows anthropic:manual is 401 invalid, so Anthropic can fail even before fallback kicks in. Lock Anthropic to the good profile:

openclaw models auth order set --provider anthropic anthropic:default
openclaw gateway restart

Docs (failover + fallbacks): https://docs.openclaw.ai/help/faq#model-failover-and-all-models-failed

#

That models status --probe output is super useful — it basically explains the failure:

1) Anthropic is fine… except your anthropic:manual profile is broken

  • anthropic:default (oauth) → ok
  • anthropic:manual (token) → HTTP 401 Invalid bearer token

So whenever OpenClaw rotates/tries anthropic:manual, the run can fail (and it can also contribute to “provider in cooldown / all profiles unavailable” if it keeps retrying a bad profile).

Fix options (pick one):

A) Stop trying the bad profile (recommended):

openclaw models auth order set --provider anthropic anthropic:default

(Optional: check current ordering first)

#
openclaw models auth order get --provider anthropic

B) Replace/fix anthropic:manual with a real token/key:

openclaw models auth paste-token --provider anthropic --profile-id anthropic:manual

Then paste a fresh Anthropic API key or a fresh claude setup-token.


2) Your fallback includes Gemini, but Google auth is missing

You have:

  • Fallbacks: ... , google/gemini-2.5-flash
  • Missing auth: google (GEMINI_API_KEY not set)