Cloudflare has released Auto Router in public beta, a feature of AI Gateway that picks the language model best suited to each individual request. Set the model to cloudflare/auto and a classifier decides which model to use, request by request. The most interesting point of the announcement is a benchmark in which Cloudflare's own router does not come out on top.

Psst!Add AlexTech.ai asPreferred Source on Google

The system works in two stages. First, AI Gateway builds a pool of candidate models, excluding those that cannot handle the request format and applying credentials, billing configuration, access control and spend limits. Then a multi-head classification model, running on Workers AI across Cloudflare's edge GPUs, assigns probabilities across 14 task categories and rates the request from 1 to 5 on four dimensions: complexity, ambiguity, stakes and dependence on earlier context. A scoring matrix combines these with benchmark results under the stated formula "utility = expected quality - adaptive cost penalty".

The classifier looks only at the most recent turns of a conversation, capped at 8 KiB of text, and scores candidate models by their strength on each task type and by the expected gain on harder work; as difficulty rises, price counts for less. In a benchmark published by Cloudflare, across 97 tasks with three samples per model, the router delivers about ten points less reliability than Claude Opus 5.5 on success rate, for roughly a third of the spend, according to the company, and not independently verified.

Image: Cloudflare Blog — https://blog.cloudflare.com/auto-router

The classification drew the sharpest response from practitioners. Igor Pyrin, a tech lead with experience on banking and healthcare platforms, notes that stakes are scored mainly from recent turns: in a long agent session, a user may say early "this is a customer refund" and later only "go ahead". He suggests carrying an application-owned risk label across all turns.

Auto Router answers with two headers, cf-aig-routed-model and cf-aig-routing-reason, which report the chosen model and the reason, so each decision can be audited afterward. The pool can be restricted per request through the cf-aig-allowed-models and cf-aig-allowed-providers headers, but saved routing profiles do not yet exist.

Session handling carries a cost too. Without a session identifier, requests in the same conversation may land on different models and cannot reuse the prompt cache. The documentation says the cf-aig-session-id header keeps the same model for an entire turn, so caching can be exploited. On Reddit, one commenter argued that automatic routers end up costing more for less intelligence.

The feature is free during the beta, with no pricing stated for afterward. WebSockets are not supported, leaving Chat Completions and the Responses API. A roadmap item, cloudflare/auto-best, uses the same classifier but selects only for highest quality, with no cost tradeoff.