Fallback quota is exhausted
Detect: Secondary throttling rises as primary traffic transfers.
Recover: Shed optional tasks and place eligible requests in a bounded durable queue.
Continue eligible model work through independent providers without silently changing capability, privacy, or output contracts.
Model redundancy keeps alternative inference capacity available when a primary model endpoint cannot satisfy a request. A failover policy combines availability evidence with compatibility requirements: context length, structured output, tool calling, modality, residency, and evaluated task quality. Two endpoints backed by the same underlying region or upstream dependency may share the same outage.
Failover is a new inference attempt, not the continuation of an interchangeable function. Provider-specific adapters normalize transport and usage data, while a capability registry determines whether the replacement is acceptable. A partially streamed answer, model-generated tool call, or externally executed action requires an explicit restart boundary.
A proof of concept can test a secondary model against recorded examples and demonstrate a manual endpoint switch.
Production adds deadline-aware retries, capability contracts, separate credentials, and clear behavior for interrupted streams.
Enterprise scale requires reserved fallback capacity, dependency maps, provider-specific data policies, and regular exercises that run real workloads on the secondary path.
Records model limits, supported features, approved data classes, and evaluation versions.
Selects only eligible destinations and preserves the logical request identifier.
Translate schemas, errors, cancellation signals, and token-usage responses.
Tracks recent failures, saturation, and available fallback headroom.
Applies the same business acceptance criteria after any model switch.
flowchart LR
R["Request contract"] --> P["Primary provider"]
P --> V["Output validation"]
P --> E["Retryable interruption"]
E --> C["Capability and residency gate"]
C --> S["Secondary provider"]
C --> H["Defer or escalate"]
S --> VsequenceDiagram
participant G as Model gateway
participant P as Primary provider
participant C as Capability registry
participant S as Secondary provider
G->>P: Attempt within deadline
P-->>G: Retryable failure before accepted output
G->>C: Check fallback eligibility
C-->>G: Approved compatible route
G->>S: New attempt with remaining budget
S-->>G: Candidate result
G->>G: Validate before acceptanceClassify the request data and required features before choosing a primary or fallback provider.
Divide the remaining deadline between connection, generation, validation, and any permitted alternative attempt.
Record provider, model revision, input policy, and attempt identifier with the inference span.
Distinguish throttling or transport failure from invalid input, policy rejection, and already-visible output.
Check independent capacity and replay the request only when its privacy and capability contract remains valid.
Check the result against the task contract and record the provider transition for operations and cost attribution.
Insurance · Illustrative enterprise scenario, not a reported customer outcome.
A claims intake service extracts structured fields from uploaded repair estimates throughout the business day.
The primary inference region becomes unavailable while claim submissions continue.
Maintain intake while preserving document residency and the approved extraction schema.
A gateway maintains two evaluated extraction models, a regional policy registry, and a durable pending queue.
If the secondary cannot process a document modality or has exhausted quota, the claim remains queued with a visible processing state.
Measure completion delay, fallback quality, and queued age separately; service continuity is useful only if the extracted fields remain reliable.
| Decision | Benefit | Cost |
|---|---|---|
| Active-passive capacity | Limits steady-state inference spending. | Cold or under-tested fallback capacity may be unavailable during an incident. |
| Provider diversity | Reduces shared infrastructure exposure. | Adds contract, adapter, and evaluation maintenance. |
| Strict compatibility gates | Preserve task and privacy guarantees. | Reduce the set of requests eligible for immediate failover. |
Detect: Secondary throttling rises as primary traffic transfers.
Recover: Shed optional tasks and place eligible requests in a bounded durable queue.
Detect: Schema validation fails despite a successful HTTP response.
Recover: Reject the output and route to an approved simpler workflow.
Retry infrastructure failures selectively; do not bypass policy or authorization denials.
Restart a visible answer cleanly or expose an explicit interruption state.
Map actual infrastructure and upstream dependencies.