Cloudflare put Auto Router into public beta through AI Gateway (blog 2026-09-30): set model to cloudflare/auto and the gateway picks a model capable enough for the request so callers need not choose manually (blog, docs).
The story is per-request routing on the same Gateway control plane, not a new budgets or limits feature.
How routing works
Gateway builds an eligible pool (request format/inputs, credentials, billing, spend limits; unhealthy providers dropped). A Workers AI multi-head classifier scores 14 task categories plus four 1–5 dimensions (complexity, ambiguity, stakes, context dependence); a scoring matrix ranks quality vs price (utility = expected quality − adaptive cost penalty). Top model is tried first, with fallback if the provider cannot serve (blog, docs).
Enable path
Unified OpenAI-compatible Chat Completions (and Responses API): send model: "cloudflare/auto" to the gateway compat endpoint. Response headers include cf-aig-routed-model, cf-aig-routing-reason, and cf-aig-routing-decision-id. WebSockets API is not yet supported (docs).
For agent/coding turns, cf-aig-session-id pins the model for a turn (user message + tool follow-ups) to keep prompt cache hot; optional cf-aig-turn-id / cf-aig-no-session-affinity. Narrow the pool with cf-aig-allowed-models / cf-aig-allowed-providers. Clients such as OpenCode can send session IDs automatically; docs ship an opencode.json + @cloudflare/aig-opencode-plugin path (docs).
Default pool (docs; may change): includes Anthropic Claude Fable/Opus/Sonnet 5, OpenAI GPT-5.6 Luna/Sol/Terra, xAI Grok 4.5; additional models (Workers AI, Alibaba, Fireworks, etc.) only when allow-listed. Specific SKUs should not be treated as permanent defaults.
Pricing (beta)
Blog: “The Auto Router is free while in beta.” Upstream inference is still billed per provider/gateway usage as usual, so not all token spend is free (blog). No GA date or post-beta Auto Router fee is given.
CF-internal results (vendor claims)
All figures below are Cloudflare-internal / self-reported—not independent validation (blog):
- Early internal OpenCode harness: up to ~30% cost savings vs frontier-only (OpenAI Sol / Anthropic Claude Opus).
- Internal general knowledge-work table (291 trials):
cloudflare/auto86.6% success / $2.10 total vs Opus 5.5 96.6% / $5.91 and GPT-6 Sol 84.2% / $2.64.
Roadmap teases (not shipping)
Near-term plans called out on the blog include expanding models, ZDR filtering, provider capacity, reasoning-level selection, fuller Responses/WebSockets support, and a future cloudflare/auto-best (quality without cost tradeoff)—roadmap only, not GA claims (blog).
Who should care
Teams already on AI Gateway who want coding-agent / org traffic off a permanent Opus default should start at the Auto Router blog and docs.

The Campfire
CommentsThanks. Your comment is waiting for the desk. Once it is approved it appears here within about a minute.
Add a comment