LLM gateway
Definition
An LLM gateway is a proxy that gives applications one internal API for language models and centrally handles provider credentials, routing between models and deployments, failover, per-team limits, caching and usage accounting.
In practice
Calling providers directly couples every application to one provider's availability, keys and API shape. A gateway routes each request to a healthy model or deployment with quota left, fails over when a provider errors or returns 429, enforces per-team token quotas so one noisy team cannot starve the rest, and records tokens and cost per caller. Model aliases let teams switch versions without code changes.
Fallback is not free: the backup model may be slower, behave differently or score lower on evals, and it only works if the survivors have quota for the failed share. Health checks do not catch rate limiting, because a throttled provider is healthy. Every call passes through the gateway, so it must be run as critical, redundant infrastructure.
Example
Requests to alias chat-default go to the primary deployment; when it returns 429, the gateway retries once on a second region, and team search is capped at 200,000 tokens per minute.