Automatic Failover
When an upstream provider fails, the gateway transparently retries with the next provider in the chain within the same HTTP request.
How It Works
The failover mechanism is built into the routing loop. When the Gateway sends a request to an upstream provider and receives a failure response, three things happen:
- The circuit breaker records the failure for that specific provider:model pair
- The router moves to the next provider in the chain
- The request is re-sent to the new provider (after protocol translation if needed)
The user's request stays open during this process. From the client's perspective, latency may increase slightly (one extra round-trip), but the request succeeds.
Next Steps
- Circuit Breaker — how provider health is tracked
- Provider Routing — how chains are constructed and walked
- Error Handling — what your code sees when all providers fail