Fallback models
Name a backup model, and Spro tries it when the first model cannot answer.
What is Fallback models?
A fallback model is a backup model that an AI gateway calls when the primary model fails, is retired or is unavailable. On Spro you send a list of models in the models field, or fallbacks for the Anthropic Messages API. Spro tries each model in order, skips retired models, and records why each attempt was skipped.
A model can be unavailable for many reasons: an outage, a rate limit, a retirement date or a missing credential. A fallback list keeps your application answering by naming the models to try next, in the order you choose.
Fallback is separate from provider routing. When you send your own list, Spro tries your models in that order and does not add provider failover on top. Each skipped attempt is recorded with its reason, so you can see the chain that produced the answer.
Key features
What this feature does for your requests.
- An ordered list of backup models in the models or fallbacks field
- Retired models are skipped automatically and logged as model_retired
- Reasons recorded per attempt, such as provider errors or a missing credential
- x-spro-fallback-from names the first model that was tried
- Combines with service tiers, so Flex can fall back to Standard
How it works
4 steps, from setup to the first request.
- 01
Set the primary model
Put the model you want first in the model field.
- 02
Add backups
List backup models in the models array, in the order you want them tried.
- 03
Spro tries them in order
Each model is called until one returns an answer.
- 04
Check the log
The usage log and response headers show which model answered and why earlier ones were skipped.
Is it the right fit?
Specific situations where this feature helps, and where it does not.
Good fit if
- A user-facing feature must still answer when the main model is slow, rate-limited or down
- You are retiring a model and want a planned chain while you migrate
- Background jobs where a backup model's answer is acceptable
Not a good fit if
- Your backup model's output breaks your app's format or quality bar
- You need a guarantee of exactly which model answered; a fallback can change it
- Each extra attempt adds latency your users will notice
Fallback models FAQs
Common questions about Fallback models.
Route every AI request through SPRO.
One OpenAI-compatible API for 350+ models, with intelligent routing, 29 built-in guardrails, observability, and automatic failover.
