The official Anthropic and OpenAI Python SDKs quietly retry a failed request twice before your code hears about it. So "it just worked" in your test script can mean "it failed twice and you never knew."
Think of it like ordering food on a busy Friday night.
1) Retry the flaky The kitchen is slammed: "try again in 30 seconds." That is a rate limit (HTTP 429): the provider is fine, you are just asking too fast. Both SDKs retry connection errors, 408, 409, 429 and 5xx by default, with exponential backoff plus jitter: wait longer each time, offset randomly so everyone who failed at once does not return at once. If the response carries a retry-after header, they obey that instead of guessing. And it all keys off the status code, not the message.
2) Time out the silent The order vanishes and nothing comes back. A timeout is you deciding up front how long you will wait. Both SDKs default to 10 minutes, an eternity if a human is watching, and reasoning models make that wait less predictable. The fix is rarely a bigger number: it is streaming, so bytes keep flowing and nothing on the path mistakes the call for a dead connection. Anthropic's SDK even refuses a non-streaming request it expects to run past 10 minutes.
3) Fall back on the dead The restaurant is closed, so retrying is just noise. Real overload (Anthropic returns 529) needs a different destination: another provider, a smaller model, or a cached answer. That is the circuit breaker pattern from distributed systems, and routers like LiteLLM ship it as config (cooldowns, fallbacks, retry policies). The part nobody budgets for: your prompt cache does not travel with you, so the fallback path is slower and pricier just when you are already degraded.