Tiers and the fallback ladder
A product asks for a tier, not a model. The operator maintains the tiers, so models can change without any change in your product.
The tiers#
| Tier | For |
|---|---|
fast | Quick and plentiful: classification and short answers |
capable | Quality text |
agent | Complex work with tools |
best | The strongest answer, when time does not matter |
GET /v1/tiers returns the live list: for each tier, its rungs with rung, model, pool and timeoutMs. An unknown tier gives 400 unknown_tier with the list of known tiers.
How the ladder works#
A tier is an ordered ladder of at least two models from different pools. A pool is a set of models that run out together, so a ladder never falls back to a model that is out for the same reason.
- The first rung is tried.
- If it is exhausted, retired, rejected, slow or failing, the next rung is tried. Pools known to be down are skipped.
- The first answer wins. The response names it and gives its
rung. - If no rung answers, the result is
503 all_rungs_failedwithattemptsexplaining why.
Transient failures are retried a couple of times on the same rung before moving on, which shows as tries in attempts.
What your product should do#
- Read
rung. When it is above 0, the primary model did not answer; show or log it. - On
503 all_rungs_failed, use your own fail-safe and try again later. - Look at
GET /v1/poolsif you need to know why: a pool ishealthy,exhausted(withcooldownUntil),downorunknown.