Skip to main content
<- Articles

LLM Gateway vs LiteLLM

LiteLLM's proxy handles multi-provider routing. A full LLM gateway adds tracing, evals, cost per customer, and an uptime SLA. Here's where each one fits and when to move.

Dylan Cable · May 23, 2026 · Updated November 24, 2026 · 9 min read

Respan Gateway: up to 40% off tokens on Gemini, GPT, Claude and 1,000+ more models. One API key, 0% fee.

LiteLLM is an open-source Python library and proxy that puts 140+ LLM providers behind one OpenAI-compatible API, and you run it yourself. A full LLM gateway handles the same routing and adds tracing, evals, per-customer cost tracking, and an uptime SLA, either managed or self-hosted.

LiteLLM is enough while you mainly need multi-provider calls with retries and your team is comfortable running a Python service. Once cost per customer, live quality scoring, or gateway uptime becomes someone's job, a full gateway saves you building those pieces around LiteLLM yourself.

Below is how an LLM gateway and LiteLLM compare in 2026, and the signals that tell you which one you need.

LLM gateway vs LiteLLM at a glance

Disclosure: Respan, which publishes this guide, makes one of the products below. We tried to place it only where it is a strong fit, and we list its limitations the same way we list everyone else's.

LiteLLM proxyRespan open-source gatewayRespan managed gateway
Best forPython teams, self-hostedSelf-hosted, low overheadTracing, evals, lower token cost
Runs onYour infrastructureYour infrastructureRespan's cloud
Token priceYour provider ratesYour provider ratesUp to 55% off on credits
FeeFree OSS; Enterprise customFree (MIT or Apache-2.0)0% fee; plans from $0
Added latency (p50)4.34 ms (1 worker)0.07 ms0.07 ms server-side
Tracing and evalsVia a tracing integrationVia the Respan pluginBuilt in
Uptime SLAYours to runYours to run99.99% on Team and Enterprise

What LiteLLM is

LiteLLM is two things packaged together. The Python library (pip install litellm) translates OpenAI-format calls to 140+ providers, by LiteLLM's own count, so your application code doesn't need a different SDK for each one.

The proxy server runs as a separate service, usually a Docker container, and your app calls it at an OpenAI-compatible endpoint. On top of the library, it adds:

  • Load balancing across deployments of the same model
  • Retries and provider fallbacks
  • Virtual API keys with per-key budgets and rate limits
  • Cost tracking, logs, and basic dashboards

The proxy is what teams usually mean when they say they use LiteLLM as their gateway, and it's the part compared here.

What a full LLM gateway adds

A full gateway does the same routing and connects it to what happens after the call:

  • Traces, not just call logs - Each model call is a span inside the agent or RAG run that made it, so you can find the step behind a bad answer instead of joining logs by hand.
  • Prompt management - Prompts live in a versioned registry, so a prompt change ships without a redeploy and rolls back the same way.
  • Online evals - A sampled share of production traffic is scored automatically, with the scores attached to the same traces.
  • Cost per customer - Spend by customer and feature is a query, not a data project.
  • Caching next to spend - Exact-match and provider prompt caching, with hit rates on the same dashboard as cost.
  • An uptime SLA - A managed gateway comes with one, while a self-hosted proxy has the uptime your team can give it.

LiteLLM's proxy covers the routing layer, and the pieces above are what teams end up building around it as traffic and features grow.

When LiteLLM is enough

LiteLLM's proxy is the simpler choice when all of these hold:

  1. You mainly need calls across several providers, with retries and fallbacks.
  2. Your team can run a Python service in production without it becoming a distraction.
  3. Per-call logs answer your debugging questions.
  4. Nobody needs cost by customer or a prompt registry outside the codebase.
  5. You're fine owning the proxy's uptime, upgrades, and security patches.

If all five are true, point your code at the proxy and move on.

When a full gateway is the right call

A full gateway starts paying for itself when any of these become true:

  1. Cost is a per-customer question - Someone needs spend by customer or feature, and the answer can't wait on an export.
  2. You run many LLM features - Prompt versions spread across the codebase cost engineering time that a registry saves.
  3. You want evals on production traffic - Online scoring needs the gateway to sample requests and store scores on the same traces.
  4. Limits change by customer tier - Static virtual keys cover a fixed budget, while tier-aware limits need the gateway to know who the customer is.
  5. Your platform team is small - The gateway sits in the hot path, and a managed one moves its uptime to the vendor.
  6. You debug multi-step agents - Reading a long agent run as one trace tree is faster than piecing together per-call logs.

One of these is usually enough reason to look, and two or three make the case.

How Respan compares to LiteLLM

