Cloudflare’s Auto Router Rates Each Request for Stakes, from the Most Recent Turns
Cloudflare has released Auto Router in public beta through AI Gateway, picking a model per request from a classifier that scores complexity, ambiguity, stakes and context dependence. Cloudflare’s own benchmark puts it ten points below Claude Opus 5.5 on success rate at a third of the cost, and practitioners have…

Cloudflare recently released Auto Router in public beta through AI Gateway. Set the model to cloudflare/auto, and a classifier picks one per request. The most useful thing in the announcement is a benchmark where Cloudflare’s own router loses.
Routing runs in two stages. AI Gateway first builds a candidate pool, filtering models that cannot serve the request format and applying credentials, billing configuration, access control, and spend limits. A multi-head classification model then runs on Workers AI across Cloudflare’s edge GPUs, assigning probabilities across 14 task categories and rating the request 1 to 5 on four dimensions: complexity, ambiguity, stakes, and dependence on earlier context. A scoring matrix combines those with benchmark results, under the stated formula "utility = expected quality - adaptive cost penalty."
The Auto Router classifies each request from the newest turns only, capped at 8 KiB of text, then scores candidate models on strength by task and expected gain on harder work, with price weighted less as difficulty rises. (Source: Cloudflare blog post)
Jacques B, a CTO working on agentic engineering, named the measure that matters in a LinkedIn post by Cloudflare:
A cheaper model isn’t much of a saving if someone has to spend another hour fixing the result.
Cloudflare published exactly that number. Across 97 tasks with three samples per model and 10,000 bootstrap resamples:
Ten points of reliability for roughly a third of the spend. Teams get to decide which side of that they are on, which is more than most routing products make possible.
The classification itself drew the sharpest practitioner response. Igor Pyrin, a tech lead who has worked on banking and healthcare platforms, noted that stakes are scored from a compact view favoring recent turns:
In a long agent session, the user may say "this is a customer refund" early and later just say "go ahead." I’d carry an application-owned risk label across turns and use it to decide whether the request can use cloudflare/auto at all. A short final instruction should not silently lower the risk classification of the underlying action.
The turn that commits the action is the cheapest-looking turn in the conversation.
Two things the documentation adds. The response carries cf-aig-routed-model and cf-aig-routing-reason, with values like cost_optimal_within_pool and pinned_by_turn, so the choice is auditable after the fact. And the pool is restrictable per request through cf-aig-allowed-models and cf-aig-allowed-providers headers, though not as saved routing profiles, which is what Adam Natad asked for in the launch thread.
Worth checking before trusting the figures: the default pool today lists Claude Opus 5, Sonnet 5 and Fable 5 alongside GPT-5.6 Luna, Sol and Terra, and Grok 4.5. Opus 5.5 and GPT-6 Sol, the two baselines in the table, sit in the opt-in list reachable only through those headers. Cloudflare says the pool "may change over time," so this may be drift rather than design, but a team reproducing the benchmark should confirm what its gateway actually selects.
Session handling carries a cost too. Without a session ID, requests in the same conversation may land on different models and cannot reuse the prompt cache. Cloudflare applies a switching penalty that grows with context length for the same reason, since a new model may redo reasoning tokens at output prices.
On Reddit, commenter reachjalil rejected the premise outright, arguing auto routers "end up costing you more for less intelligence" and that a capable model is cheaper if outcomes matter. Commenter yangqi answered that the unit should be the task, not the request. reachjalil’s follow-up landed on something Cloudflare concedes: classification is itself easier for a large model, and the weights go stale "especially with the constantly changing models." The post says routing weights come from benchmark results, so new models have to be added to the scoring matrix by hand.
Auto Router is free during the beta, with no pricing stated for afterward. WebSockets are unsupported, leaving Chat Completions and the Responses API.
Also on the roadmap is cloudflare/auto-best, same classifier and pool, selecting highest expected quality with no cost tradeoff.
منتشرشده در
InfoQ
ادامه مطالعه



