How routing tiers work

The auto: aliases are not models. They are a size or a speed you ask for, resolved to live capacity on every request.

Published by the Foglare team, a four minute read about the gateway's routing.

Send a tier, not a vendor

curl -N https://api.foglare.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"auto:M","messages":[{"role":"user","content":"Summarize this."}]}'

The gateway resolves auto:M to live medium capacity when the request arrives.

Aliases, not vendor models

When you send "model": "auto:M", the gateway looks at the medium-sized capacity it serves right now and picks the healthiest target for that request. The next request resolves again, from scratch. There is no fixed vendor model behind an alias: if one provider's medium capacity degrades, the alias simply resolves somewhere else.

auto:fast
Lowest time to first token across all sizes. The default for chat and anything a person waits on.
auto:S
Small. Short completions, classification, extraction.
auto:M
Medium. Everyday chat and summarization.
auto:L
Large. Multi-step reasoning and longer code.
auto:XL
Extra large. The deepest reasoning tier.

S, M, L and XL are dynamic aliases for a size; auto:fast optimizes for speed across sizes. If you want a specific model instead, send its public id, such as qwen4-max. The models page lists every served model and tier with live status.

Pinning a provider

Each model runs on a pool of providers identified by codename. To keep one request on a specific provider, send the optional provider field with its codename. Codenames are listed per model on the models page.

One-request pin

{
  "model": "qwen4-max",
  "provider": "sigma",
  "messages": [
    { "role": "user", "content": "Hello" }
  ]
}

This request stays on sigma even if another provider is healthier.

To pin a provider for every request, save it from the dashboard or the models page while signed in. Saved pins apply to your browser-session requests until you change or remove them, and a per-request pin always wins over a saved pin. Your linked Logfare account is one of the providers you can pin — more on that in Bring your own Logfare capacity.

Staying on one provider

Pinning is a choice about a vendor. Affinity is a choice about a conversation. Every response carries an opaque id; echo it back as previous_response_id on the next request and the gateway keeps you on the same provider.

Affinity echo

{
  "model": "auto:fast",
  "previous_response_id": "fglr_...",
  "messages": [
    { "role": "user", "content": "Continue where we left off." }
  ]
}

The id comes from the previous response; the tier can stay auto:fast.

The reason is cache locality. Providers cache the prefix of a conversation, so a follow-up that lands on the same provider reuses that cache instead of re-processing the whole history. Affinity works with the routing tiers too: you keep the size you asked for and the provider you started on, without naming a vendor.

Failover and circuit breakers

Providers refuse requests, drop connections and go down. When the chosen target fails before a stream opens, the gateway tries the next healthy target in the pool instead of failing your call. That is failover: one request, several chances, same wire format back to you.

A circuit breaker keeps failover from turning into a queue of doomed attempts. A provider that keeps failing trips its breaker and is taken out of rotation for a cooldown, so new requests stop being sent into a broken upstream. When the provider answers again, traffic returns to it. You do not configure any of this; it is how the pool stays usable.

429 upstream
The provider's Retry-After window is honored; the gateway routes around it until the window passes.
Mid-stream failure
A terminal error chunk with finish_reason: "error", then the stream closes. Never a silent truncation.
All routes down
A 503 whose message says what happened and when to retry.

The full error contract, with the exact chunk shapes, is in the docs.

Health from real traffic

All of the above reads from one source: the outcomes of real routed requests. Foglare does not run synthetic probes against providers and call that uptime. Every request the gateway forwards records its status and latency, and those records become the per-model and per-provider status, 24-hour and 7-day uptime, latency figures and half-hour history strip on the models page.

It also means the numbers describe what you will actually get: capacity that is failing real requests is marked down and the aliases route away from it. Check the models page before relying on a specific model, or send a tier and let the gateway pick healthy capacity for you. The request records behind these figures include the full prompt and response content, stored unredacted and kept indefinitely, as the privacy policy describes.

Tiers in the docs