Routing Rules

Live
Routing flow
Mirrors the request handler in apps/backend/src/routes/ai.ts
Incoming POST /v1/aiAuth: Bearer token checkResolve route (model or task)Budget pre-flight + cost capCall providerFallback on ProviderErrorLog + debit budget
Routing rules
When `model` is `auto`, the rule with the matching task type and the lowest priority is used.
No routing rules yet — add one to enable auto-routing.