LLM Fallback vs Failover: How They Differ
LLM failover sends a failed request to another provider that serves the same model, such as gpt-4o on OpenAI and then on Azure OpenAI. The answer should be equivalent. LLM fallback sends it to a different model, such as claude-sonnet-4-5 when gpt-4o is down. The answer may differ, so you choose that model on purpose. In DVARA, an AI gateway that governs model, tool and agent-to-agent calls, both are configured on a route. On both paths the same policy, personal-data handling and audit apply, so a provider outage never becomes a governance gap.
Updated November 9, 2026 for DVARA 1.13.0.
What is the difference between LLM fallback and failover?
| LLM failover | LLM fallback | |
|---|---|---|
| What changes | The provider or deployment | The model, and often the provider |
| Example | gpt-4o on OpenAI → gpt-4o on Azure OpenAI | gpt-4o on OpenAI → claude-sonnet-4-5 on Anthropic |
| Answer quality | Should be the same | Can differ in style, length and behaviour |
| Cost | Usually similar | Can be higher or lower; billed as the model that served it |
| Who decides | Can be automatic | Should be a decision you write down |
| Typical trigger | Provider outage, 5xx, timeout, open circuit, rate limit | The same triggers, when no same-model backup is left |
Many teams use the two words as if they meant the same thing. The distinction matters because a fallback changes what your users get. A failover to the same model is an infrastructure event. A fallback to another model changes the product, and a reviewer may later ask why a different model answered.
When should you use each?
Use failover when you can run the same model in more than one place: OpenAI and Azure OpenAI, or two regions of one cloud provider. It is the safer default because the request stays the same.
Use fallback when no second home for your model exists, or when staying available matters more than an identical answer. A support assistant can usually accept a different model for an hour. A pipeline that extracts fields against a strict JSON schema may be better off failing loudly, so it does not write different output into your systems.
Use neither when the request is not safe to repeat. A model call is usually safe to retry. An agent step that already triggered a side effect is not, and that belongs to the agent's own logic.
How does DVARA decide when to switch?
Routing picks the first provider. If that call fails, three layers run in order, and each one runs per provider:
- Retry with backoff. By default up to 3 attempts in total, starting at 500 ms and doubling, capped at 10 s. A provider
429,408,5xxor connection failure is retried. Other provider4xxresponses are returned at once. - Circuit breaker. When 50% of the last 10 calls fail (after at least 5 calls), the circuit opens for 30 seconds, and that provider gets no traffic. It then lets 3 trial calls through. If they succeed, the circuit closes.
- Switch. A provider error, an open circuit or a provider rate-limit signal moves the request to the next target.
A request the provider rejected as invalid (400), a policy denial and an authentication failure never switch providers. Retrying them elsewhere would hide a real problem.
Failover is on by default (dvara.llm-gateway.resilience.fallback.enabled: true). Which targets it tries depends on whether the request matched a route:
- The request matched a route. It tries only that route's own
fallbackslist, in order. A matched route with nofallbacksdoes not switch at all; the caller gets the first provider's error. - The request matched no route. It tries other configured providers that serve the same model name. It never changes the model, so this path is always failover, never fallback.
How do you configure failover and fallback on a route?
One route can do both: failover first, then fallback. This is the shape the Open Source gateway reads from gateway.yaml:
routes:
- id: support-assistant
model: gpt-4o
provider: openai
fallbacks:
- provider: azure-openai # failover: same model, no "model" needed
- provider: anthropic # fallback: a different model, so name it
model: claude-sonnet-4-5
A target without model gets the request's own model. A target in another model family must name its model, because the gateway never guesses one. A chain can list up to five targets. Two limits bound it:
| Setting | Default | What it does |
|---|---|---|
dvara.llm-gateway.resilience.fallback.max-attempts | 3 | Most targets one request tries after the first provider fails. Skipped targets do not count. |
dvara.llm-gateway.resilience.fallback.deadline | 60s | How long after the first attempt a target may still start. |
Both apply to a route's fallbacks chain only. On the Enterprise platform, from 1.10.0 you can change the retry, circuit-breaker, timeout and failover settings in Flightdeck without a restart. The full reference, including per-provider overrides, is in the resilience docs.
What do you see when it switches?
The application keeps sending gpt-4o. If OpenAI fails after its retries, the request goes to the next target. The response is an ordinary chat completion whose model field names the model that served it. The gateway logs the switch:
Route [support-assistant]: falling back from [openai] to anthropic/claude-sonnet-4-5 (attempt 1 of the chain)
It also counts it:
gateway_fallbacks_total{from_provider="openai",to_provider="anthropic"}
The counter counts each target when the call to it starts, whether it then succeeds or fails. A target that was skipped is not counted.
When no target can take what the request needs, you get a clear refusal, not a confusing error from the wrong provider. Suppose the request asks for a JSON schema, tools or image input, and every remaining target lacks that capability. DVARA then returns HTTP 503 with the code failover_capability_mismatch and the header X-Gateway-Failover-Blocked: capability_mismatch. If targets were tried and all of them failed, you get the first provider's error.
Does governance still apply on the fallback path?
Yes. Failover is part of the governed path, not a side route around it. This matters most during an outage, when traffic moves to places it does not normally go.
- Personal data. PII detection runs on the request before any provider is chosen, so every target in the chain gets the same request after your workspace's PII action. Under
REDACT, that means the redacted request. The default action isLOG, which records the finding and forwards the request unchanged. Checks on the response run on whichever provider answered. - Policy. Before a target is used, the gateway checks its model against the same workspace policy the request passed. If your policy allows
gpt-4obut notclaude-sonnet-4-5, the Anthropic target is skipped. This runs in the Open Source gateway. The skip is not written as a second denial, because the caller was not denied anything. - Model access. On the Enterprise platform, a model that is turned off for the workspace is never used as a fallback.
- Data residency. On the Enterprise platform, from 1.10.0, a target outside the workspace's allowed regions is skipped. The default,
data-residency.failover: strict, refuses with403 data_residency_violationand writes aDATA_RESIDENCY_FAILOVER_BLOCKEDaudit event rather than leave the region. If you setpermissive, each request served elsewhere writesDATA_RESIDENCY_FAILOVER_ELSEWHERE, naming the provider that failed and the one that served. - Audit and cost. The
GATEWAY_RESPONSEaudit record names the provider that served the call, and the call is billed as the model that served it, on that provider's own credential.
The result is a reliability feature that cannot quietly send data somewhere your policy would refuse.
What are the limits?
- A stream switches only if it fails to open. Once DVARA starts reading a stream, an error ends it. DVARA does not resend the prompt to another provider or join partial answers.
- No response header marks a switch. The response's
modelfield is how your application can tell that a fallback model answered. Read it if your product logic depends on which model answered. - There is no dedicated audit event for a switch. Outside the residency events, the audit record shows who served the call, not that a switch happened. Use
gateway_fallbacks_totaland the log line for that, and correlate by trace ID. - Registering several providers is not a failover plan. Without a route chain, the request keeps its model name, so a failed
gpt-4ocall only moves to another provider that servesgpt-4o. - Upstream rate-limit shedding is Enterprise and off by default. With
dvara.llm-gateway.provider-rate-limit.enabled: true, the gateway reads the provider's rate-limit headers and moves or sheds traffic before a429. Bulk workspaces are shed first, at 50% of the remaining budget, then standard workspaces at 20%, and premium at 10%.
A checklist before you rely on it
- Every production route that needs to stay up has a
fallbackslist. - Failover targets come before fallback targets in each list.
- Every fallback model is one your workspace policy allows, and one you would accept in front of users.
- Every target supports what your requests need: tools, JSON schema, images, streaming tool calls.
- You alert on
gateway_fallbacks_totalby provider pair, so a quiet switch does not become the new normal. See LLM observability for the rest of the dashboard. - You have tested it. Point a target at a provider you can break, and confirm the log line, the metric and the audit record.
Try it
DVARA keeps a tamper-evident audit trail, runs policy and personal-data checks on every call, and stops agents that loop. Routing and failover are the basics that come standard. For how routes pick the first provider, see multi-provider LLM routing. To try a route chain yourself, start with the Open Source quickstart and add the fallbacks block above to your gateway.yaml.