Fallback kept uptime, broke quality
Step 1 · The pattern
A gateway in front of the model
The app asks for answers that include a tool call in JSON. Requests go through an LLM gateway to the primary model, which the prompts were written and tested against. Everything works. (All numbers are illustrative.)
- a request
- good answer
In short
Fallback kept uptime, broke quality: how it works and how it breaks
An LLM gateway with a fallback chain is standard advice: if the primary model returns errors or 429s, send the request to the next model in the list. Gateways such as LiteLLM support ordered fallbacks for general errors, content-policy errors and context-window errors. Availability graphs stay green. But a different model is a different product: it follows instructions differently, formats JSON and tool calls differently, and its prompt cache starts cold, so it can cost more during the incident. If nothing measures quality per model, the fallback path is never tested: the app keeps 'succeeding' while answers break downstream, and nobody notices until customers do. Record which model actually served each request, run the same evals on every model in the chain and only list ones that pass, validate structured output, fail over before the first streamed token rather than midway, and alert on the fallback rate.
What this simulation simplifies
- Broken answers are a fixed chance per model here; real differences depend on prompts and tasks.
- Evals are shown as a flag; in practice they are a test suite run on every model change.
How this comes up in interviews
"You add a fallback model to your LLM gateway. What can go wrong?"
Then they ask
- How do you know which model answered?
- What about streaming?
- What happens to cost?
A strong answer covers
- Different model, different behaviour: formats, tool calls, refusals.
- Run the same evals on every model in the chain.
- Record the served model; alert on fallback rate.
- Fail over before streaming starts; validate structured output.
- Cold prompt caches and retry multiplication change cost and load.
Points to cover, not a script. Say them in your own words and tie them to a system you have worked on.
On one page: the track cheat sheet.
Sources: LiteLLM docs: Proxy reliability (fallbacks, retries, cooldowns) ↗ · OpenTelemetry semantic conventions for generative AI spans ↗ · Report a problem
Diagrams are our own simulations: the timings, rates and counts in them are illustrative, not measurements. Captions are original wording.