- Context
- Teams would otherwise hold provider keys, pick models by name and log differently. Cost, scanning and provider changes would be solved many times, badly.
- Decision
- Applications call the gateway with a project key and a model alias. The gateway routes, retries, falls back, enforces budgets and rate limits, attaches metadata, applies guardrails and logs every call. Provider keys exist only in the gateway.
- Consequences
- One place to change a model or provider, validated by the evaluation set.
- Budgets and guardrails apply by default.
- The gateway is a critical dependency with its own availability target.
- Alternatives considered
- Direct provider SDKs (Software Development Kits) in each service (rejected: key sprawl, no shared controls)
- A shared client library only (rejected: controls can be bypassed)