cd /news/ai-infrastructure/cloudflares-auto-router-rates-each-r… · home › topics › ai-infrastructure › article
[ARTICLE · art-157861] src=infoq.com ↗ pub= topic=ai-infrastructure verified=true sentiment=· neutral

Cloudflare’s Auto Router Rates Each Request for Stakes, from the Most Recent Turns

Cloudflare released Auto Router in public beta through AI Gateway, letting developers set the model to cloudflare/auto so a classifier picks a model per request, with routing decisions exposed via the cf-aig-routed-model and cf-aig-routing-reason response headers. Cloudflare's benchmark across 97 tasks with three samples per model and 10,000 bootstrap resamples found the router trades about ten points of reliability for roughly a third of the spend, and the classifier rates each request 1 to 5 on complexity, ambiguity, stakes and dependence on earlier context using only the newest turns, capped at 8 KiB of text. Practitioners flagged that scoring stakes from recent turns can let a short final instruction like "go ahead" silently lower the risk classification of an underlying action such as a customer refund, and that the default pool lists Claude Opus 5, Sonnet 5, Fable 5, GPT-5.6 Luna, Sol and Terra, and Grok 4.5, while benchmark baselines Opus 5.5 and GPT-6 Sol sit in an opt-in list reachable only through the cf-aig-allowed-models and cf-aig-allowed-providers headers.

by read3 min views3 publishedOct 26, 2026
Cloudflare’s Auto Router Rates Each Request for Stakes, from the Most Recent Turns
Image: source

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.

── more in #ai-infrastructure 4 stories · sorted by recency
── more on @cloudflare 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/cloudflares-auto-rou…] indexed:0 read:3min 2026-10-26 · —