Dashboard
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
51 small wins to finish your pathNext question →

Q7EasyConcept

What is an LLM gateway, and why do companies build or buy one?

30-second answerSay your answer out loud first, then reveal.
Three apps call one LLM gateway, which holds auth and team quotas, routing and fallbacks, a cache, PII and allowed-model policy, and logging with cost attribution, in front of Provider A, Provider B and self-hosted vLLM.

Key capabilities

  1. Unified interface (often OpenAI-compatible) across providers.
  2. Reliability: retries with backoff, failover to another provider or region, circuit breakers, timeouts.
  3. Governance: which teams can use which models; data policies (no sensitive data to certain providers).
  4. Cost control: per-team budgets, alerts, chargeback reports.
  5. Observability: a central log of prompts and responses (with redaction), latency, errors.
  6. Caching and routing (Q6, Q8).
  7. Secrets: apps never hold provider keys directly.

Options: open-source (LiteLLM, Portkey, Kong / Envoy AI gateway plugins), cloud-native gateways, or in-house.

Trade-offs: an extra network hop (a few ms), a single point of failure (so make it highly available), and a feature lag when providers ship new API features.

You understood something today that you didn't yesterday.