AI & ML Advanced By Samson Tanimawo, PhD Published Sep 8, 2026 5 min read

LLM Gateway Design

An LLM gateway sits between your app and the providers. Routing, caching, fallback, observability, and cost control all live here. Building one is a weekend; not having one is a year of small fires.

What it does

A single endpoint your app calls. The gateway routes to the right provider/model, caches when possible, falls over when a provider is down, logs everything for billing and audit, enforces rate limits and budgets.

OSS options

Must-have features

Build vs buy

For early stage: LiteLLM as a library, no gateway. For multi-team, multi-app: stand up a gateway service (LiteLLM proxy or Portkey). For enterprise: managed gateway with audit and compliance features.

Most teams need the gateway by their second app. Plan for it on day one.