Cloudflare Auto Router: cost-aware model routing with cache-aware switching
- Source
- blog.cloudflare.com
- Author
- Cloudflare
- Date

Context
Cloudflare's Auto Router, released in public beta on September 30, picks a model for each request so that people do not have to. An application sets its model to cloudflare/auto in AI Gateway, the Cloudflare service that an organization's AI requests already pass through, and the router sends each request to a model it judges capable enough for the task, according to Cloudflare's launch post. The aim is cost: Cloudflare argues that people often leave a top model selected for work like summarizing an email.
The choice is made in stages. AI Gateway first drops models that cannot serve the request, that the gateway's credentials, access policies or spend limits rule out, or whose providers are down. A classifier then reads the most recent part of the conversation, assigns probabilities across 14 task categories, and rates complexity, ambiguity, stakes and dependence on earlier on a scale of one to five. A scoring matrix combines those ratings with model results to estimate each candidate's expected quality, and the router subtracts a cost penalty that weighs heavily on simple requests and shrinks as difficulty rises. A smaller model can win easy work, and stronger models get more room on hard work.
The cache-aware switching in the headline handles a cost that list prices miss. In long coding or debugging sessions, Cloudflare says, cost is driven less by a model's list price than by reading back the cached conversation, which grows with session length. Switching models throws that cache away, and the new model has to take in the whole context again at full cost. The router therefore avoids switching within a turn, and between turns it applies a penalty that grows with the context already built up, so a switch has to earn back that rewrite through better results or cheaper cache rates.
Cloudflare's own benchmark shows a trade-off. On its internal knowledge-work test, 97 tasks using simulated email, calendar, Slack, file, travel and finance tools, each run three times per model, cloudflare/auto succeeded in 86.6% of trials for $2.10 in total. OpenAI's GPT-6 Sol succeeded in 84.2% for $2.64, and Anthropic's Claude Opus 5.5 in 96.6% for $5.91. Cloudflare calls this similar performance at 80% of Sol's cost and 35% of Opus's. Against Sol that holds, and the reported confidence ranges for the two overlap; against Opus, the router was far cheaper but completed fewer tasks. These are Cloudflare's results on a benchmark it built, and its separate figure of savings of up to 30% comes from its own internal use through OpenCode.
- context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
- benchmark — A standard public test set for comparing AI models — the shared scoreboards behind every "model X beats model Y" claim.
Checking sign-in…
Loading comments…






