Skip to content
mentoor

Reliability patterns for LLM calls

For engineers

Fallback models and providers, timeouts for long and streamed generations, circuit breakers, idempotent retries for side effects and graceful degradation during outages

See where you stand

110 questions across four stages: Understand, Apply, Solve and Judge.

Try 5 questions

Practice items, not counted towards your mastery. No account needed.

Check yourself · 1 of 5

Which failure should normally trigger a switch to the fallback model?

Choose one answer

Check yourself · 2 of 5

What does an idle-stream timeout catch that a total timeout does not catch early?

Choose one answer

Check yourself · 3 of 5

What does a breaker do in the half-open state?

Choose one answer

Check yourself · 4 of 5

A tool call times out. Why can retrying it be dangerous?

Choose one answer

Check yourself · 5 of 5

Which feature is a good candidate for queueing work until the model is back?

Choose one answer

Topics

  1. Fallback models and providers5 min read · A second model or provider behind the first, prompts that work on both, evals that cover the fallback path, and the behaviour change users notice when it takes over
  2. Timeouts for streamed and long generations5 min read · Connect, first-token, idle-stream and total timeouts, longer budgets for reasoning models, per-step limits in agents and passing a deadline down the call chain
  3. Circuit breakers and load shedding for providers5 min read · Opening the circuit when a provider's error rate spikes, probing before closing it, avoiding retry storms and shedding low-priority traffic first
  4. Idempotent retries for tool calls and side effects5 min read · Retrying a model call is cheap, but retrying a tool that sends an email or charges a card is not; idempotency keys, deduplication and at-most-once side effects
  5. Graceful degradation when the model is down5 min read · Cached or static answers, queueing work for later, switching the feature off with an honest message, and showing status instead of a generic error

Start here

110 questions · last verified 2026-12