Providers
Choose which LLM providers AllModels may use and control their routing order.
Every model is backed by one or more providers. AllModels can select a provider automatically, or you can control the eligible providers and their order. The response includes a top-level provider field naming the provider that served it.
Open a model in the LLM model catalog to see its current provider IDs, pricing, and supported input modalities.
The same provider controls work on the Responses API and Chat Completions:
{
"provider": {
"order": ["FIRST_PROVIDER_ID", "SECOND_PROVIDER_ID"],
"allow_fallbacks": true
}
}The provider object is consumed by AllModels and is not forwarded upstream.
Provider options
| Option | Type | Behavior |
|---|---|---|
order | string[] | Tries these provider IDs first, in order. Other eligible providers may follow unless allow_fallbacks is false. |
only | string[] | Restricts the request to these providers. |
ignore | string[] | Excludes these providers from the request. |
allow_fallbacks | boolean | Defaults to true. Set it to false to try only providers named in order, or only the first eligible provider when order is absent. |
sort | "price" or { "by": "price" } | Sorts eligible providers by charged input price, then output price. Equal-price routes keep their normal order. Other sort modes are accepted but have no effect. |
max_price | { "prompt"?: number, "completion"?: number } | Excludes providers above either supplied price. Rates are non-negative USD per 1 million tokens and include the AllModels margin. |
Provider IDs are case-insensitive. A malformed option returns 400 invalid_request on provider; preferences that exclude every provider return 404 no_matching_provider.
Common routing patterns
Prefer providers in order, then allow any remaining eligible provider:
{
"provider": {
"order": ["FIRST_PROVIDER_ID", "SECOND_PROVIDER_ID"]
}
}Use only one provider:
{
"provider": {
"only": ["YOUR_PROVIDER_ID"],
"allow_fallbacks": false
}
}Choose the cheapest eligible provider under a price ceiling:
{
"provider": {
"sort": "price",
"max_price": {
"prompt": 1,
"completion": 3
}
}
}Exclude a provider while preserving the remaining routing order:
{
"provider": {
"ignore": ["PROVIDER_ID_TO_SKIP"]
}
}Input modalities
Input modality is part of provider selection. A model may be available from several providers even though only some of them support image input.
If a request contains an image and the selected provider does not support images, allow_fallbacks: true lets AllModels fall back to another eligible provider that does. If fallbacks are disabled and the permitted providers cannot accept the input, the request returns 400 unsupported_input_modality.
Use the selected model's page in the LLM model catalog to find providers that support the modalities your application sends.
OpenRouter compatibility fields
The router accepts additional OpenRouter provider fields so compatible clients do not fail validation. These fields currently have no effect:
zdrdata_collectionquantizationsrequire_parameters- Throughput preferences
- Latency preferences
In max_price, only prompt and completion are used. request and image are ignored.
See Failover for the conditions that advance a request to another provider.
