Routing Rules
Live
Routing flow
Mirrors the request handler in apps/backend/src/routes/ai.ts
Incoming POST /v1/ai→Auth: Bearer token check→Resolve route (model or task)→Budget pre-flight + cost cap→Call provider→Fallback on ProviderError→Log + 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.