LLMReliabilityChatbot6 min read · 2026-11-03

LLM API Outages: A Fallback Strategy for Your Store Chat

The LLM API behind your store chat will fail sometimes. Plan for it with strict timeouts, safe retries, cached answers, a circuit breaker and a clean hand-off to a human.

When the LLM API behind your store chat is down, the chat should fail in a controlled way. Use a short timeout, retry only a few times with delays, then fall back to a cached or scripted answer. If that is not enough, hand the customer to a human or a contact form. Never leave the customer staring at a spinner.

You cannot prevent provider outages. You can decide what customers see when one happens.

Why a fallback plan matters

Every external API fails sometimes. It can return server errors, hit rate limits, or become very slow. If your chat has no plan, one of three bad things happens:

A fallback plan turns these into a calm, short message and a useful next step.

Step 1: Set strict timeouts

A slow response is a failure. Without a timeout, one stuck call can hold a worker and a customer for a long time.

Show a typing indicator at once, so the wait feels active. Show a polite message if the timeout hits.

Step 2: Retry safely

Retries help with short faults. They hurt during long ones.

Rules for safe retries:

  1. Retry only errors that may pass: timeouts, HTTP 429 (rate limit), and 5xx server errors.
  2. Do not retry client errors such as 400 or 401. The same call will fail again.
  3. Use exponential backoff with jitter. Wait longer after each attempt, and add a random delay so many clients do not retry at the same moment.
  4. Respect a Retry-After header when the provider sends one.
  5. Limit the number of attempts, for example two or three.
  6. Keep the total time inside your overall timeout.

Make sure a retry cannot cause a double action. A chat answer is safe to repeat. A tool call that creates a refund or an order is not, unless it is idempotent.

Step 3: Use a circuit breaker

A circuit breaker stops calls to a service that keeps failing.

This protects your server from piling up requests. It also gives the customer a fast fallback instead of a slow failure.

Step 4: Prepare fallback answers

When the model is not available, what can you still offer? Prepare layers, from best to simplest.

Cached answers

Many store questions repeat: shipping times, return rules, opening hours, size guides. Store good answers for these. If you keep a cache, set an expiry and clear entries when policies change. A stale answer about returns is worse than no answer.

Match only safe, clear questions. Do not cache answers that depend on one customer's data, such as order status.

A secondary model or provider

You can route to a second model or provider. This adds work: prompts behave differently, and you need a second key, a second bill and a second set of tests. Use it only if the chat is important enough to justify that.

Scripted menus and search

If the model is down, show buttons for the common tasks: track an order, start a return, see shipping info. Link to your help pages. A plain search box over your help content also works without a language model.

Plain failure messages

Last, show an honest message. For example: "Our assistant is not available right now. You can still shop as usual. For help, write to us and we will reply by email."

Step 5: Hand off to a human

The human hand-off is the most important fallback. Some questions cannot wait.

Make sure the form works without the LLM. It should not depend on the same API that just failed.

Step 6: Keep safety first

A fallback must not create new risk.

Step 7: Monitor and test

A fallback you never test will fail when you need it.

Use an external monitor to watch the chat endpoint. Uptrack (from the 2folk team) is one option among others for this kind of check. Also tell customers about longer outages on your status page.

A quick checklist

Frequently asked questions

How many retries should I allow?

Two or three is a common choice for a chat. More retries make the customer wait longer and can add load to a service that is already struggling. Keep the total time inside your overall timeout.

Is a second LLM provider worth it?

Only for chats that are important to your business. It adds cost and complexity, because prompts and behavior differ between models. For many stores, cached answers and a human hand-off give more value for less work.

Can I cache LLM answers?

Yes, for stable and general questions such as shipping rules. Do not cache answers that depend on a customer, an order, a price or a stock level. Set an expiry and clear the cache when policies change.

What should the chat say during an outage?

Say plainly that the assistant is not available, that the shop still works, and how to get help. Do not show technical error text. Give one clear next step, such as an email form.

Keep your store running when AI does not

2folk builds commerce automation tools for Shopify and WooCommerce. See what we offer.

See our products →