Respan vs LiteLLM in 2026: Should You Switch From LiteLLM?
Updated November 25, 2026
Respan and LiteLLM both put many LLM providers behind one OpenAI-compatible API, so your code calls one endpoint and the gateway handles each provider on the other side. Where they part ways is in who runs that gateway and what you pay for the tokens that pass through it.
LiteLLM is an MIT-licensed proxy and Python SDK that you host yourself, with your own provider keys and your own database behind it. Respan (formerly Keywords AI) is an open-source AI gateway: one API for 1,000+ models, with every call traced in Respan. You can run its gateway yourself or use it managed, and on Respan credits it charges no fee and passes bulk token rates through.
The two also share some history, since Respan ran on LiteLLM for two years before building its own gateway. For teams already running the LiteLLM proxy, Respan vs LiteLLM comes down to whether switching from LiteLLM is worth the lower token bill and the built-in tracing.
Respan vs LiteLLM at a glance
Respan and LiteLLM price the same tokens differently. LiteLLM's open-source proxy is free, but you pay provider list prices through your own keys and run the infrastructure yourself, while Respan charges a 0% fee and passes on bulk rates of up to 55% off per token on Respan credits, with the discount varying by model.
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.
| Respan | LiteLLM | |
|---|---|---|
| Best for | Production agents watching token costs | Teams wanting full self-hosted control |
| What it is | Open-source AI gateway | Open-source proxy and SDK |
| Runtime | Rust | Python, Rust core in beta |
| License | MIT or Apache-2.0 (gateway) | MIT (open-source tier) |
| Token pricing | Up to 55% off on credits | Provider list prices |
| Hosting | Self-hosted or managed | Self-hosted only |
| Models and providers | 1,000+ models | 140+ providers |
| What you run | One binary, or nothing | Proxy, Postgres, Redis |
| Tracing and evals | Built in | Via callbacks to other tools |
| Free tier | 100k logs, 4,200 requests/min | Free forever, self-hosted |
| Uptime SLA | 99.99% on Team | Custom, on Enterprise |
Pricing: what you run and what you pay
Both gateways send your calls to the same providers at per-token rates, so the cost difference comes from the rate you pay per token and from what you have to run to get it.
What LiteLLM costs
LiteLLM splits its proxy into a free open-source tier and a paid Enterprise license:
- Open source - Free forever and MIT-licensed, with 140+ providers, virtual keys, budgets, teams, load balancing, rate limits, guardrails, and logging to tools like Langfuse and LangSmith.
- Enterprise - Adds SSO, audit logs, JWT auth, RBAC, SCIM, and support with custom SLAs, with pricing on request.
LiteLLM charges nothing per token, but your calls run at provider list prices on your own keys, and the proxy runs on your servers, so infrastructure and the engineering time to keep it running are part of what it costs you.
What Respan costs
Respan charges a 0% fee on Respan credits and passes bulk provider rates on, so per-token prices run up to 55% below list depending on the model. The model catalog shows the current discount for each one, and the plans on Respan's pricing page pay for capacity and the platform around the gateway:
- Free - $0, with 100k logs and 4,200 gateway requests a minute.
- Team - $199/month billed yearly ($249 monthly), with 8,400 gateway requests a minute, bring-your-own-key support, 10k eval scores, and a 99.99% uptime SLA.
- Enterprise - Custom pricing, with the option to self-host the full platform.
Respan's open-source gateway is also free to self-host, like LiteLLM's proxy. If you keep your own provider keys on the managed gateway, that traffic bills to your provider account at list price, since Respan's discounts apply to traffic on Respan credits.
Takeaway: LiteLLM is free software with list-price tokens and infrastructure you run yourself, while Respan's gateway is free to self-host too and, on Respan credits, takes no fee and cuts token prices by up to 55% depending on the model.
Speed and gateway overhead
Gateway overhead is small next to model response times, but it adds up at high concurrency and in agent loops that make many calls per task, which is where the difference between these two shows up.
Respan's open-source gateway is a single Rust binary, and its README reports these Respan-run benchmarks against the LiteLLM Python proxy running one worker:
- Added latency (median) - 0.07 ms for Respan, 4.34 ms for LiteLLM.
- Throughput - 56,734 requests per second for Respan, 268 for LiteLLM.
- Memory - 31 MB for Respan, 418 MB for LiteLLM.
Production LiteLLM deployments usually run more than one worker, which raises its throughput along with its memory use. The managed Respan gateway adds 0.07 ms median server-side overhead, with 50 to 150 ms observed end to end.
LiteLLM is also moving its gateway to Rust. In its own Rust benchmark, the Rust path adds about 0.05 ms per request at 6,782 requests per second and 31.7 MB of memory, against about 7.5 ms, 453 requests per second, and 358.9 MB for the Python path. That Rust core is a beta that's off by default, with requests it can't handle yet falling back to Python, according to The New Stack. Because each vendor ran its own harness, the two sets of numbers don't compare directly.
Takeaway: On the LiteLLM Python proxy most teams run today, Respan's gateway adds far less overhead per request, while LiteLLM's Rust beta narrows that gap once it covers the routes you use, so test both on your own traffic.
Running it in production
Self-hosting a gateway means owning its uptime, its upgrades, and the dependencies it pulls in, and the two differ in how much of that you take on.
A production LiteLLM proxy needs more than the proxy itself. LiteLLM's production docs name PostgreSQL as the primary database for production and call for Redis 7.0 or newer as soon as you run more than one proxy instance, with worker counts tuned to where you deploy it. Because the proxy ships as a Python package, you also own dependency pinning and upgrade review, which became a live concern for LiteLLM users after this year's two supply chain compromises. Respan's own team ran into the upgrade side of this, too: a routine LiteLLM upgrade in January 2026 caused intermittent connection failures they never traced to a cause.
Whether that work is worth carrying is the core of the LLM gateway vs LiteLLM question, and Respan gives you two ways out of it:
- Managed - Respan's AI gateway runs as a service, so there's no proxy, database, or cache for you to operate.
- Self-hosted - The open-source gateway runs as one binary, and it refuses to start on a public address without client keys, so nobody who can reach it can spend your provider keys.
The open-source gateway has its own tradeoff, however. Its plugins are compiled into the binary, so adding a custom plugin means writing Rust and rebuilding, where LiteLLM lets you add Python callbacks and hooks.
Takeaway: LiteLLM asks you to run the proxy, Postgres, and Redis and to manage its upgrades, while Respan lets you hand all of that off to the managed gateway or run a single binary, at the cost of writing custom plugins in Rust.
Tracing, evals, and spend control
Both gateways track spend and log requests, so the question is where the traces and quality scores end up and how many tools that takes.
LiteLLM's proxy covers the spend side well: virtual keys scoped to users and teams, budgets, RPM and TPM limits, spend tracking, and an admin dashboard. For traces, it sends logs through callbacks to tools like Langfuse, Arize Phoenix, LangSmith, or any OpenTelemetry backend, so trace views and output scoring live in whichever of those you connect.
In Respan, every request through the gateway is already a trace, with latency and cost attached, so there's no second integration to set up:
- Tracing - Every LLM call, tool run, and agent step becomes a span in one trace, with its own input, output, latency, and cost.
- Evals - The same evaluators score a test set before you ship and live production traffic after.
- Spend limits - Soft and hard caps per key, per customer, or org-wide, where the hard cap blocks requests at the ceiling instead of only sending a warning.
- Cost by customer - Spend, requests, and tokens broken down per end user.
- Monitors - Alerts to Slack, email, or a webhook when cost, errors, or latency cross a threshold.
Takeaway: LiteLLM handles keys and budgets in the proxy and hands traces to a separate tool, while Respan keeps the trace, the eval score, and the spend cap on the same request.
How to switch from LiteLLM to Respan
Both gateways use the OpenAI-compatible API, so most of a migration is changing where your code sends requests. You don't have to move everything at once, and the steps below start with tracing before moving traffic one service at a time.
1. Trace your LiteLLM calls in Respan
If your app calls models through the LiteLLM Python SDK, Respan's LiteLLM integration adds a callback that sends every call to Respan as a span, while requests still go directly to your providers. Install the packages:
pip install respan-ai respan-instrumentation-litellm litellmThen register the instrumentor before your first call:
import os
import litellm
from respan import Respan
from respan_instrumentation_litellm import LiteLLMInstrumentor
respan = Respan(
api_key=os.environ["RESPAN_API_KEY"],
app_name="litellm-service",
instrumentations=[LiteLLMInstrumentor()],
)Your existing litellm.completion and litellm.acompletion calls now show up on Respan's Traces page, which gives you a cost and latency baseline before you move any traffic.
2. Point one service at Respan's gateway
Create an API key under Gateway › API keys in Respan, then pick a non-critical service and swap its base URL and key:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://gateway.respan.ai",
api_key=os.environ["RESPAN_API_KEY"],
)
response = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Hello!"}],
)Model names come from Respan's model catalog without a vendor prefix, so a LiteLLM model string like openai/gpt-5.5 becomes gpt-5.5. Run the service on Respan alongside the proxy for a while and compare cost, latency, and errors.
3. Recreate keys, budgets, and fallbacks
LiteLLM's virtual keys and budgets map to settings in Respan's dashboard:
- Per key - Open the key under API keys to set requests and tokens per minute, a lifetime cost cap, or recurring cost, request, or token caps per minute, hour, day, week, or month.
- Per customer - Tag requests with a customer identifier, then set a default monthly budget and rate limit for all customers, or a period budget for one customer.
- Soft or hard - An alert threshold lets the request through and sends an alert, while a block threshold returns a 429 until the window resets.
- Fallbacks - Define the fallback model chain once, so traffic moves to the next model when a provider errors or rate-limits.
4. Move the rest and retire the proxy
Shift the remaining services the same way, one at a time. Once nothing calls the proxy, you can shut down LiteLLM along with the Postgres database and Redis cache it ran on.
Custom logic is the part to plan for. LiteLLM's Python callbacks and hooks don't carry over, so each one either maps to a built-in Respan feature, such as spend limits, PII redaction, or caching, or becomes a Rust plugin if you self-host the open-source gateway.
Takeaway: You can trace LiteLLM calls in Respan before moving any traffic, then switch one service at a time by changing its base URL and key, with custom Python callbacks as the main piece to rework.
Recent changes
- October 2026 - LiteLLM had its second compromise of the year, when malicious releases of v1.107.0 were published to PyPI and container registries after maintainer accounts were taken over.
- October 2026 - Respan released its open-source Rust gateway, after two years of building on LiteLLM and an upgrade that caused connection failures it never traced, as The New Stack reported.
- June 2026 - LiteLLM laid out its plan to move its gateway to Rust, and the Rust core is now in beta, off by default, with unsupported routes falling back to Python.
- March 2026 - Malicious LiteLLM versions 1.82.7 and 1.82.8 were published to PyPI in a supply chain attack that began with a compromised security scanner in LiteLLM's CI pipeline.
Takeaway: Both projects moved toward Rust this year, while LiteLLM's two supply chain compromises put the security of self-hosted Python dependencies in front of teams running the proxy.
Which to choose
Both gateways can run inside your own infrastructure, so the choice comes down to what you want to operate, what you pay per token, and where your custom logic lives.
Choose LiteLLM if
- You want a free, self-hosted proxy with team controls - Virtual keys, budgets, teams, and rate limits all come in the open-source tier.
- Your custom logic is in Python - Callbacks and hooks let you change routing and guardrails without compiling anything.
- You already run an observability tool - Callbacks send logs to Langfuse, LangSmith, Arize Phoenix, or any OpenTelemetry backend.
- Your setup is stable and your token spend is small - Moving gateways takes work that may not pay back at low volume.
- You'd rather not run Postgres and Redis alongside the proxy once you scale past one instance.
- You want traces and eval scores in the same product as the gateway.
- You need SSO and audit logs without an Enterprise license.
If you're leaving LiteLLM and want to compare more than these two, the wider set of LiteLLM alternatives covers gateways built around other priorities.
Choose Respan if
- Your token bill has grown - A 0% fee and discounts of up to 55% per token on Respan credits replace provider list prices.
- You want to stop operating the proxy - The managed gateway takes the proxy, database, and cache off your plate.
- You want each call traced, scored, and capped - Tracing, evals, and hard spend limits sit on the same request as the routing.
- You want self-hosting in one binary - The open-source gateway runs on your infrastructure for free.
- You need an SLA without an Enterprise contract - The Team plan includes a 99.99% uptime SLA.
- You want to bring your own provider keys on the Free plan, since BYOK starts on Team and Respan's token discounts apply only to traffic on Respan credits.
- Your custom gateway logic has to stay in Python, since the open-source gateway's plugins are written in Rust.
- You need to self-host the full platform, including evals and dashboards, without an Enterprise plan.
Takeaway: LiteLLM fits teams that want a free proxy they control in Python and already have an observability stack, and Respan fits teams that want lower token prices, less to operate, and every call traced.
Frequently asked questions
On token costs, usually yes when you use Respan credits. LiteLLM's proxy is free, but your calls run at provider list prices on your own keys, while Respan charges a 0% fee and passes on discounts of up to 55% per token depending on the model. Running LiteLLM also means paying for the servers, Postgres, and Redis behind it, while Respan's managed gateway starts on a $0 Free plan.
In Respan's own benchmark, its open-source Rust gateway adds 0.07 ms median latency, against 4.34 ms for the LiteLLM Python proxy running one worker. LiteLLM is moving its gateway to Rust, and its own benchmark puts the Rust path at about 0.05 ms per request, but that core is a beta that's off by default. Each vendor ran its own harness, so it's worth testing both on your traffic.
Yes. Respan's open-source gateway is free to self-host under an MIT or Apache-2.0 license and runs as one binary, and its Respan plugin can send every request to the hosted platform as a trace. Self-hosting the full Respan platform, including evals and dashboards, is available on Enterprise.
Yes, for its first two years. Respan wrote more than 100,000 lines of wrapper code around LiteLLM before a January 2026 upgrade caused intermittent connection failures, and in October 2026 it released its own open-source gateway written in Rust.
Yes, through Respan's LiteLLM integration for the Python SDK. A callback sends each LiteLLM call to Respan as a span while requests still go directly to your providers, so you can trace your current setup before moving any traffic.