◉CLAUDE LABJP
●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…
Articles/API & SDK
⬡ API & SDK/2026-06-30Advanced

The Same 429 Wears a Different Face on Each Route: Running Claude Safely over Anthropic Direct and Azure Foundry

With Claude now generally available on Microsoft Foundry, a two-route setup is realistic even for solo developers. Here is how to fold the route-by-route differences in 429s and retry-after into one normalized error type and a single backoff policy.

Claude API128Azure Foundryrate limits7retry7failover

✦ Premium Article

On 2026-06-30, the same day Claude Opus 4.8 and Haiku 4.5 landed in the Messages API, Claude also went generally available on Microsoft Foundry (Azure). The pitch is that you can call Claude natively on Azure while keeping your existing identity, billing, and governance. That makes a two-route setup — normally hit Anthropic directly, and divert to the Azure route when one side jams — a realistic option even at a solo-developer scale.

But the first thing you hit when you start running both routes is not performance or price. It is a quiet asymmetry: the same 429 comes back wearing a different face on each route. A retry path written around one route misfires silently on the other. As someone running unattended publishing across the Dolice Labs sites, I find that "silent misfire" the scariest failure mode of all. This article works through those differences and folds them into a single policy that drives both routes.

Running two routes means the "same 429" returns in different shapes

A rate-limit overflow returns HTTP 429 on either route. So far, identical. What differs is the shape of the information attached to that 429.

A direct 429 carries Anthropic's own error envelope ({"type":"error","error":{"type":"rate_limit_error"}}), and the grace period arrives in a lowercase retry-after header as integer seconds. Under load you may also see 529 rather than 429. The Azure Foundry 429, on the other hand, carries Azure's error envelope ({"error":{"code":"429","message":"..."}}), and the grace period arrives in a Retry-After header that is sometimes integer seconds and sometimes an HTTP-date. Transient server trouble can return 503, which does not line up with the direct route's 529.

So the shortest possible code — "see a 429, read retry-after seconds, sleep" — breaks the instant you add a second route. The header name shifts, the value's unit shifts, and the key in the error body shifts.

Lay both routes' error surfaces side by side first

Before designing anything, pin down the differences by putting both routes next to each other. Abstract too early and you end up with a normalization skewed toward one route that quietly fails on the other.

AspectAnthropic directAzure Foundry
Rate-limit status429429
Overload / transient529 (overloaded)503, etc.
Grace header nameretry-after (lowercase)Retry-After
Grace valueinteger secondsinteger seconds OR HTTP-date
Error body keyerror.type (e.g. rate_limit_error)error.code (e.g. "429")
Authx-api-key headerBearer token (Azure-side credential)
Extra metadataanthropic-ratelimit-* headersavailability is route-dependent

HTTP header names are case-insensitive by spec, so a robust client reads retry-after and Retry-After alike. The real problem is not there — it is the value's unit (seconds vs HTTP-date) and the name of the body key. Those differ per route.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦How 429 and retry-after actually differ between Anthropic direct and Azure Foundry (seconds vs HTTP-date, and the error envelope key)
✦A resolver that folds both routes into one normalized error type (retryable decision, both-format retry-after parsing)
✦The logic that separates 'wait and retry the same route' from 'fail over to the other route'
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ API & SDK2026-10-16
Sending 40 Rows From Make to the Claude API Stops at Row 14 — Avoiding the 429 With One Subtraction
Why a no-code automation that sends spreadsheet rows to the Claude API one by one hits a 429 partway through, and how to fix it. Seven spacing strategies tested on a mock bucket, a formula for the Sleep delay, and settings that stop failed rows from vanishing.
⬡ API & SDK2026-10-13
Haiku 5.5 is cheaper per token, but your bill jumps fivefold past about 77k Haiku 4.5 tokens
On the price sheet, Haiku 5.5 costs roughly a tenth of Haiku 4.5. But the same text becomes about 30% more tokens, and a prompt over 100k tokens is billed at five times the rate. Here is the boundary in Haiku 4.5 terms, a script I actually ran, and the changes that return a 400.
⬡ API & SDK2026-10-08
Before Sonnet 4.5 retires, one script to find the arguments that will return a 400
claude-sonnet-4-5 retires on November 30. Swapping the model ID is not enough: budget_tokens, prefill, and tool_choice will fail. Here is a scanner built from the official migration guide, its real output, and the order I would fix things in.