All posts
LLMProduction ReadinessAI Architecture

LLM fallback testing: Which backup route is actually approved?

6 min readThomas Stermole
Editorial illustration: a green data capsule faces two paths; an open marble gateway allows passage while a brass barrier blocks the other route.

An automatic LLM fallback should send a request only to an endpoint approved for that workflow and its data. Availability alone is not enough. If no approved, suitable endpoint is available, the application needs a defined queue, handover or stop path.

The critical check happens before dispatch. A log entry created after forwarding can record a prohibited transfer, but cannot prevent it.

This testing method is an original architecture and engineering recommendation. The example is entirely fictional. No customer systems or provider implementations were tested. Sources checked: 2 November 2026.

Distinguish model fallback from provider failover

A backup route may change the model, provider, deployment, processing region or several of these at once. For quality checks, see LLM model migration: detecting regressions before rollout. Fallback adds another question: is this alternative processing path approved for the request?

OpenAI's failover guide distinguishes support for multiple providers from approval to fail over a particular workflow. Switching providers does not automatically resume an ongoing agent session with its saved state. Source: Designing failover across OpenAI model providers.

Start with a bounded, read-only call, such as document classification. Agents that perform writes require a more extensive recovery assessment.

Describe each route beyond its model name

“Backup model: Model B” is not enough for technical approval. I recommend a route record:

FieldWhat to record
IdentityProvider, account or project, deployment and endpoint
ProcessingDocumented processing locations and relevant limitations
DataApproved data classes and processing purposes
RetentionReviewed settings and terms for inputs, outputs and logs
CapabilitiesRequired modalities, output formats, context capacity and tools
ApprovalOwner, review date and associated configuration
Fallback behaviourFurther automatic destinations behind this route

The record translates the results of the necessary technical, contractual and legal reviews into operating rules. Private AI vs public cloud covers the broader workload placement decision. Those boundaries must still apply during an outage.

Compare product terminology with your actual requirement

“EU”, “Europe”, “regional” and “local” may refer to different scopes. OpenRouter defines its European regional endpoint as covering the EU/EEA, the UK and Switzerland. That is broader than an internal rule allowing processing only in Austria and Germany. Customer deployments connected through BYOK also need appropriate configuration. Source: In-Region Routing.

Do not treat a product label as approval without checking its meaning. A matching region is still insufficient when retention, provider approval or required features remain unresolved.

Fictional example: four backup routes, none usable

An application classifies confidential service requests. This example workflow permits processing only in Austria or Germany, explicitly approved providers and deployments, reviewed logging and retention settings, a specific JSON output schema and no external tools. These are fictional company rules, not general legal requirements.

The primary route A in Austria becomes unavailable:

RouteKnown statusDecision
BGermany; approved and tested; also unavailableUnavailable
CNetherlands; suitable and reachableExcluded for this workflow
DGermany; reachable; retention terms unresolvedNot approved
EGermany; approved; required output format not yet testedNot ready for use

The correct result is: no usable backup route. The application queues the request or ends it with a clear status, following its agreed policy. B and C are excluded for different reasons: B may become available later. C remains excluded for this workflow.

Enforce the dispatch decision

A priority list expresses a preference. It must not override binding constraints. For implementation, I recommend this sequence:

  1. Identify the workflow and applicable data class.
  2. Exclude destinations that are not approved.
  3. Check required capabilities and validated configuration.
  4. Check availability within the remaining set.
  5. Select a suitable route or invoke the defined alternative path.
  6. Enforce the decision before transmitting the request.

Classification should come from trusted application context. A sentence in user input claiming “this data is public” must not independently override the server-side classification. Define how missing information is handled; an unknown processing location must not silently count as approved.

Find fallbacks hidden behind the first fallback

Inspect the application, client library, gateway, provider and actual deployment. Several layers may have their own retry or fallback configuration.

A constructed failure case: the gateway permits only route B. After a gateway error, however, the application uses a second API client with a global default endpoint. The gateway policy works, but the application bypasses it.

Inventory every fallback path. Disable additional fallbacks or subject them to the same rule. Where practical, restrict outbound connections to approved destinations and record the actual destination and configuration. Allowing a hostname alone does not establish its complete processing geography.

Demonstrate that rejected requests were not dispatched

A router preview is insufficient for acceptance. Use synthetic inputs, controlled test endpoints and recorded call counts. Excluded destinations must receive zero calls during the test.

TestExpected evidence
Primary unavailable; approved backup availableOnly the intended backup receives the request.
All approved routes unavailableNo dispatch to excluded targets; defined queue or stop status
Reachable target outside the permitted regionExcluded before content transmission
Backup route information missingNo implicit approval
Client library has an additional fallbackThat path cannot bypass the policy either.
Model alias points to another deploymentRecheck the mapping and block it when necessary.
Output violates the required schemaNo unchecked result enters the next processing stage.

Record the configuration, injected fault, routing decision, destinations actually contacted and result. A passing test establishes the tested behaviour under those conditions, not general availability or comprehensive data protection compliance.

Do not treat an active stream as a fresh call

LocalAI documents failover only before a response is committed. Once stream content has reached the client, it does not restart that stream against another target. This is documented product behaviour and must not be assumed for other systems. Source: LocalAI 4.11.

Determine whether partial output has already been displayed, stored or processed. A second attempt must not be silently combined with the first. Stateful workflows and possible write actions need separate recovery checks.

Decide whether a second route is worth maintaining

Every backup route needs maintained access, configuration and recurring tests. For infrequent, delay-tolerant tasks, a queue may be more economical. An interactive application may need only a limited alternative, such as saving the request for later processing.

Before adding another integration, establish how long the task may wait, which function must remain available, which route is already approved and tested, and who reviews future changes. A well-defined stop can be the appropriate solution.

Next step: block a route and inspect the result

Select one read-only AI call. Document its primary route, approved backup and one explicitly excluded destination. Simulate both approved routes failing. The key evidence is that the excluded destination receives no request and the application returns a clear status.

This assessment fits a bounded AI Production Readiness & Reliability Sprint: one workflow, its routing rules and the relevant failure cases.

Next step

Sounds relevant for your company?

In a no-obligation initial call, we clarify within 30 minutes whether and where getting started is worthwhile for you — honestly and without sales pressure.

Request an initial call