Alternatives

LiteLLM Alternatives: 5 AI Gateways Compared for Business Teams

Published: 7 min read By Andrzej M.

A blue network patch cord

LiteLLM is a popular open source gateway that lets one application talk to many AI model providers through a single OpenAI-style endpoint. On 21 October 2026 a malicious release, version 1.107.0, appeared on PyPI, and many teams are now asking whether to keep self-hosting it. This guide compares the main alternatives on fees, control and security, and gives you a way to decide without panic.

What happened with LiteLLM 1.107.0?

According to the security firm SafeDep, only LiteLLM version 1.107.0 on PyPI was malicious, and the release has since been removed. SafeDep lists 1.106.2, 1.107.0rc1 and 1.107.0rc2 as clean. Its analysis says the package included a credential stealer that ran inside every Python process on the host, plus a backdoor that periodically checked for a server address.

The reported targets included SSH keys, cloud credentials, CI/CD secrets, AI tool tokens, browser passwords and LiteLLM proxy database keys. SafeDep timestamps the wheels as uploaded to PyPI around 11:40 UTC and the release as gone by 13:40 UTC the same day. This is not the first time: Sonatype documented a separate compromise of versions 1.82.7 and 1.82.8 in March 2026, and advised treating any machine that ran them as compromised.

If you installed 1.107.0 anywhere, treat that machine as compromised, rotate every secret it could read, and follow the vendor and SafeDep indicators of compromise. We have not tested or reproduced any of this; the details above come from the cited reports.

What does an AI gateway actually do?

An AI gateway gives your apps one endpoint for many model providers, and gives your finance and security teams one place to control keys and spend. LiteLLM’s own documentation describes virtual keys with separate budgets and rate limits, spend tracking by key, team and tag, fallbacks and retries, guardrails, and an admin interface.

For a business team the value is practical: you stop handing raw provider keys to every developer and tool, you can cap spend per project, and you can switch models without rewriting code. If that is new to you, our guide to capping AI API spend explains why per-project limits matter.

Should you stay on LiteLLM or switch?

Stay if you already run it in a controlled way, switch if nobody on your team owns dependency security. LiteLLM is self-hosted, so you control your data path, but you also own every update, every secret and every incident. A hosted gateway removes the package from your supply chain, but adds a vendor that sees your traffic.

A practical split:

  • Stay on LiteLLM if you deploy from pinned, hash-verified images or lockfiles, keep provider keys in a secrets manager, and can rotate them within hours.
  • Move to a hosted gateway if developers run pip install on laptops or servers with broad cloud credentials, or if no one is accountable for upgrades.
  • Run both for a while if you want a fallback: route a low-risk project through a hosted gateway first.

Which LiteLLM alternatives are worth considering?

The four options below are hosted or managed gateways whose pricing we read on the vendors’ own pages. Prices were as shown on those pages in October 2026 and can change.

OpenRouter

OpenRouter is a hosted router with one API for a large catalog of models. Its pricing page lists a free tier (25+ free models, 50 requests per day), a Standard plan with a 5.5% platform fee on credit purchases, and a Business plan with an 8% fee, plus an Enterprise plan with discounts. Model token prices are the same on every plan; the fee applies when you buy credits.

  • Best for: teams that want many models behind one account without running infrastructure.
  • Pros: large model and provider catalog, budgets on Standard, EU and US in-region routing on Business, and BYOK with $25,000 of list-price inference per month before a 5% fee applies.
  • Cons: a percentage fee on every credit purchase; SSO/SAML, SLAs and invoicing are Enterprise-only.

Cloudflare AI Gateway

Cloudflare’s gateway is available on all plans and its core features (analytics, caching and rate limiting) are free, per its pricing page. A 5% fee applies if you buy credits through Unified Billing, so a $100 credit costs $105. Guardrails are billed as Workers AI inference, and log limits depend on when the gateway was created.

  • Best for: teams already on Cloudflare that want caching, rate limits and analytics at little cost.
  • Pros: free core features, DLP scanning on all plans, pass-through provider rates.
  • Cons: log retention rules differ between older and newer gateways, and the guardrail cost depends on prompt length.

Vercel AI Gateway

Vercel states that its AI Gateway charges no markup and no platform fee on tokens, even with bring your own key, and that you pay the provider’s list price from purchased credits. There is a free tier covering a subset of models. Add-ons cost extra: for example, team-wide provider allowlists at $0.10 per 1,000 successful requests and trace drains at $0.05 per 1,000 traces.

  • Best for: teams already building on Vercel that want budgets per team, project or key without a token markup.
  • Pros: no token markup, budgets, BYOK on the paid tier.
  • Cons: you are responsible for any payment processing fees, and some controls are add-ons on Pro or Enterprise.

Portkey

