ENF News Bot
Automated News Bot
- Joined
- Apr 15, 2022
- Messages
- 4,541
AI Gateway now supports multi-provider routing. When it is on, a request for a model can go to any provider that serves that model. For example, a request for a Claude model can go to Anthropic or to Google Vertex AI.
Starting December 9, 2026, multi-provider routing is on by default for new gateways. Gateways created before then keep using the providers they use today until you turn the setting on.
To turn on multi-provider routing for an existing gateway, go to your gateway's Settings and turn on Multi-Provider Routing. To use the API, set
When the setting is off, you can still choose a provider for a single request. Name the provider in the
With this release, more models are available from alternate providers on gateways with multi-provider routing:
More models and providers are on the way.
You can also control which provider AI Gateway tries first for a model. Set the
For example,
The provider order is a preference. It does not remove providers from the pool, and it does not add providers that the gateway does not allow. AI Gateway can still choose a different provider if the preferred one is unhealthy.
For more information, refer to Multi-provider routing.
Continue reading...
Starting December 9, 2026, multi-provider routing is on by default for new gateways. Gateways created before then keep using the providers they use today until you turn the setting on.
To turn on multi-provider routing for an existing gateway, go to your gateway's Settings and turn on Multi-Provider Routing. To use the API, set
multiprovider_enabled to true in the request body of a PUT request to update the gateway:
Code:
{
"multiprovider_enabled": true
}
When the setting is off, you can still choose a provider for a single request. Name the provider in the
cf-aig-allowed-providers header. Model aliases can use every provider whether the setting is on or off.With this release, more models are available from alternate providers on gateways with multi-provider routing:
openai/gpt-oss-20b↗︎ andalibaba/qwen3.8-27b↗︎ on Groq.- Anthropic Claude models ↗︎ on Google Vertex AI.
- Google Gemini models ↗︎ on Google AI Studio.
moonshotai/kimi-k3↗︎ anddeepseek-ai/deepseek-v4.1-flash-1017↗︎ on Fireworks.
More models and providers are on the way.
Set the provider order
https://developers.cloudflare.com/changelog/rss/#set-the-provider-orderYou can also control which provider AI Gateway tries first for a model. Set the
cf-aig-provider-order header to list the providers to try first. Set the cf-aig-provider-sort header to price to order the remaining providers by their input and output token price.For example,
anthropic/claude-haiku-5.5 ↗︎ is available from Anthropic and Google Vertex AI. On a gateway with multi-provider routing on, this request tries Google Vertex AI first, and falls back to Anthropic:
Code:
curl "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/messages" \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--header "cf-aig-provider-order: google-vertex-ai" \
--data '{
"model": "anthropic/claude-haiku-5.5",
"messages": [{ "role": "user", "content": "Reply with a short greeting." }],
"max_tokens": 128
}'
The provider order is a preference. It does not remove providers from the pool, and it does not add providers that the gateway does not allow. AI Gateway can still choose a different provider if the preferred one is unhealthy.
For more information, refer to Multi-provider routing.
Continue reading...