InfoQ

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

8.5内容质量
Cloudflare’s Auto Router Rates Each Request for Stakes, from the Most Recent Turns

TL;DR · AI 摘要

Cloudflare Auto Router通过AI评估请求风险和成本,优化模型选择,提升路由效率。

核心要点

  • Auto Router使用四维评分(复杂度/歧义/风险/上下文依赖)和14个任务分类进行模型选择
  • 实验显示可靠性提升10点时成本降低约三分之一
  • 评分公式为utility = expected quality - adaptive cost penalty

结构提纲

按章节快速跳转。

  1. 介绍Cloudflare Auto Router的公开测试和核心价值主张

  2. AI Gateway构建候选池并进行多头分类模型评分

  3. 四维评分体系与成本效益公式utility = expected quality - adaptive cost penalty

  4. 97个任务测试显示可靠性提升10点对应成本降低三分之一

  5. 行业专家指出近期对话上下文风险评估的局限性

  6. 响应头包含路由决策依据便于事后审计

思维导图

用一张图看清主题之间的关系。

查看大纲文本(无障碍 / 无 JS 友好)
  • Cloudflare Auto Router
    • 核心机制
      • 候选池构建
      • 多头分类模型
      • 四维评分体系
    • 关键特性
      • 动态成本效益公式
      • 可审计路由决策
      • 上下文风险评估

金句 / Highlights

值得收藏与分享的关键句。

#Cloudflare#AI路由#OpenTelemetry#模型选择
打开原文

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

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

Cloud

Scaling OpenTelemetry: Managing Collectors, Configuration, and Cost (Webinar Nov 19th)

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

Oct 26, 2026 3 min read

by

  • Steef-Jan Wiggers

#### Follow us on

Youtube

232K Followers

Linkedin

26K Followers

Instagram

New

RSS

19K Readers

X

57.1k Followers

Facebook

21K Likes

Bluesky

Listen to this article -

0:00

Audio ready to play

Your browser does not support the audio element.

Normal

1.25x

1.5x

Like

new dropdown rading list

  • Reading list

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.

main wrapper for authors section

About the Author

section title

main wrapper for each author

#### Steef-Jan Wiggers

Show more

Show less

#### This content is in the Cloud topic

##### Related Topics:

  • Development
  • Architecture & Design
  • DevOps
  • AI, ML & Data Engineering
  • Cloud
  • Cloudflare
  • Related Editorial
  • Related Sponsors The Practical Agentic Coding Playbook
  • Related Sponsor Automated code transformation at scale. Fix vulnerabilities, migrate frameworks, and modernize legacy code across every repo. Try Moderne Free .

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.