Routing

Decide how TigerGateway picks a model for each request — let the auto-router choose by cost and quality, set a default, and fall back automatically when a provider fails. Configure defaults under Dashboard → Routing; individual requests can override them.

Auto-router

Send tigergateway/auto as the model and the gateway scores every model you have a connected provider key for, then routes to the best one for your cost / quality preference (a 0–10 slider: 0 = best quality, 10 = cheapest). The remaining candidates become an automatic fallback chain.

json
{
  "model": "tigergateway/auto",
  "messages": [{ "role": "user", "content": "Summarize this contract." }]
}

The auto-router only considers models whose provider you've connected (BYOK). Restrict the candidate set further with model patterns in the dashboard (e.g. anthropic/*, openai/gpt-4o).

Fallback chain

Provide a per-request models array. The gateway tries each in order and falls back to the next on a missing key or an upstream error (429 / 5xx / auth). Your saved default model is always appended as the final fallback.

json
{
  "model": "gpt-4o",
  "models": ["gpt-4o", "claude-sonnet", "gemini-flash"],
  "messages": [{ "role": "user", "content": "Hello" }]
}

Streaming responses can only fall back before bytes start flowing — once a stream begins there is no mid-stream retry.

Provider sort

Influence ordering with provider.sort: balanced (default), price, throughput, or latency. Honored unless Prevent overrides is enabled in your routing settings.

json
{
  "model": "tigergateway/auto",
  "provider": { "sort": "price" },
  "messages": [{ "role": "user", "content": "Hi" }]
}

Default model & prevent overrides

  • Omit model entirely and the request uses your configured default model.
  • Enable Prevent overrides to ignore per-request models and provider hints and always enforce your saved policy.

Each request's Request Logs entry records how it was routed — direct, auto, fallback, or default — and how many providers were attempted.