Lab: The model gateway, wired to a registry
Module 7 · Lab · About 60 minutes · Needs: lessons 1 to 4 of this module, and the Module 6 lab (or nothing: Step 1 rebuilds Modules 1 to 6)
What you are building
Funmi wants every model call to go through one door that knows which models Northdesk has pinned, what they cost, when they retire and where each tenant's data may go. This lab puts the four lessons' files into the repository unchanged and adds northdesk/model_registry.py, the gateway wired to it, northdesk/requestpath.py (the 22 September replay and the request path figure) and tests/test_gateway.py. ADR-004 records the decision.
One rule changes. Lesson 2's chain let US tenants fall back to the Gemini Developer API, which Module 2's residency.py fails for every tenant, US included. The registry allows Groq (retention off) or degraded mode, nothing else; Step 4 measures the first design's mistake.
One cell calls your provider; every number quoted comes from a scripted stand-in or no model. Open a new Colab notebook, module-07-lab.ipynb, and run each cell in order.