LiteLLM Alternatives: 5 LLM Gateways Compared (2026)
No7 Engineering Team
Growth Architecture Unit

LiteLLM alternatives are other LLM gateways that put one OpenAI-style API in front of many model providers. Teams are looking at them after the LiteLLM supply chain attack on 21 October 2026, when a compromised 1.107.0 release reached PyPI and Docker. The main choice is between a managed gateway, which removes the package you install and patch yourself, and a self-hosted one, which keeps prompts and provider keys on your own infrastructure. Every detail below comes from each vendor's own documentation or pricing page as of 27 October 2026; pricing changes often, so check it before you commit.
LiteLLM alternatives at a glance
| Gateway | Hosting | Open source | OpenAI-compatible API | Bring your own provider keys |
|---|---|---|---|---|
| LiteLLM (for comparison) | Self-hosted | Yes, MIT outside its enterprise/ directory | Yes | Yes, you hold the keys |
| OpenRouter | Managed | No open-source gateway documented | Yes, https://openrouter.ai/api/v1 | Yes |
| Vercel AI Gateway | Managed | No open-source gateway documented | Yes, https://ai-gateway.vercel.sh/v1 | Yes, on the paid tier |
| Cloudflare AI Gateway | Managed | No open-source gateway documented | Yes | Yes, stored in Secrets Store |
| Portkey | Managed or self-hosted | Yes, MIT | Yes | Yes |
| Kong AI Gateway | Managed control plane; data plane self-hosted or Kong-hosted | Kong Gateway is Apache-2.0; several AI plugins are paid | Accepts standard OpenAI request formats | Yes, via its AI Model Provider entity |
OpenRouter
OpenRouter is a managed service with an OpenAI-compatible API at https://openrouter.ai/api/v1. Its pricing page says you buy credits, with a fee on credit purchases of 5.5% on Standard and 8% on Business, and a free plan with 25+ free models limited to 50 requests a day. With bring your own key, pay-as-you-go includes $25,000 a month of list-price BYOK inference with no fee, then 5% of what the same model would normally cost on OpenRouter. It supports provider fallbacks and an Auto Router. Pick it when you want hundreds of models behind one API with no infrastructure to run.
Vercel AI Gateway
Vercel AI Gateway is managed, and Vercel says your application does not need to run on Vercel to use it. The OpenAI-compatible base URL is https://ai-gateway.vercel.sh/v1. Its pricing states no markup and no platform fee on tokens: you pay the provider's list price, and the free tier includes $5 of credit a month. Bring your own key is available on the paid tier with no markup; if a BYOK request fails, Vercel retries it with its own credentials, billed to your credits. Budgets can be set per team, project, API key or member, with provider and model fallbacks and request logs. Pick it if your storefront or app already deploys on Vercel or uses the AI SDK.
Cloudflare AI Gateway
Cloudflare AI Gateway is managed and available on all Cloudflare plans. Cloudflare's pricing reference says the core features, dashboard analytics, caching and rate limiting, are free. It offers logging, request retry and model fallback through Dynamic Routes, and stores your own provider keys in Secrets Store. Note that its older OpenAI-compatible /compat/chat/completions endpoint is deprecated for single-model calls, and the chat completion docs point new integrations to the REST API instead. Pick it if your site already sits behind Cloudflare.
Portkey
Portkey's gateway is open source under the MIT licence and can also be used as a hosted service. Self-hosted, npx @portkey-ai/gateway starts it on http://localhost:8787/v1, and the repository has guides for Docker, Node.js and Cloudflare. It uses the familiar OpenAI request signature and supports fallbacks, load balancing, retries, simple caching, guardrails and logs, with semantic caching in the hosted and enterprise versions. Its pricing page lists a free Developer plan with 10,000 recorded logs a month and a Production plan at $49 a month with 100,000 recorded logs. It is the closest swap if you want to keep self-hosting with an open-source gateway.
Kong AI Gateway
Kong AI Gateway is managed through Kong Konnect, while the data plane nodes run in your own environment: self-hosted, cloud or Kubernetes. Its AI Proxy plugin accepts requests in standard OpenAI formats, and the AI Gateway holds provider credentials centrally in its AI Model Provider entity. Kong Gateway itself is Apache-2.0, but Kong's pricing page lists AI Proxy Advanced, AI Semantic Cache and AI Rate Limiting Advanced as paid plugins, and the Plus plan charges $100 a month per model proxied, up to five models. Kong also sells Dedicated Cloud and Serverless gateways, and fully self-hosted deployments through Gateway Enterprise. It publishes a software bill of materials for every AI Gateway release from 2.0.2. It suits teams that already run Kong for their APIs.
Or keep LiteLLM and harden it
Switching is not the only answer. LiteLLM says the attacker repointed its release pipeline to build 1.107.0 from a commit on a lookalike fork, Berri-AI/litellm, rather than from its own repository. Its Docker image security docs say every image it publishes to GHCR is signed with cosign starting from v1.83.0. The malicious 1.107.0 image was signed too, because the attacker ran LiteLLM's own release pipeline, so a valid signature proves where an image came from, not that it is safe. If you stay, do the following:
- Pin exact versions. Pin
litellmto an exact version in pip, and pin Docker images by digest rather than a moving tag such asmain-latest. - Verify image signatures. Check the cosign signature against the key LiteLLM documents before you deploy a new image. This would not have flagged 1.107.0, so pair it with pinned digests and a delay before adopting new releases.
- Block unexpected egress. LiteLLM's Director of Security has called default-deny egress a very good way to run LiteLLM, because it limits what a malicious release could send out.
- Scope and rotate keys. Give the proxy only the provider keys it needs, set budgets on its virtual keys, and rotate keys on a schedule.
How to choose
- No infrastructure to run: OpenRouter, Vercel AI Gateway or Cloudflare AI Gateway. The trade-off is that prompts pass through a third party.
- Prompts and keys must stay on your servers: self-hosted Portkey, Kong's data plane, or a hardened LiteLLM.
- Already on a platform: Vercel AI Gateway for Vercel projects, Cloudflare AI Gateway for sites behind Cloudflare, Kong if it already fronts your APIs.
What to do next
Whichever gateway you pick, check first that nothing still runs the compromised 1.107.0 build, using the steps in our LiteLLM supply chain attack post. Then rotate the provider keys the old gateway held. Our ecommerce supply chain security checklist covers pinning and secret rotation, and our Shopify app development team can move an app or storefront AI feature to a new gateway for you.
Frequently Asked Questions
The questions buyers and engineers ask us most about this topic.
What is the best alternative to LiteLLM?
It depends on where you want the gateway to run. OpenRouter, Vercel AI Gateway and Cloudflare AI Gateway are managed, so there is no package to install and patch. Portkey is the closest self-hosted swap: its gateway is open source under the MIT licence and uses the OpenAI request format.
Is there an open-source alternative to LiteLLM?
Yes. Portkey's gateway is MIT-licensed and can be self-hosted with npx @portkey-ai/gateway, Docker, Node.js or Cloudflare Workers. Kong Gateway is Apache-2.0, though Kong lists several of its AI plugins as paid.
LiteLLM vs OpenRouter: what is the difference?
LiteLLM is a self-hosted gateway, so you run the server and hold the provider keys. OpenRouter is a managed service with an OpenAI-compatible API at https://openrouter.ai/api/v1, billed through credits with a fee on credit purchases, plus a bring-your-own-key option.
Should I stop using LiteLLM after the supply chain attack?
Not necessarily. LiteLLM says the attacker repointed its release pipeline to build 1.107.0 from a lookalike fork. The malicious image was signed by that pipeline, so signature checks alone would not have caught it. If you stay, pin exact versions and image digests, delay adopting new releases, restrict outbound traffic and rotate provider keys.