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#

TierFor
fastQuick and plentiful: classification and short answers
capableQuality text
agentComplex work with tools
bestThe 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.

  1. The first rung is tried.
  2. If it is exhausted, retired, rejected, slow or failing, the next rung is tried. Pools known to be down are skipped.
  3. The first answer wins. The response names it and gives its rung.
  4. If no rung answers, the result is 503 all_rungs_failed with attempts explaining 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/pools if you need to know why: a pool is healthy, exhausted (with cooldownUntil), down or unknown.