MikhbarMIKHBAR
Artificial Intelligence

Cloudflare Releases AI Gateway Auto Router in Public Beta

Cloudflare has introduced its Auto Router feature in public beta via AI Gateway, aiming to help organizations automatically optimize their AI expenditures.

Cloudflare Releases AI Gateway Auto Router in Public Beta

Introduction to Cloudflare Auto Router

Cloudflare has announced the public beta release of its Auto Router feature, integrated directly into AI Gateway. By setting the model configuration to cloudflare/auto, organizations can allow the system to automatically route each incoming request to a model capable of handling the task without forcing end users to manually select a model for every query.

According to the company, early internal deployment results utilizing the Auto Router via the OpenCode harness demonstrated cost savings of up to 30% compared to relying exclusively on frontier models like OpenAI Sol and Anthropic Claude Opus. These savings allow organizations to reduce overall expenses while preserving access to higher-tier models when complex tasks demand them.

Cut your AI spend with AI Gateway's Auto Router
Image related to the report from Cloudflare Blog · Source: Cloudflare Blog

Managing Enterprise AI Spend

As companies formalize their adoption of artificial intelligence tools for agentic coding, non-technical workflows, and deployed agents, managing token spend becomes a primary objective. While methods like setting budgets and tracking usage via identity-aware analytics provide visibility and guardrails, they traditionally rely on individual users to make cost-conscious choices request by request.

The Auto Router functions as a control plane step forward, ensuring that the gateway itself makes intelligent routing decisions on the user's behalf. Developers and organizations can review additional information and developer documentation to integrate these routing capabilities into their workflows effectively.

How the Edge-Deployed Classifier Works

When a request is submitted to cloudflare/auto, AI Gateway builds a pool of models capable of serving the request. It filters out options that do not support the required format or execution mode, while accounting for credentials, billing configurations, access control policies, spend limits, and provider health.

The remaining conversation context is analyzed by a multi-head classification model running on Workers AI and deployed on GPUs across Cloudflare's edge network. The classifier assigns probabilities across fourteen distinct task categories—such as coding, planning, and research—while rating the request across four core dimensions: complexity, ambiguity, stakes, and dependence on earlier context.

Cloudflare Releases AI Gateway Auto Router in Public Beta
Image related to the report from Cloudflare Blog · Source: Cloudflare Blog

Balancing Quality, Price, and Caching

A specialized scoring matrix combines the classification signals with model benchmark results to estimate how well each candidate model fits the given request. The system then weighs the expected output quality against input and output token prices. For straightforward requests, price carries heavier weight, allowing smaller, capable models to handle the workload.

During extended agentic sessions like software debugging and coding, trajectory costs are influenced heavily by cache reads and writes rather than just list prices. The Auto Router accounts for these caching dynamics across turns, preventing unnecessary cache discards while retaining efficiency over longer user sessions.

Sources

Continue chronologically

Related entity coverage