As of November 2, 2026, pick LiteLLM if you can run a gateway yourself: it is free MIT software with no token fee, but you operate PostgreSQL and Redis and pin versions after the 1.107.0 compromise. Pick OpenRouter for zero operations: 5.5% on credit purchases (8% on Business), no markup on tokens. You can also run both, since LiteLLM lists OpenRouter as a provider.
The 1.107.0 part is new. On October 21, 2026, a compromised LiteLLM release was published to PyPI and shipped through the official container images (Microsoft). Per ClickPy data cited by Wiz, it was downloaded roughly 49,000 times.
The real choice is who runs the gateway
In our view, the decision comes down to one question: do you want to operate a piece of infrastructure that holds every provider key you own? Everything else (fees, latency, security exposure) follows from the answer. We cover the wider version of this choice in open source vs managed AI gateways.
| LiteLLM (open source) | OpenRouter | |
|---|---|---|
| What it is | Gateway software you deploy | Hosted API you call |
| License or fee | MIT, free in production | 5.5% on credit purchases, 8% on Business |
| Token markup | None (you pay providers directly) | None on per-token prices |
| Bring your own keys (BYOK) | Always your own keys | First $25,000 per month of list-price BYOK inference free on Standard and Business, then 5% |
| Model catalog | The providers you configure with your own keys (provider list) | 500+ models from 80+ providers, per OpenRouter's pricing page as captured on October 23, 2026 (usagepricing) |
| What you operate | PostgreSQL, Redis, Docker, upgrades | Nothing |
| Where provider keys live | In your LiteLLM proxy database | With BYOK, in your OpenRouter account settings |
| Prompt and data retention | Logs and spend records sit in your database, and each provider's own terms apply to the call | Zero data retention routing available (OpenRouter) |
| Paid tier | Enterprise: SSO, SCIM, audit logs, support, price not published | Business at 8%: EU or US in-region routing, no cross-region fallback |
| 2026 supply-chain exposure | Two incidents in 2026: 1.82.7 and 1.82.8 (March, PyPI), 1.107.0 (October, PyPI and Docker tags) | Hosted, so there is no gateway package for you to install or pin |
Sources: LiteLLM, OpenRouter's comparison post, OpenRouter pricing, OpenRouter Business, fees as checked on November 2, 2026.
The OpenRouter catalog number depends on how you count. OpenRouter's own routing post says 400+ models across 70+ providers, and an independent reviewer counted 464 entries across 67 publishers on the live API on October 28, 2026, with batch and free aliases counted separately (iadecider). If a specific model is the reason you are choosing, check it is listed before you commit.
Free software still has a bill
The LiteLLM gateway and SDK are MIT-licensed and free in production (LiteLLM). LiteLLM Enterprise is a paid annual license for SSO, SCIM, audit logs and support, and LiteLLM says its price depends on request capacity, installation architecture and support, never on tokens.
LiteLLM does not publish the Enterprise price. Third-party estimates circulate, some of them from competing gateway vendors, and a separate review notes LiteLLM's own pricing page does not list them. We would not budget on any of them; ask LiteLLM for a quote.
The bigger cost is operations. OpenRouter's own comparison puts it plainly: no platform fee, but you run PostgreSQL, Redis and Docker yourself.
Redis is not optional for long. LiteLLM's docs say it is highly recommended for any proxy running more than one worker process (LiteLLM Redis requirements). Without it, a 100 requests per minute limit across 4 workers lets through up to 400, and a revoked key stays usable on workers that did not process the revocation.
OpenRouter's fee is the opposite shape: no ops, a percentage of what you spend. The 5.5% is charged when you buy credits, and it rises to 8% on the Business tier. The extra 2.5 points buys EU or US in-region routing, with no cross-region fallback (OpenRouter pricing).
BYOK changes the math. On Standard and Business, OpenRouter includes $25,000 per month of list-price BYOK inference with no fee, then charges 5% above that (OpenRouter pricing). A team that routes its own provider keys through OpenRouter pays nothing until spend passes $25k a month.
Worked example: where self-hosting breaks even
Take a team deciding between the two. The question: at what monthly model spend does OpenRouter's fee cost more than running LiteLLM?
Our assumptions (Requesty calculations, change them to your numbers):
- A loaded engineer costs $180k per year, and LiteLLM takes a quarter of one engineer's time across deploys, upgrades, Redis and PostgreSQL care, key rotation and incident response. That is $3,750 per month.
- Hosting for the gateway, PostgreSQL and Redis costs ~$300 per month.
- Total self-hosting cost: ~$4,050 per month.
If all spend goes through credits at 5.5%, OpenRouter's fee matches that $4,050 at $4,050 / 0.055, or about $73,600 per month. At the 8% Business rate, break-even drops to about $50,600 per month. If instead all spend runs on your own keys, the fee is 5% of spend minus $25k, so break-even is $4,050 / 0.05 + $25,000, or about $106,000 per month.
| Scenario | OpenRouter fee | Break-even monthly model spend |
|---|---|---|
| All spend on credits, Standard | 5.5% | ~$73,600 |
| All spend on credits, Business | 8% | ~$50,600 |
| All spend on your own keys | 5% above $25k | ~$106,000 |
The ops estimate is the weakest input, so stress-test it. Even if we halve it to an eighth of an engineer ($1,875 plus $300 hosting), break-even on credits at 5.5% is still about $39,500 per month. If you double it (a half-time owner, for a security team that wants someone watching every release after October 21), it climbs to about $141,800 per month on credits.
At our base case, OpenRouter's 5.5% credit fee costs less than running LiteLLM until model spend passes about $73,600 a month, and a leaner or heavier ops estimate moves that line to anywhere between ~$39,500 and ~$141,800. Below the line, a percentage fee is cheaper than the people needed to run a gateway safely; above it, self-hosting pays for itself, if you have someone who wants the job.
What the 1.107.0 compromise changes
Running LiteLLM means you inherit its supply chain, and in 2026 that supply chain broke twice.
| March 2026 | October 2026 | |
|---|---|---|
| Versions | 1.82.7 and 1.82.8 on PyPI | 1.107.0 on PyPI and Docker |
| Entry point | Maintainer PyPI credentials, via a prior compromise of Trivy in LiteLLM's CI/CD (Snyk) | GitHub CLI OAuth tokens taken from logs of an internet-exposed internal LiteLLM deployment (LiteLLM) |
| Window | Live from 10:39 UTC on March 24 for about 40 minutes before PyPI quarantined it, with a wider "may be affected" window of 10:39 to 16:00 UTC (LiteLLM) | PyPI 11:39 to 13:23 UTC, Docker tags 11:46 to 14:20 UTC (LiteLLM) |
The March sources do not agree: Snyk puts the exposure at about 3 hours, so use LiteLLM's wider 10:39 to 16:00 UTC window when you check your own logs. Datadog ties the March release to a broader campaign against developer tooling.
For October, LiteLLM lists the affected Docker tags as v1.107.0, latest, main-latest and main-stable. It says all previous versions are safe and that customers on its private enterprise release were not hit. It had not yet confirmed how the attacker got into the internal deployment in the first place.
Two details from Microsoft's analysis should shape your view. First, your code did not need to import LiteLLM: starting Python in an affected environment could be enough to run the payload. Second, a separate module tried to read credential and model-configuration records from the LiteLLM proxy database. A gateway holds every provider key you have, which is exactly why it is worth attacking.
Scale makes this bigger than one project. Datadog puts litellm at about 23 million weekly downloads. Exposed admin panels are a separate risk on top of this one, which we covered in one in ten exposed LiteLLM gateways still answers to sk-1234.
Does this mean you should drop LiteLLM? We think not. For most teams the fix is version discipline, and LiteLLM's own response was clear about what to pin. What it does mean is that the ops line in the worked example above has a security component you cannot skip.
If you run LiteLLM today
0 of 5 done
Latency: who measured what
Both options add a hop. With LiteLLM the hop is inside your network, then the request goes out to the provider. With OpenRouter the request goes to OpenRouter's edge first, then to the provider. Either way, the provider call leaves your network, so a self-hosted gateway does not keep traffic strictly inside it.
Every overhead number we could trace to a named tester comes from a vendor, ourselves included, and no two of them use the same test.
| Figure | What it measures | Who measured it | Vendor or independent | Source |
|---|---|---|---|---|
| Requesty adds 16ms of overhead, OpenRouter adds 55ms, on agentic workloads | Gateway overhead, Requesty's own test | Requesty | Vendor (us) | Agentic routing, benchmarked |
| LiteLLM, 4 instances: 2 ms p50, 8 ms p95, 13 ms p99 gateway overhead at 1,170 requests per second | Proxy overhead against a mock OpenAI endpoint, PostgreSQL and Redis disabled | LiteLLM | Vendor | LiteLLM benchmarks |
| LiteLLM, 2 instances: 12 ms p50, 29 ms p95, 43 ms p99 gateway overhead at 1,035.7 requests per second | Same mock setup, worker count not recorded | LiteLLM | Vendor | LiteLLM benchmarks |
| OpenRouter: no millisecond figure, "designed to add minimal latency" | Design claim: Cloudflare Workers at the edge, edge caching of user and API key data | OpenRouter | Vendor | OpenRouter latency docs |
| OpenRouter on Claude Haiku 4.5: ~200 ms added to first token on credits, ~120 ms with own Anthropic key; GPT-4o mini within noise | Added time to first token on real Anthropic traffic, one laptop on consumer wifi via the Los Angeles edge | TrueFoundry | Competing vendor | TrueFoundry |
Read LiteLLM's 8 ms as a best case. The test used 4 instances of 4 vCPUs and 8 GB, 4 workers per instance, Locust with 1,000 users and a mock backend, with overhead read from the x-litellm-overhead-duration-ms header. The page gives no test date, and the same table shows total request latency of 150 ms at p95, so 8 ms is not what a client sees (effloow makes the same point).
Do not set the 8 ms next to TrueFoundry's 120 to 200 ms as if they were one test: one is proxy overhead against a mock, the other is added time to first token on real traffic. TrueFoundry also saw answers stream about 17% slower on credits (94 and 95 tokens per second against 115 direct), and its best explanation is less capacity on OpenRouter's account, which is the author's inference. OpenRouter's docs add that edge caches can be cold for the first 1 to 2 minutes in a new region.
We found no independent head-to-head test.
Send the same 200 prompts through each option from the region where your app runs, with streaming on. Compare time to first token and P95, not averages. Your own network path decides how much the gateway hop costs you, so measure it before you trust anyone's table, ours included.
You can run both
LiteLLM's docs list OpenRouter as a provider and say LiteLLM supports OpenRouter's text, chat, vision and embedding models (LiteLLM docs). You set OPENROUTER_API_KEY and call models as openrouter/<model>; the base URL defaults to https://openrouter.ai/api/v1. That lets you keep LiteLLM as the control point inside your infrastructure (keys, budgets, logging) and send some traffic to OpenRouter's catalog behind it.
Two limits apply. LiteLLM only sends your OpenRouter key, so BYOK for the underlying providers is set up in your OpenRouter account, not in LiteLLM. Some OpenRouter features are version-specific too: the Decisions API pass-through is in v1.104.0 and later (and patches of v1.101.1 and v1.102.1), but in no v1.103 release, which is one more reason to pin.
You still carry LiteLLM's ops and pinning work, and OpenRouter's fee applies to whatever you route through it.
Where Requesty fits
Requesty is a third option on the hosted side: one OpenAI-compatible API in front of 600+ models from 30+ providers, priced at 5% on top of model costs with all features included (pricing). It has failover chains across providers, latency and cost-based routing, per-user spend limits, and dashboards for cost, latency, TTFT and P50 to P99. You can bring your own provider keys or use one Requesty key, and there is an EU endpoint for data residency.
The scope limit: Requesty is hosted only. If your requirement is that the gateway runs inside your own VPC, LiteLLM is the option that does that. If you want a gateway without a self-hosted proxy or admin panel to patch and expose, switching is a base URL change. We compare the wider field in our routing platforms comparison, and explain why we built ours in Go in this language audit.
from openai import OpenAI
client = OpenAI(
base_url="https://router.requesty.ai/v1",
api_key="YOUR_REQUESTY_KEY",
)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://router.requesty.ai/v1",
apiKey: process.env.REQUESTY_API_KEY,
});Which one to pick
| Option | Pick it if | Break-even or cost |
|---|---|---|
| Requesty | You want a hosted gateway with failover, per-user spend limits and an EU endpoint, and do not need it inside your VPC. | 5% on top of model costs, all features included. |
| LiteLLM | The gateway must run in your own infrastructure, and an engineer will own pinning, Redis and key rotation. | Free MIT license. Pays off above ~$73,600 a month on credits or ~$106,000 on your own keys, at our base case. |
| OpenRouter | You want zero operations and a catalog of 500+ models from 80+ providers (per its pricing page). | 5.5% on credit purchases (8% on Business), or 5% above $25k a month on your own keys. |
| Both | You want LiteLLM as a self-hosted control point and OpenRouter's catalog behind it through the openrouter/ prefix. | LiteLLM's ops cost plus OpenRouter's fee on the traffic you send there. |
Before you decide, plug your own monthly spend, your split between credits and your own keys, and a realistic ops estimate into the break-even table above. If you already run LiteLLM, work through the pinning checklist today.
Frequently asked questions
- What is the difference between LiteLLM and OpenRouter?
- LiteLLM is MIT-licensed gateway software you run in your own infrastructure, with PostgreSQL, Redis and Docker to operate and no platform fee. OpenRouter is a hosted service with 500+ models from 80+ providers per its pricing page. As of November 2026 it charges 5.5% on credit purchases (8% on its Business tier) and no markup on token prices.
- Is LiteLLM free?
- The LiteLLM open-source gateway and SDK are MIT-licensed and free to use in production. LiteLLM Enterprise is a paid annual license for SSO, SCIM, audit logs and support. LiteLLM prices it on request capacity, architecture and support, never per token, and does not publish the price.
- How much does OpenRouter charge?
- As of November 2026, OpenRouter charges a 5.5% fee on credit purchases, or 8% on its Business tier, and does not mark up per-token model prices. If you bring your own provider keys, the first $25,000 per month of list-price inference has no fee and usage above that costs 5%.
- How much latency does LiteLLM add?
- LiteLLM's own benchmark reports 8 ms p95 gateway overhead across four instances of 4 vCPUs and 8 GB each, against a mock OpenAI endpoint with PostgreSQL and Redis disabled. With two instances it reports 29 ms p95. Those figures are proxy overhead in a best-case setup, not the end-to-end latency your users see.
- Was I affected by the LiteLLM 1.107.0 compromise?
- You were exposed if you installed litellm 1.107.0 from PyPI between 11:39 and 13:23 UTC on October 21, 2026, or pulled the v1.107.0, latest, main-latest or main-stable Docker tags between 11:46 and 14:20 UTC that day. LiteLLM says earlier versions and its private enterprise release were not impacted, and recommends pinning to 1.106.2.
- Should I use LiteLLM or OpenRouter?
- Use LiteLLM if you have engineers to run a gateway and want no credit fee. Use OpenRouter if you want zero operations and accept 5.5% on credits. You can also combine them: LiteLLM's docs list OpenRouter as a provider, called with the openrouter/ model prefix and an OPENROUTER_API_KEY.
- Does a self-hosted LLM gateway keep data inside my network?
- Only partly. A self-hosted gateway like LiteLLM keeps keys, logs and routing inside your infrastructure, but the call to the model provider still leaves your network unless the model itself is self-hosted.
- APR '26
Agentic routing, benchmarked: Requesty adds 16ms of overhead, OpenRouter adds 55ms
Agentic routing is the decision layer inside a multi-agent LLM system that picks which model or sub-agent handles an incoming request. Here's what it does, what it costs, and how the gateways compare.
- OCT '26
Open Source AI Gateway vs Managed: Which to Choose in 2026
Compare ten open source AI gateway options with managed services, including licenses, deployment tradeoffs and a worked ownership cost example.
- SEP '26
One in ten exposed LiteLLM gateways still answers to sk-1234: your AI gateway is a tier one security asset now
Wiz Research scanned 3,074 internet facing LiteLLM instances and found 9.6% accepting the example master key or no authentication at all. CISA put the MCP auth bypass on its exploited list with a 16 September patch deadline. The gateway that holds every provider key, reads every prompt and can reach your cloud metadata service is the most privileged box in your AI stack. Here is what the findings mean and how to run one safely.
