Two gates out of the sandbox: one for tools, one for models
Tools and models are governed separately because they fail differently. Tools change the world and are tiered and reversible in git. Models cost money and leak data, so they get an allowlist, a token budget and a caller identity that ties every request to a run.
Principle honored
Never-persisted credentials. Modelplane's gateway supports per-caller API keys, but a key per run is a persisted secret; its "behind another gateway" mode trusts an x-modelplane-caller header instead.
What changes
The model proxy authenticates the run by TokenReview and sets x-modelplane-caller to the session id.
The inference gateway is reachable only from the proxy, so nothing else can set that header.
Modelplane stamps the caller on its usage records but advertises no usage caps or token metering, so budgets stay in the proxy.
Unverified
Unverified: what Modelplane's usage records contain (tokens, latency, model), and whether they can be joined to task_id. Read a real record before promising cost attribution.