Inside the ModelPlane routing engine

Every LLM request your app sends is a bet: that the provider you hard-coded will be up, fast, and cheap enough. That bet is why routing layers exist. But a routing layer only helps if it's fast, reliable, and transparent enough to sit on every single call you make. This post walks through exactly what happens inside the ModelPlane routing engine from the moment your request hits the gateway to the moment tokens come back — and why the design keeps accounting off the hot path.

The request lifecycle: auth, resolve, gate, route, account

A single request through ModelPlane passes through five distinct stages. Understanding them matters because each one is a place where a naive gateway either slows you down, leaks credentials, or drops usage data.

Authentication — the gateway resolves your Bearer gw-* key into a tenant context.