跳到正文
OpenRouter Blog·· 19 小时前精选AI 评分65

Claude 529 Overloaded 是什么以及如何修复

Claude 529 Overloaded: What It Means and How to Fix It

AI 导读

OpenRouter 发文解释 Claude 的 529 overloaded_error 表示 Anthropic API 对该模型的容量不足,与用户的密钥、套餐和请求无关,而 429 才是用户自身用量触发的限流。

推荐理由

原文区分了 529 与 429 的成因,并给出重试、多供应商路由和模型回退三层可复用方案。

正文 · 原文

A 529 overloaded_error from Claude means Anthropic’s API is temporarily out of capacity for the model you asked for. Your key, plan and request are fine, and the same request usually goes through a few seconds later. To keep an app working through it, retry with backoff first, then send the request to another provider that serves the same Claude model.

Most people hit this error in Claude Code, where a session stops with API Error: Repeated 529 Overloaded errors. We simulated the overload in the retry example with a local stand-in for the API, because a real one can’t be triggered on demand. Every OpenRouter request in the guide is real.

Tl;dr

  • A 529 overloaded_error means Anthropic’s API is out of capacity for that model across all users. A 429 is the error that comes from your own usage.
  • Retry with exponential backoff and some randomness first. Anthropic’s SDKs and Claude Code already do this.
  • When the overload lasts, send the same model to another provider. On OpenRouter, Claude Sonnet, Opus and Haiku 5.5 are each served by five providers, and default routing fails over for you.
  • For the rare case when every provider is busy, list a fallback model with models.
  • In Claude Code, run ori claude to start a session on OpenRouter and get the same failover.

What does 529 overloaded mean?

Anthropic’s API returns a 529 when it has more traffic for a model than it can serve. The response body looks like this:

{"type": "error", "error": {"type": "overloaded_error", "message": "Overloaded"}}

The error isn’t about you. Anthropic’s error reference says it happens when the API has high traffic across all users, so anyone calling that model at that moment can get it, whatever plan they’re on. One Max-plan user reported Claude Code retrying for more than eight minutes before it gave up.

The error that does come from your side is a 429 rate_limit_error. It means your organization has hit its own rate limit or spend cap, and you fix it by slowing down or raising the limit. A 529 isn’t your usage limit, and Claude Code’s error reference says it doesn’t count against your quota. It clears when Anthropic has capacity again, so you either wait it out or send the request somewhere that has capacity now. The next three steps do both.

Step 1: Retry with exponential backoff

Most 529s clear within seconds, so start by retrying. Wait a little longer after each attempt and add some randomness, so that many clients don’t all retry at the same moment. We pointed this loop at a small local server that returns a real-shaped 529 for the first three requests and then succeeds:

import random
import time
import requests

# The local stand-in. In production, use https://api.anthropic.com/v1/messages
URL = "http://127.0.0.1:8529/v1/messages"

def call_with_backoff(body, attempts=5):
    for attempt in range(attempts):
        r = requests.post(URL, json=body, timeout=60)
        if r.status_code != 529:
            return r
        if attempt == attempts - 1:
            r.raise_for_status()  # out of attempts: fail now instead of sleeping again
        wait = min(2 ** attempt, 30) + random.uniform(0, 1)
        print(f"attempt {attempt + 1}: 529 {r.json()['error']['type']}, retrying in {wait:.1f}s")
        time.sleep(wait)

r = call_with_backoff({
    "model": "claude-sonnet-5-5",
    "max_tokens": 64,
    "messages": [{"role": "user", "content": "hi"}],
})
print(r.status_code, r.json()["content"][0]["text"])
attempt 1: 529 overloaded_error, retrying in 1.9s
attempt 2: 529 overloaded_error, retrying in 2.3s
attempt 3: 529 overloaded_error, retrying in 4.0s
200 Hello! How can I help you today?

The fourth attempt succeeded, about eight seconds after the first. If you use Anthropic’s official SDKs, you already have this. They retry 5xx errors with exponential backoff, twice by default, and you can raise that with max_retries.

Retries cover short spikes. They don’t help when a model stays overloaded for minutes, and every wait adds latency your users feel. For that, you need a second place to send the request.

Step 2: Send the same model to another provider

Anthropic’s API isn’t the only place Claude runs. On OpenRouter, Claude Sonnet 5.5 is served by five providers, and so are Opus 5.5 and Haiku 5.5. Here’s what our endpoints API returned for Sonnet 5.5 on October 21, 2026:

ProviderSlugInput price per million tokens
Anthropicanthropic$2.00
Amazon Bedrockamazon-bedrock$2.00
Google Vertex AIgoogle-vertex$2.00 (global), $2.20 (US or Europe)
Azureazure$2.00 (global), $2.20 (US)
Claude Platform on AWSclaude-on-aws$2.00

Sending a request to a global endpoint instead of Anthropic doesn’t change what you pay for it. Latency and uptime can still differ between providers, and how to evaluate LLM provider performance shows how to compare them.

You don’t need to configure anything to use them. When you call anthropic/claude-sonnet-5.5, our default routing spreads requests across the providers serving it, deprioritizes any provider that’s had significant outages in the last 30 seconds and retries a failed request at the next provider.

If you want to choose which provider goes first, set order:

import os

import requests

body = {
    "model": "anthropic/claude-sonnet-5.5",
    "provider": {
        "order": ["anthropic", "amazon-bedrock", "google-vertex"],
        "allow_fallbacks": True,
    },
    "messages": [{"role": "user", "content": "Reply with the word ok."}],
    "max_tokens": 16,
}

r = requests.post(
    "https://openrouter.ai/api/v1/chat/completions",
    json=body,
    timeout=120,
    headers={"Authorization": f"Bearer {os.environ['OPENROUTER_API_KEY']}"},
)
data = r.json()
print(r.status_code, data["model"], data["provider"])
200 anthropic/claude-sonnet-5.5 Anthropic

