Routing runs in two stages. AI Gateway first filters a candidate pool by request format, credentials, billing, access control and spend limits. A classification model running on Workers AI then scores each request across 14 task categories and rates it from 1 to 5 on complexity, ambiguity, stakes and dependence on earlier context, and a scoring matrix combines those ratings with benchmark results.
The classifier reads only the newest turns, capped at 8 KiB of text. Cloudflare says it tested the approach on 97 tasks with three samples per model and 10,000 bootstrap resamples.
Responses include cf-aig-routed-model and cf-aig-routing-reason headers so each choice can be audited later. The cf-aig-allowed-models and cf-aig-allowed-providers headers restrict the pool per request. Auto Router is free during the beta with no post-beta pricing stated, and WebSockets are not supported.
Why it matters if you build agents
Teams testing cloudflare/auto should log the routed model from each response and check which models the default pool contains, since the two baseline models sit in an opt-in list. Without a session ID, turns in one conversation can switch models and lose prompt caching, so long agent sessions should pin one. Because stakes are scored mostly from recent turns, applications may need their own risk labels that persist across the whole session.
Get stories like this every weekday
One short email with the day's agent tooling news.