Blog
2 min read

Cloudflare AI Gateway Auto Router: Let the Gateway Pick the Model

Cloudflare's AI Gateway Auto Router, announced in Birthday Week 2026 and free in beta, classifies each request at the edge and routes it to a suitable model — cheap models for simple tasks, frontier models for hard ones — by setting the model to cloudflare/auto. How it works, the savings claims, and the trade-offs of automatic model routing.

Picking a model per request is one of the biggest levers on an AI bill: a classification task doesn't need a frontier model, but a hard reasoning task does. Cloudflare's AI Gateway Auto Router, announced on 30 September 2026, tries to make that choice automatically. (What Is an LLM?)

How it works

You send requests through Cloudflare AI Gateway and set the model to cloudflare/auto. Cloudflare's announcement says it classifies each request at the edge and routes it to a suitable model to reduce cost. Coverage of the launch describes the process as:

  1. Filter the pool of models to those that support the request format, are healthy, and aren't blocked by your organisation's policies or budgets.
  2. Classify the conversation with a model running on Workers AI into task categories such as coding, planning, research and data analysis.
  3. Choose the model expected to complete the task most cheaply overall — counting the tokens it's likely to need, not just its per-token price — with session affinity for multi-turn conversations so context isn't rebuilt (and re-cached) on a different model each turn.

It's free during the beta. Cloudflare also launched User Insights, which reports on task fit and model overuse, and a Web Search API through AI Gateway.

The savings claims

Cloudflare has cited internal savings of up to around 30% versus sending everything to frontier models; other reported figures vary. Treat them as vendor claims until you measure your own traffic. (Evaluate LLM Outputs)

The trade-offs

  • Less predictability. The same request might be answered by different models on different days. That complicates debugging, evals and reproducibility.
  • Provider-specific features. Prompt caching, structured output, thinking settings and tool formats differ between providers and models. Routing works best when your requests use features every candidate supports. (Structured Output From LLMs, Prompt Caching Explained)
  • Data paths. Requests may go to several providers; check each one's data terms for sensitive content.
  • Another hop and another dependency in your request path.

Do you need a router?

Often, a simple manual routing rule gets most of the benefit: use a small, cheap model (Claude Haiku 5.5 is $0.10 per million input tokens) for classification, extraction and summaries, and a larger model only for the hard paths. Combine with caching and the Batch API for non-urgent work. (Claude Haiku 5.5 Released, Claude Message Batches API)

An automatic router makes more sense when traffic is varied and unpredictable, or when you're already using AI Gateway for logging, caching and rate limiting. (What Is OpenRouter?)

Source: Cloudflare Birthday Week 2026 wrap-up


EasySpawn gives your AI app a server-side backend where model routing, caching and per-user limits are code you control, with Claude Code to build them. See how it works or join the waitlist.

Related: OpenAI API vs Claude API · Opus vs Sonnet vs Haiku · Stop Bots Running Up Your AI Bill · Cloudflare Birthday Week 2026

Keep reading