The Alternatives Issue For tool owners Sign in

LLM gateway

An LLM gateway is the proxy layer between your app and one-or-many LLM providers — handles routing, fallback, caching, cost tracking, rate limiting, and observability. OpenRouter, LiteLLM, Portkey, Helicone, Cloudflare AI Gateway are 2026 leaders.

In more detail

What it means

Calling LLM APIs directly works for prototypes. Production apps quickly need: model fallback when the primary errors, request caching for repeat prompts, per-team cost caps, audit logs for compliance, rate limiting against runaway loops, multi-vendor routing for cost or quality. An LLM gateway centralizes all of this — the app talks to one OpenAI-compatible endpoint, the gateway handles the rest. Trade-offs: hosted gateways (OpenRouter, Portkey) are zero-ops but add latency + margin; self-host (LiteLLM) gives full control + lower cost but operational burden; SDK-only (Vercel AI SDK) avoids the proxy but loses central governance. Most production AI stacks above small scale have an LLM gateway.

Part 1 of 2

When to use it, and when not

Use it for

  • Any production AI app at non-trivial scale.

Part 2 of 2

Common mistakes

  • Putting the gateway on a slow region — adds latency to every LLM call.
  • No fallback configured — primary outage takes down your app.

FAQ

Questions readers ask.

What is llm gateway?

An LLM gateway is the proxy layer between your app and one-or-many LLM providers — handles routing, fallback, caching, cost tracking, rate limiting, and observability. OpenRouter, LiteLLM, Portkey, Helicone, Cloudflare AI Gateway are 2026 leaders.

When should you use llm gateway?

Any production AI app at non-trivial scale.

What are the common mistakes with llm gateway?

Putting the gateway on a slow region — adds latency to every LLM call. No fallback configured — primary outage takes down your app.

Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/llm-gateway.md. Found a mistake? Tell us.