Track 09 · Systems & unit costLesson 06 of 11
Routing models to fund the rollout
Send the easy majority to cheaper models, with fallbacks and cost controls.
- Lesson library · reference
- 30 min read
- 75 min hands-on
- Pro
What you'll be able to do
01- You can explain what a model gateway centralises and how it differs from the Week 04 agent gateway.
- You can choose between hosted, self-hosted and cloud-native gateways for a customer's security and residency posture.
- You can design a routing policy that sends each intent to the cheapest eval-approved model, with fallbacks that are eval-approved, schema-compatible and residency-eligible.
- You can implement circuit breakers, per-tenant budgets and a residency filter, and test them offline.
- You can defend the policy to a model-risk reviewer and a CFO.
Before you start
- Choosing a model you can defend and Typed output: schemas, validation and tool calls
- Retries, fallbacks and failing gracefully (breaker mechanics)
- A gateway for bursty agent traffic
- Regression tests and CI gates (the eval gate that admits models to a chain)
- Cost per resolved case
The short version
A model gateway is one internal endpoint every agent calls instead of calling providers directly. It holds provider keys, picks the model and provider per request, fails over on rate limits, errors and timeouts, enforces per-tenant budgets, keeps inference in permitted regions and emits the cost record finance needs. The savings come from routing: most enterprise traffic is easy, and a small model that passed the eval for that intent serves it far more cheaply. The discipline is that every fallback is a production model: same eval, same schema, same residency rule as the primary.
- Route by eval evidence: an intent moves to a cheaper tier only after it clears that intent's eval.
- Filter (residency, eval approval, schema) before you rank (price, latency, health).
- Reserve budget before each attempt; at the soft limit stop escalation, at the hard limit degrade to humans, never to silence.
- Partition caches by tenant and permission scope; keep semantic caching to non-personalised content.
- Record the model that actually served each attempt.
Pro lesson
The rest of this lesson is in Pro.
The mental model, worked example, field note, failure table, exercise and self-check, with the voice tutor.
- Every stage and specialisation, in full
- Every lab and every role project
- Halden weeks 2–10, on your record
- Every drill, live in the playground
- All solutions, plus the server judge
- Lab Assistant and every Teach with AI