# Cloudflare launches Auto Router beta to pick AI models per request

> The new Auto Router in Cloudflare AI Gateway rates each request on complexity, ambiguity, stakes and context, then selects a model from a rotating pool.

Oossa · 2026-10-26 · https://oossa.com/en/cloudflare-launches-auto-router-beta-to-pick-ai-models-per-request

Cloudflare has put Auto Router into public beta through its AI Gateway. Users set the model to `cloudflare/auto` and a built‑in classifier decides which model should answer each request. The routing runs in two steps. First, AI Gateway builds a candidate pool, removing models that can’t handle the request format or that fail credential, billing or access checks. Then a multi‑head classification model runs on Workers AI at the edge, scoring the request on four dimensions – complexity, ambiguity, stakes and dependence on earlier context – and assigning it a rating from 1 to 5.

The classifier looks only at the newest turn of the conversation, up to 8 KiB of text. After scoring, the system combines the ratings with benchmark results using the formula “utility = expected quality – adaptive cost penalty.” The result is a model choice that tries to balance quality against price, giving higher weight to harder tasks.

## What the benchmark shows

In Cloudflare’s own benchmark across 97 tasks, the Auto Router achieved a ten‑point reliability gain for roughly a third of the spend compared with using a single cheaper model. The company reports that teams can decide whether to prioritize cost or reliability, something most routing products do not expose. The default model pool includes Claude Opus 5, Sonnet 5, Fable 5, GPT‑5.6 Luna, Sol and Terra, and Grok 4.5. Higher‑tier models like Opus 5.5 and GPT‑6 Sol are only reachable through special request headers.

## How it works in practice

Each response carries two headers – `cf-aig-routed-model` and `cf-aig-routing-reason` – so developers can audit why a model was chosen. The pool can be narrowed per request with the `cf-aig-allowed-models` and `cf-aig-allowed-providers` headers, though saved routing profiles are not yet supported. Without a session ID, consecutive turns may be sent to different models, losing the prompt cache and incurring a “switching penalty” that grows with context length.

Auto Router is free while in beta, and Cloudflare has not announced pricing for later. The feature currently supports Chat Completions and the Responses API but not WebSockets. A future variant called `cloudflare/auto-best` will select the model with the highest expected quality without applying a cost penalty.

## The facts

- Cloudflare released Auto Router in public beta on its AI Gateway as of October 2026.
- The classifier evaluates each request on four dimensions – complexity, ambiguity, stakes and context dependence – and rates them 1‑5.
- The benchmark covered 97 tasks, three samples per model and 10,000 bootstrap resamples, showing a ten‑point reliability gain for about a third of the spend.
- The default model pool includes Claude Opus 5, Sonnet 5, Fable 5, GPT‑5.6 Luna, Sol, Terra and Grok 4.5; higher‑tier models require special headers.
- Auto Router is free during the beta and currently works with Chat Completions and the Responses API only.

## Why it matters

For developers building AI‑driven apps, Auto Router can automatically match each request to a model that balances cost and performance, potentially lowering cloud bills while keeping output quality steady. However, because routing decisions are made per turn and can change without a session ID, teams need to design their APIs to preserve context if they want consistent model behavior.

## Sources & references

1. [Cloudflare’s Auto Router Rates Each Request for Stakes, from the Most Recent Turns](https://www.infoq.com/news/2026/10/cloudflare-auto-router/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=AI%2C+ML+%26+Data+Engineering) – InfoQ, 2026-10-26

Last updated: 2026-10-26
