AI Gateway

August 11, 2026

~ 10 min

LiteLLM Alternatives in 2026: When a Self-Hosted Gateway Becomes a Second Job

On this page
    Stop maintaining the gateway
    Try Free

    An open-source LLM gateway proxy costs nothing to license and a great deal to operate. In 2026, that gap stopped being theoretical. Between March and June, LiteLLM – the most widely deployed open-source proxy server for LLM traffic, at roughly 95 million PyPI downloads a month – absorbed a supply chain compromise, a critical authentication bypass, a CVSS 9.9 privilege-escalation chain, and a command-injection flaw that CISA added to its Known Exploited Vulnerabilities catalog with a federal remediation deadline attached.

    None of that is an argument against LiteLLM. The maintainers disclosed publicly, patched quickly, and sign every Docker image with Cosign. It is an argument about who does the patching at 2 a.m. This article maps out the realistic alternatives to LiteLLM – open-source and managed – and gives you a way to decide which side of that line your team belongs on.

    What LiteLLM actually is, and what it leaves to you

    LiteLLM is an open-source LLM gateway proxy published under the MIT license. It ships as a Python SDK plus a proxy server that exposes 100+ providers – OpenAI, Anthropic, Azure OpenAI, Bedrock, Vertex AI, the Mistral AI API, and self-hosted models – behind a single OpenAI API-compatible chat completion endpoint. Run as the LiteLLM proxy, it adds virtual keys, spend tracking, multi-provider routing, load balancing, guardrails, and an admin UI. What it does not ship is the team that runs it. Every "alternatives to LiteLLM" decision is really a decision about that team, not about a feature checklist.

    Why teams start searching for LiteLLM alternatives in 2026

    The trigger is rarely a missing feature. It is the month the gateway generates more tickets than the product it serves. Here is LiteLLM's 2026 security record, in order:

    Date What happened Severity Fixed in
    24 Mar 2026 Supply chain compromise: malicious litellm 1.82.7 and 1.82.8 published to PyPI by the actor TeamPCP, via the earlier Trivy CI/CD compromise. Harvested SSH keys, cloud credentials, and Kubernetes tokens Full credential exposure Packages quarantined; official Proxy Docker image unaffected
    3 Apr 2026 CVE-2026-35030 — authentication bypass, OIDC userinfo cache keyed on the first 20 characters of a JWT CVSS 9.4 v1.83.0
    3 Apr 2026 CVE-2026-35029 — authorization bypass on /config/update, reachable to remote code execution High v1.83.0
    20 Apr – 8 May 2026 CVE-2026-42271 — command injection in the MCP preview endpoints, affecting 1.74.2 through 1.83.6 CVSS 8.7 v1.83.7
    1 Jun 2026 Horizon3.ai chains that flaw with the Starlette "BadHost" bypass (CVE-2026-48710) for unauthenticated RCE CVSS 10.0 combined v1.83.7 + Starlette v1.0.1
    8 Jun 2026 CISA adds CVE-2026-42271 to the KEV catalog; 22 June remediation deadline for federal agencies under BOD 22-01 Exploited in the wild v1.83.7 + Starlette v1.0.1
    11–15 Jun 2026 Obsidian Security discloses a three-CVE chain (CVE-2026-47101, CVE-2026-47102, CVE-2026-40217): default low-privilege user to proxy admin and RCE CVSS 9.9 v1.83.14-stable

    Two details from March are worth keeping in view. In 1.82.8 the payload sat in a .pth file, which Python executes at interpreter startup – no import litellm required. And LiteLLM reported that the packages were live for roughly 40 minutes before PyPI quarantined them, which was long enough to matter for any CI job that installed them during that window.

    The pattern matters more than any single CVE. An LLM gateway proxy is a credential concentrator: it holds the OpenAI, Anthropic, and Azure OpenAI keys for the entire organization and sees every prompt and every chat completion in plaintext. A bug that would be rated medium severity in an internal microservice is critical here, because a compromise of the proxy server is a compromise of every model relationship behind it. That is why open source maintenance on a gateway is a security question, not a matter of taste.

    The Gateway Maintenance Tax: five costs that never appear in the license

    Self-hosting is free the way a puppy is free. We call the recurring engineering cost of running your own LLM gateway the Gateway Maintenance Tax, and it has five components:

    1. The patch tax. Security fixes are not optional and not scheduled by you. When CISA sets a 14-day remediation clock, your upgrade window is 14 days. LiteLLM also ships fast: in the single week of 27 May – 4 June 2026 the project cut releases across five parallel version lines (1.84.x, 1.85.x, 1.86.x, 1.87.0, and a 1.88.0 release candidate). Someone on your side has to decide which line to track and re-test after every bump.

    2. The provider drift tax. Providers change under you. Azure OpenAI addresses models by deployment name rather than model name, the Mistral AI API and Anthropic differ on system messages and tool schemas, and every new model ships a different context window and pricing shape. Keeping one honest chat completion surface across all of them is continuous work, not a one-time integration.

    3. The reliability tax. A gateway sitting in front of every AI feature inherits the availability requirement of all of them: real failover, model fallback chains, retry budgets that do not amplify an outage, load testing at the concurrency your agents actually generate – plus the on-call rotation behind it.

    4. The access-control tax. Virtual keys are easy to issue and hard to govern: rotation, per-team scoping, SSO/SAML, offboarding, and revocation at scale. Two of the 2026 LiteLLM CVEs were precisely access-control bugs, which is the normal failure mode for this layer, in any product.

    5. The attribution tax. Raw token logs are not chargeback. Turning them into per-team, per-department, and per-agent cost lines that finance will accept is its own build – one we covered in LLM cost attribution.

    None of these five appear on a pricing page, and all five recur every month.

    LiteLLM alternatives 2026: the open-source and managed landscape

    The field splits three ways: open source you run yourself, managed services someone else runs, and governance platforms that treat the gateway as one layer of a wider control plane.

    Gateway Type Licence Best fit
    LiteLLM Self-hosted proxy + Python SDK MIT The widest provider catalog, for teams that can own operations
    Bifrost Self-hosted (Go) Apache 2.0 Throughput-sensitive traffic, semantic caching, native MCP
    Kong AI Gateway Self-hosted, open core Apache 2.0 core Organizations already running Kong for API management
    Envoy AI Gateway Self-hosted, Kubernetes-native Apache 2.0 Istio and service-mesh stacks; still early at v0.x
    Portkey Gateway core plus managed control plane MIT core Guardrails and observability with a hosted option
    Helicone Self-hosted, observability-first Apache 2.0 Monitoring and tracing ahead of advanced routing
    OpenRouter Managed router Closed source Fast access to many models with no infrastructure to run
    Cloudflare / Vercel AI Gateway Managed, edge-attached Closed source Teams already standardized on that platform
    OptScale AI Managed or on-premises governance platform Commercial Gateway, guardrails, cost attribution, and agent control in one place

    Treat published latency numbers from any of these vendors as vendor benchmarks until you reproduce them on your own hardware and traffic shape. And note what the table cannot show: the first six rows all hand you the same operational job. When comparing litellm alternatives open-source to managed ones, the key line is that swapping one self-hosted proxy for another self-hosted proxy changes the code you run, not the job you own.

    Self-hosted vs managed: the three-question test

    Answer these three before you shortlist anything.

    1.   Can you patch a critical gateway CVE within 72 hours, including over a weekend? If there is no named owner and no rehearsed upgrade path, self-hosting is a stated intention, not a capability.

    2.   Does regulation or data residency require the proxy inside your perimeter? If sovereign or air-gapped deployment is mandatory, you need a self-hosted or on-premises option – but note that some managed vendors also ship an on-prem build, so this does not automatically mean DIY.

    3.   Is the gateway on someone's roadmap, or is it everyone's side project? A gateway maintained between sprints is the definition of a second job.

    Two or three "no" answers indicate a managed or vendor-supported, production-ready gateway. Three "yes" answers mean open source is a genuinely good fit – and LiteLLM remains a strong choice in that case.

    What "production-ready gateway" has to mean

    Whatever you choose, hold it to the same bar: OpenAI-compatible drop-in so existing SDK code keeps working; multi-provider routing across OpenAI, Anthropic, Azure OpenAI, Mistral, and local models; automatic failover and model fallback; virtual keys with role-based access and clean revocation; per-team and per-agent cost attribution; PII detection and DLP before data leaves your perimeter; full request tracing and audit trails; context-window-aware handling of long prompts; a documented CVE disclosure and patch process; and a deployment model that matches your compliance posture. Anything missing from that list becomes work your team absorbs.

    Where OptScale AI fits

    OptScale AI is a managed or on-premises AI governance platform built around an intelligent AI Gateway. It is OpenAI API-compatible – change the base URL and existing code runs unchanged – and adds smart routing between local models, public LLMs, and MCP servers with less than 10 ms of routing overhead, automatic failover, virtual keys with role-based access and department-level billing, guardrails with PII detection and DLP, and full tracing. Published cost reduction is up to 60%, via prompt compression, cache alignment, and model arbitrage. It runs as cloud SaaS or on-premises, including air-gapped, so the sovereignty answer from question two does not force you into DIY. On the agent side: OptScale AI doesn't run your agents it governs them, with limits on cost, time, and recursion.

    The honest summary: if your team can carry the Gateway Maintenance Tax, open source is excellent, and LiteLLM is a fine default. If it cannot, the tax gets paid anyway — in incidents, in delayed patches, and in engineers hired to build the product.

    Frequently asked questions

    What are the best alternatives to LiteLLM in 2026?

    For self-hosting: Bifrost (Go, Apache 2.0), Kong AI Gateway, Envoy AI Gateway, and the Portkey gateway core. For managed operation: OpenRouter, Cloudflare AI Gateway, Vercel AI Gateway, and Portkey's hosted control plane. For gateway plus governance, cost attribution, and agent control in one platform: OptScale AI. The right pick depends on whether you want to own the proxy layer or delegate it.

    Is LiteLLM safe to use in production after the 2026 incidents?

    Yes, if it is maintained. Run at least v1.83.14-stable, use the official Proxy Docker image with pinned dependencies, verify image signatures with cosign, keep the proxy off the public internet, and rotate any credential exposed during the 24 March 2026 window. The risk is not the software; it is running a stale copy of it.

    What is the difference between an LLM gateway and an LLM router?

    A gateway is the full proxy layer: authentication, provider normalization, caching, rate limiting, cost tracking, observability, and routing. A router is the component that decides which model handles a given request. Most gateways include a router; a standalone router still needs a gateway.

    Are there fully open-source LiteLLM alternatives?

    Yes. Bifrost, Envoy AI Gateway, Helicone, and the Kong core are Apache 2.0; the Portkey gateway core is MIT, as is LiteLLM itself. Note that some projects are open core, with enterprise features gated behind a commercial license, and that OpenRouter is not open source at all.

    How much does it really cost to self-host an LLM gateway proxy?

    The infrastructure is cheap; the operations are not. Budget for patch response inside regulator deadlines, provider-drift maintenance, failover and load testing, key lifecycle management, and building cost attribution. That workload is continuous and grows with usage.

    Can I migrate off LiteLLM without rewriting my application?

    Usually yes. Any gateway that implements the OpenAI API chat completion format is just a base URL change plus a key swap. What does not migrate automatically is configuration: routing rules, fallback chains, virtual keys, budgets, and guardrail policies have to be recreated and re-tested.

    See every prompt, model, and key in one place