Cloudflare

Cut your AI spend with AI Gateway's Auto Router

Sep 30, 2026Ming Lu, Andreas Jansson, Harrison Harnisch
Cut your AI spend with AI Gateway's Auto Router
SummaryAI, from the source post

Introduced the Auto Router feature for AI Gateway, enabling intelligent routing of AI requests to the most capable and cost-effective model. This feature uses a multi-head classification model running on Workers AI to assess task categories and request dimensions (complexity, ambiguity, stakes, context dependence). It then combines these signals with model benchmark results and token prices to calculate utility and select the optimal model, aiming to reduce AI spend by up to 30% while maintaining comparable performance to frontier models. The router also accounts for cache read/write costs and model switching penalties. The post details the two-stage architecture (classifier and scoring matrix) and its benefits for legibility and adaptability. Future plans include expanding model support, zero-data-retention, provider capacity accounting, and reasoning level selection.

More from the Artificial Intelligence Integration & Impact trail