Before you start
- Two or more targets for the same model — different providers, or different stored credentials for the same provider.
- Each provider connected under Project → AI Gateway → Providers whose access policy allows the model you want. See Connecting a provider.
Create a Fallback chain rule
- Open Project → AI Gateway → Routing.
- Start a new rule with the create-rule flow.
- Choose the Fallback chain strategy.
- Give the rule a Name, for example
gpt-4o-failover. Your application calls it asroute::gpt-4o-failover. - Add the targets in priority order — the first is the primary, the rest are tried in turn. Each target names a Provider, a Model, and a stored credential.
- Save the rule.
How fallback works
to11 tries the targets in declared order. If the current target fails (a connection error or an HTTP 5xx), the next target is attempted immediately.Retries within a target
Each target attempt is retried with exponential backoff before to11 moves on to the next target. The default policy is up to 2 retries with a 500ms base backoff. A routing rule can override this default when a model needs different behavior.Retries handle a transient blip on a single target; the fallback chain handles a target that stays down. Together they give you per-target resilience plus failover across targets.
Send a request
Call the route by name. to11 handles the failover transparently:Next steps
Weighted split
Split traffic across targets by weight.
Direct routing
Route a model to a single managed target.
Routing overview
The three-layer model and how a request picks its layer.