Respan (formerly Keywords AI) is an open-source AI gateway: one API for 1,000+ models, with every call traced in Respan. Against LiteLLM, the differences come down to four things:

  • Token price - LiteLLM passes your provider's rates through. Respan charges a 0% fee and passes bulk rates on, so tokens bought through Respan credits cost up to 55% less than list price, depending on the model.
  • Speed - In Respan-run benchmarks published in the respan-gateway README, Respan's open-source gateway handled about 56,734 requests per second at 0.07 ms median added latency, against 268 requests per second and 4.34 ms for LiteLLM with one worker. Production LiteLLM deployments usually run more than one worker, so test on your own traffic.
  • Codebase - Respan's gateway is its own Rust codebase, a single binary under MIT or Apache-2.0, and doesn't run LiteLLM. You can self-host it for free, and its Respan plugin sends each request to the hosted platform as a trace.
  • What sits around the routing - On the managed gateway, every call is traced, priced per customer, and scored on live traffic, with prompt management and monitors in the same platform. LiteLLM's proxy logs each call and leaves tracing and evals to a separate tool.
Respan is not ideal if
  • You want to run the whole Respan platform (dashboard, evals, prompts) on your own servers. On Free and Team the platform runs in Respan's cloud, and self-hosting it is Enterprise only. The open-source gateway is free to self-host on any plan.
  • You'll push more than 8,400 gateway requests a minute on a self-serve plan. Higher throughput is on Enterprise.
  • You only want to route on your own provider keys. Respan's token discounts apply to Respan credits, not to bring-your-own-key traffic.

Pricing: Free is $0 with 100k logs and 4,200 gateway requests a minute. Team is $199/month billed yearly ($249 monthly), adding bring-your-own-key support, 8,400 requests a minute, and a 99.99% uptime SLA. Enterprise is custom and adds SAML SSO and the option to run the full platform on your own servers. Plan details are on Respan's pricing page, and each model's current discount is listed in Respan's model catalog.

Where LiteLLM falls short

LiteLLM's proxy handles routing well, and its limits show up around security, speed at volume, and what happens after the call. Supply-chain risk is usually the first one teams weigh: compromised LiteLLM releases reached PyPI in March 2026 (1.82.7 and 1.82.8) and October 2026 (1.107.0), and LiteLLM rotated its image-signing key after the October incident. A pip-installed proxy inherits the security of its whole build chain, which is a large part of why teams compare LiteLLM alternatives.

LiteLLM is not ideal if
  • You don't want to own a security-sensitive component, since running it safely means pinning versions, verifying signatures, and planning secret rotation.
  • You run high-throughput agent loops, where a Python proxy's added latency starts to show.
  • You want traces of multi-step agent runs without connecting a separate tracing tool.
  • You need SSO, RBAC, or audit logs without an Enterprise license.

A migration path from LiteLLM

A gateway usually isn't needed on day one. While you're prototyping, calling provider SDKs directly is the fastest path, and once a few LLM features are live, LiteLLM's proxy or Respan's open-source gateway adds multi-provider calls, retries, and basic logs.

The move to a managed gateway tends to come when agents and RAG pipelines reach production and calls need to be traced and scored on live traffic. LiteLLM library calls can stay in your code at that point, since the managed gateway speaks the same OpenAI-compatible format. By the time you're running a multi-tenant product, cost per customer, tier-aware limits, and evals on production traffic are requirements rather than extras.

Because both sides speak the OpenAI format, each switch is a change of base URL and API key, and the old and new paths can run side by side until every call goes through the gateway.

FAQ

Is LiteLLM good?

Yes, for what it's built to do. LiteLLM's open-source proxy puts 140+ providers behind one OpenAI-compatible API with retries, budgets, and virtual keys, free under MIT. Teams tend to outgrow it when they need traces of agent runs, evals on production traffic, or a gateway they don't have to secure and run themselves.

What's the difference between a managed AI gateway and LiteLLM?

LiteLLM is a proxy you host and operate. A managed AI gateway like Respan runs the same routing as a service and adds tracing, evals, cost per customer, and an uptime SLA, and Respan also discounts tokens up to 55% on Respan credits, depending on the model, with a 0% fee.

Is Respan a fork of LiteLLM?

No. Respan's gateway is its own Rust codebase and doesn't run LiteLLM. The open-source version, respan-gateway, is a single binary under MIT or Apache-2.0.

Can I self-host a gateway instead of LiteLLM?

Yes. Respan's open-source gateway is free to self-host as a single binary, and Bifrost and Agent Router are other self-hosted options. The full Respan platform, with tracing, evals, and prompts, self-hosts on the Enterprise plan, while Free and Team run in Respan's cloud.

Can I keep LiteLLM and add a gateway alongside?

Yes, and teams often do during a transition. Point your existing LiteLLM client at the gateway's OpenAI-compatible endpoint, then retire the proxy once every call goes through the gateway.

Related articles

Built for AI agents.
Break less.
Ship more.