Developer Guides

How to Build an AI App That Survives a Provider Outage

Plan for outages before they happen: retry briefly with growing waits, set firm timeouts, and keep a second model from another provider ready to take over. On our price board on 2026-11-21, three providers listed a main model at the same $2 / $10 per 1M tokens, so a like-for-like fallback needn't cost more.

Cover reading "Plan B, plugged in" beside a chrome switch box with one sparking unplugged cable and one glowing green connected cable (AI-generated image)
AI-generated image

It’s 3 a.m., your AI feature has gone silent, and the support inbox is filling up. The provider will fix it eventually; the question is what your users see in the meantime.

Outages Are Routine, Not Rare

Our AI API status page reads the official status pages of most of the 29 AI providers it lists (26 on 2026-11-21). In the 30 days to that date, those providers posted 167 incidents between them. Two of the largest each posted more than 20:

Provider (status page) Incidents posted in the 30 days to 2026-11-21
OpenAI 25 (tracked since 2026-10-23)
Anthropic 21
Mistral AI 7
DeepSeek 4

These are incidents the providers posted themselves, many of them minor or affecting one feature. They’re not our measurements, and they don’t mean your requests failed for that long. Our methodology page explains how we read them. The lesson is simply that some kind of incident at your provider is a normal monthly event, so plan for it.

Layer 1: Retry, But Politely

Many failures last seconds. Retrying is the first line of defence, done carefully:

  • Retry only errors that can recover. Server errors (500, 503, and Anthropic’s 529 overloaded) and rate limits (429) are worth retrying. A bad key (401) or a malformed request isn’t.
  • Wait longer each time. Use exponential backoff: wait about 1 second, then 2, then 4. AWS’s architecture blog recommends adding random jitter to those waits, so thousands of clients don’t all retry at the same instant.
  • Honour Retry-After when the provider sends it. Both OpenAI’s and Anthropic’s error pages mention it.
  • Cap it. Two or three retries is plenty. Anthropic’s errors page says its official SDK already retries transient failures twice by default with exponential backoff, so check what your SDK does before adding your own loop.

Layer 2: Timeouts and a Circuit Breaker

  • Set a timeout that matches your user’s patience. A chat reply that hasn’t started after 20–30 seconds is better treated as failed.
  • Use a circuit breaker. If most recent calls to a provider failed, stop sending traffic there for a minute or two and go straight to your fallback. Then test with a few requests before sending all traffic back.

Think of it as a fuse box: when one circuit keeps tripping, you switch it off and run on the spare until it’s fixed.

Layer 3: A Second Provider at a Similar Price

A fallback model only helps if it’s from a different provider, because an incident at one company rarely hits another at the same moment. Cost needn’t be a barrier.

Did you know? On our price board on 2026-11-21, Claude Sonnet 5.5, GPT-6.2 Sol and Gemini 4 Carbon all listed the same standard price: $2 per 1M input tokens and $10 per 1M output tokens. Google lists Gemini 4 Carbon rising to $4 and $20 from 2026-12-01.

Practical steps:

  1. Keep prompts portable. Avoid features only one provider supports in your core path, or have a plain version ready.
  2. Store the model choice in configuration, not scattered in code, so switching is one setting.
  3. Test the fallback on real traffic samples so you know its answers are acceptable.
  4. Watch the cost of the switch. If your fallback is pricier, cap how long you stay on it.

Layer 4: Fail Gracefully

When everything fails, say so clearly. For example: the assistant is having trouble right now, please try again in a few minutes. Then keep the rest of your app working. Save the user’s input, so they don’t lose a long message.

Layer 5: Know Before Your Users Do

  • Subscribe to your providers’ status feeds and alerts.
  • Track your own error rate per provider. A sudden jump in 5xx errors is your earliest signal.
  • Check our AI API status page to see whether others are posting incidents too.

Myth vs Fact

Myth Fact
Big providers don’t go down Two of the largest each posted more than 20 incidents in the 30 days to 2026-11-21
Retrying instantly and often is safest Fast, endless retries add load; back off with jitter and cap retries
A fallback must cost more Three providers listed a main model at the same $2 / $10 on our board

What This Means for You

  • Developers: add backoff with jitter, timeouts and a circuit breaker this week; then wire in a second provider behind one config setting.
  • Founders and team leads: decide how long users may wait and what they see during an outage; that decision shapes the engineering.
  • Curious beginners: apps that use AI rely on outside services, and good apps have a plan B when those services stumble.

Copy-Ready Fallback Checklist

  • Retry 429 and 5xx errors only, two or three times, with backoff and jitter
  • Honour Retry-After
  • Timeout set per feature
  • Circuit breaker per provider
  • Second provider configured and tested on real samples
  • Friendly error message and saved user input
  • Status feeds and error-rate alerts in place

If your main provider failed for an hour today, which feature would you switch over first?

Bottom Line

Provider incidents are a routine part of running on AI APIs. Retry politely, time out firmly, keep a tested second provider at a similar price, and tell users clearly when something’s wrong. Keep Is ChatGPT, Claude or Gemini Down? handy for the first minutes of an incident, compare fallback prices on our price board, and watch posted incidents on our AI API status page. Want these updates by email? Sign up here, or follow new guides and data stories through our RSS feed.

Get the Weekly AI News Bay Email

The week’s biggest AI stories, model price changes and outages in one short email. The first issue goes out in early 2027; sign up now to get it.

Double opt-in: we email you a link to confirm. One-click unsubscribe in every email. Privacy policy.

Sources

Written by AI News Bay’s AI writers and checked by a separate AI auditor before publishing. Prices and uptime figures come from our own measurements. Spotted something out of date? Tell us.

Related on AI News Bay

More in Developer Guides

Type a name, a topic or a format. Enter opens the full results.