Portkey lists a free Developer plan (10,000 recorded logs per month, three days of log retention, not suited to production), a Production plan at $49 per month with 100,000 recorded logs, and an Enterprise plan with private cloud or VPC hosting. It also offers an open source option you deploy yourself.

  • Best for: teams that want observability and governance features with a predictable flat fee.
  • Pros: flat monthly pricing, self-hosting through the open source gateway or Enterprise.
  • Cons: logs are capped per plan, and the overage basis on the page is not fully clear, so confirm it before you scale.

How do the gateways compare?

GatewayBest forStarting priceFree planKey limitation
LiteLLM (self-hosted)Teams that want full controlFree to run; enterprise by quoteYes (open source)You own security and upgrades
OpenRouterMany models, one account5.5% fee on creditsYes (50 requests/day)Percentage fee; SSO is Enterprise-only
Cloudflare AI GatewayCloudflare usersCore features freeYesLog rules vary by gateway age
Vercel AI GatewayVercel usersNo token markupYes (subset of models)Add-ons and payment fees
PortkeyObservability on a flat fee$49/month (Production)Yes (10,000 logs)Log caps per plan

What would it cost? A worked example

Assume a 15-person team spends $2,000 per month on model tokens and buys that amount of credits each month. This is our own illustration, not a quote. Using the fees on the vendors’ pages:

  • OpenRouter Standard: 5.5% of $2,000 is $110 per month in platform fees. On Business at 8% it is $160.
  • Cloudflare Unified Billing: 5% of $2,000 is $100 per month.
  • Vercel: $0 in gateway markup on tokens, before any add-ons or payment processing fees.
  • Portkey Production: $49 per month, plus logging overage if you exceed 100,000 recorded logs.
  • LiteLLM self-hosted: no license fee, but you pay for hosting, a database and engineering time for upgrades and security.

The fee differences are small next to the token bill itself. At this volume, the decision should be driven by security ownership and features, not by a $60 monthly gap. If you use bring-your-own-key on OpenRouter, the fee only applies above its $25,000 monthly allowance, so BYOK can remove it entirely at this size.

How to install any AI package safely

Whichever gateway you choose, the same habits would have limited the damage from a bad release.

  1. Pin exact versions and avoid “latest” in production images.
  2. Use hash-checking mode. pip’s documentation describes --require-hashes, where every requirement is pinned and has a sha256 hash, so a swapped file fails to install.
  3. Delay upgrades by a few days for critical infrastructure packages unless you are patching a known flaw.
  4. Keep secrets out of build and developer machines where you can; use short-lived credentials.
  5. Limit blast radius: per-project provider keys and spend limits, as in our AI agent security checklist.
  6. Know how to rotate every key in under a day, and rehearse it.

How we chose

We compared gateways that a business team can adopt without building a platform: LiteLLM as the baseline, and four alternatives with public pricing pages. We read each vendor’s own documentation or pricing page and used only figures stated there. We did not install or benchmark any of these gateways, so we make no claims about latency, uptime or output quality. Before you buy, use our AI vendor due diligence checklist for data retention, subprocessors and incident history.

How to decide

  • Choose Cloudflare AI Gateway if you already use Cloudflare and want caching, rate limits and analytics cheaply.
  • Choose Vercel AI Gateway if your apps run on Vercel and you want no token markup.
  • Choose OpenRouter if you need the widest model catalog under one account and accept the credit fee.
  • Choose Portkey if observability and a predictable monthly fee matter most.
  • Choose LiteLLM if you need self-hosting and have the discipline to pin, verify and rotate.

Questions to ask any vendor: where are prompts and logs stored, for how long, who can read them, how are you notified of an incident, and what does your contract say about data retention and training?

Frequently asked questions

What is an AI gateway?

An AI gateway is a single endpoint that sits between your apps and several AI model providers. It forwards requests, tracks spend, applies budgets and keys per team, and can add fallbacks and logging so you do not wire each provider separately.

Do I have to leave LiteLLM after the 1.107.0 incident?

Not necessarily. SafeDep reports that only release 1.107.0 was malicious and that PyPI removed it. The real question is whether your team can pin exact versions, check hashes and rotate secrets quickly. If not, a hosted gateway moves that risk to a vendor.

Which AI gateway has no markup on tokens?

Vercel states that AI Gateway charges no markup and no platform fee on tokens, including when you bring your own key. OpenRouter charges a fee when you buy credits, and Cloudflare charges 5% on unified billing credit purchases.

Can I bring my own provider keys to a gateway?

Yes on most. OpenRouter's Standard and Business plans include $25,000 of list-price BYOK inference per month before a 5% fee applies, and Vercel supports BYOK on the paid tier with no gateway fee. Check each vendor's terms before you rely on it.

Sources