Cut your AI spend with AI Gateway's Auto Router

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
- Introducing Clef-omni with full multimodality, plus a faster Clef and a cheaper Clef-flash
- Introducing Web Search API via AI Gateway
- Introducing Clef: our open-source decision models, and new RL fine-tuning platform
- One year later: Sovereign AI and the fight for choice
- AI Search is now generally available