Skip to content
LLMFLUX

Guides

Model routing

How the model field is resolved, and what happens when an upstream provider has a problem.

Choosing a model

Send a model id from GET /v1/models as the model field. That list is the source of truth for what your key can use. An unknown model returns 404 invalid_model.

The auto alias

model: "auto" resolves to the catalogue's configured auto entry. If none is configured, it resolves to the first enabled model. It is a fixed catalogue mapping, not a per-request quality prediction.

curl https://api.llmflux.dev/v1/chat/completions \
  -H "Authorization: Bearer $LLMFLUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "auto", "messages": [{ "role": "user", "content": "Hello" }] }'

Aliases

Administrators can give a model a public alias. When one is set, /v1/models shows the alias, and either the alias or the underlying id is accepted in requests.

Provider failover

Behind the gateway, providers are grouped by priority tier (higher first). Inside a tier, providers are ordered by weighted random choice, so equal-priority providers share load. If a provider fails, the gateway tries the next candidate. A provider that has failed is taken out of rotation for a 60 second cooldown.

Provider error text is never returned to you. Failures are mapped to gateway errors such as 502 upstream_error or 504 gateway_timeout.