Guozhen AIGlobal AI field notes and model intelligence
Back to AI decision guides

AI operations

LLM gateway comparison: LiteLLM vs Portkey vs OpenRouter vs Vercel AI Gateway

Compare LLM gateways for unified model access, routing, fallbacks, budgets, observability, provider keys, self-hosting, and production AI operations.

Updated 2026-06-119 min readAdvanced

Best for

  • Teams using multiple model providers
  • Products needing fallbacks, retries, budgets, and usage monitoring
  • Developers centralizing API keys and model access
  • AI platforms standardizing model routing for many apps

Not for

  • Simple prototypes calling one provider directly
  • Teams without observability or model evaluation discipline
  • Adding another network hop without a clear operational reason

Comparison

Choose by workflow, not brand

OptionBest forStrengthsTradeoffsUse when
LiteLLMSelf-hosted or team-controlled OpenAI-compatible gateway workflowsOpen-source gateway/proxy posture with many provider integrations.Your team owns deployment, upgrades, and operational reliability when self-hosted.You want unified provider access with more control over infrastructure.
PortkeyEnterprise gateway, observability, retries, fallbacks, governance, and security controlsGateway plus production controls and visibility for GenAI apps.Platform fit depends on compliance, pricing, and whether its control plane matches your architecture.You want a managed production AI gateway with enterprise operations features.
OpenRouterAccessing many models through a unified API with automatic fallbacks and provider breadthFast path to model variety and OpenAI-compatible integration patterns.Less ideal when you need full internal control over provider contracts or data paths.Model exploration and multi-provider access are more important than self-hosting.
Vercel AI GatewayVercel and web app teams that want unified model access, budgets, monitoring, and fallbacksTight fit with Vercel AI SDK and web application deployment.Best fit is strongest when your application stack already lives near Vercel.You build AI web apps and want gateway behavior inside the Vercel ecosystem.

Why gateways appear

Most teams start by calling one model directly. Gateways appear when the product needs provider switching, fallbacks, cost controls, centralized keys, rate limits, audit logs, or model experiments across many applications.

  • Add a gateway when routing becomes shared infrastructure.
  • Keep simple apps direct until the gateway solves a real problem.
  • Define model routing rules in code or configuration, not tribal memory.

What to evaluate

A gateway is production infrastructure. Compare uptime, latency overhead, supported providers, retry behavior, budget controls, observability, data handling, key management, and export paths.

  • Measure p95 and p99 latency with and without the gateway.
  • Test fallback behavior during provider errors.
  • Confirm how prompts, responses, and logs are stored or redacted.

Gateway versus observability

Some gateways include observability; some observability platforms can proxy requests. Decide whether you need routing first, tracing first, or a combined control plane.

  • Use observability when debugging quality is the main issue.
  • Use gateways when model routing and budgets are the main issue.
  • Use both only when ownership and data flow are clear.

Decision Rules

A practical checklist

01

Use LiteLLM when self-hosted control and provider compatibility matter.

02

Use Portkey when enterprise gateway controls and observability are central.

03

Use OpenRouter when broad model access and fast experimentation matter.

04

Use Vercel AI Gateway when your AI app stack is already Vercel-centered.

Related Guides

Continue the decision path

Chinese Archive

Aligned deeper reading

Topic Hubs

Explore the wider search cluster

Industry Pages

See this guide in a buyer workflow

FAQ

Common questions

What is an LLM gateway?

An LLM gateway is a routing layer between your app and model providers. It can centralize keys, budgets, retries, fallbacks, logging, and provider switching.

Do I need an LLM gateway?

Use one when multiple apps or providers need shared controls. For a small prototype calling one model, direct API access can be simpler.

Is a gateway the same as observability?

No. A gateway routes and controls requests. Observability explains what happened. Some platforms combine both, but the jobs are different.

Source Links

Primary references used for this guide

Build your own evaluation note

The strongest decision is always local to your workflow. Save the vendor links, define a representative task, record the exact prompt or command, and compare the final evidence instead of the marketing claim.

Return to the AI learning map