Anthropic answered, so no failover happened. The provider field in every response names the provider that served it, so your logs show when traffic moves away from Anthropic. Setting order does turn off the default load balancing. Requests follow your list instead of our health ranking, and move on to the remaining providers only after the ones you listed fail.

Two settings stop failover, and they’re worth checking if you still see 529s:

  • "allow_fallbacks": false keeps the request on the providers you listed. If they’re all overloaded, you get the error back.
  • "only": [...] limits which providers can serve the request at all. If none of them serves the model, the request fails before it starts.

We set only to ["openai"] to see what that failure looks like:

import json
import os

import requests

body = {
    "model": "anthropic/claude-sonnet-5.5",
    "provider": {"only": ["openai"]},
    "messages": [{"role": "user", "content": "Reply with the word ok."}],
    "max_tokens": 16,
}

r = requests.post(
    "https://openrouter.ai/api/v1/chat/completions",
    json=body,
    timeout=120,
    headers={"Authorization": f"Bearer {os.environ['OPENROUTER_API_KEY']}"},
)
print(r.status_code)
print(json.dumps(r.json(), indent=2))
404
{
  "error": {
    "message": "No allowed providers are available for the selected model. Providers serving anthropic/claude-sonnet-5.5-20260928: google-vertex, amazon-bedrock, azure, claude-on-aws, anthropic, but your request's provider.only preference permits only: openai.",
    "code": 404,
    "metadata": {
      "available_providers": [
        "google-vertex",
        "amazon-bedrock",
        "azure",
        "claude-on-aws",
        "anthropic"
      ],
      "requested_providers": [
        "openai"
      ],
      "routing_funnel": [
        {
          "step": "Initial Endpoints",
          "endpoint_count": 8
        },
        {
          "step": "Filter by Regional Surcharge",
          "endpoint_count": 5
        }
      ],
      "failed_routing_step": "Filter by Allowed Providers"
    }
  }
}

The error lists every provider that could have served the request, so you can copy the slugs you need straight into your only list.

Step 3: Add a fallback model

If every provider for a model is busy at once, for example during a demand spike after a new release, a second model can answer instead. List the models in order with models and send the request the same way as in step 2:

body = {
    "models": ["anthropic/claude-sonnet-5.5", "anthropic/claude-haiku-5.5"],
    "provider": {
        "order": ["anthropic", "amazon-bedrock", "google-vertex"],
        "allow_fallbacks": True,
    },
    "messages": [{"role": "user", "content": "Reply with the word ok."}],
    "max_tokens": 16,
}
200 anthropic/claude-sonnet-5.5 Anthropic

Sonnet was available, so it answered. If it had failed at every provider, we’d have sent the request to Haiku 5.5, and the response’s model field would name it. Model fallbacks trigger on any error from the first model, including rate limits, downtime and context-length errors. If the last model in the list fails too, you get its error back.

Pick a fallback model that’s good enough for your task. A smaller model like Haiku 5.5 suits routine work such as short summaries or classification, and our lowest-cost inference guide covers how to find the cheapest model that still does the job. For work that only the bigger model handles well, rely on a second provider and retries instead of a smaller fallback.

How do you fix 529 errors in Claude Code?

Claude Code already does step 1 for you. It retries transient failures up to 10 times with exponential backoff, and it only shows API Error: Repeated 529 Overloaded errors once those retries run out. You can change the count with CLAUDE_CODE_MAX_RETRIES, but when the model stays busy, more retries just mean a longer wait. The quickest fix without any setup is to run /model and switch models, since Anthropic tracks capacity per model.

To keep the model you chose, run Claude Code on OpenRouter, which adds step 2. The quickest way is Ori Harness, which starts the Claude Code already on your machine with OpenRouter settings in place:

curl -fsSL https://openrouter.ai/labs/ori/install.sh | bash
ori claude --model anthropic/claude-sonnet-5.5

Ori opens a browser so you can sign in with your OpenRouter account, so there is no API key to create or paste. Only sessions you start with ori claude run on OpenRouter, and plain claude works as before.

To set it up by hand instead, set three environment variables:

export ANTHROPIC_BASE_URL="https://openrouter.ai/api"
export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY"
export ANTHROPIC_API_KEY=""  # must be empty

If you were signed in with a Claude account, run /logout once and relaunch so the variables take effect. Our Claude Code guide recommends keeping Anthropic as your top-priority provider, because that’s the one Claude Code is guaranteed to work with. When Anthropic is overloaded, requests fail over to the other providers serving the same model.

We ran Claude Code this way nine times on a small bug-fix task, with Opus, Sonnet and Haiku 5.5, and every session completed. Claude Code with OpenRouter covers the rest of the setup, including choosing a model for each role.

Frequently asked questions

Is a 529 error my fault?

No. A 529 means Anthropic’s API is at capacity for that model across all users. Your key, plan and request are fine. A 429 is the error caused by your own usage.

How long does a Claude 529 last?

Usually a few seconds, which is why retries with backoff fix most of them. During heavy demand, an overload can last minutes, and that’s when sending the request to another provider helps.

Does a paid plan or higher tier prevent 529 errors?

No. A higher tier raises your rate limits, which prevents 429s, but a 529 comes from total demand on the model. Serving the model from more than one provider is what reduces your exposure.

How do I check whether Claude is down?

Anthropic posts incidents at status.claude.com, and the old status.anthropic.com address redirects there. On OpenRouter, each model’s page shows recent uptime for every provider that serves it, for example, Claude Sonnet 5.5.

Next steps

来源:OpenRouter Blog · openrouter.ai