The problem it solves
When you have local models, frontier APIs, long tasks, private content, and limited budgets, always calling the same model is poor architecture. A router chooses the path before spending tokens or exposing data.
Minimum layers
- Task classifier: code, summary, translation, RAG, reasoning, extraction, or creative generation.
- Privacy policy: what data may leave and what must stay local.
- Budget: maximum cost per user, task, course, or pipeline.
- Fallbacks: what to do when a model fails, latency rises, or quality drops.
- Observability: traces, scores, selected model, cost, latency, and routing reason.
request -> classify -> policy -> route -> model -> score -> log -> improve
Aulafy rule
The router must explain why it chose a route. If you cannot audit the decision, you do not know whether you are saving money, protecting privacy, or silently making content worse.