Best self-hosted / open-source LLM gateway: how to choose

If you've decided to self-host — for data control, no per-token markup, or central governance — these are the leading open-source options. None is universally "best"; the right one depends on whether you optimize for features, throughput, observability, or enterprise operations.

Independent · no vendor money · part of the Awesome AI Gateway benchmark · self-host means you own HA, upgrades and scaling — budget for it.

Why self-host a gateway at all?

Four concrete reasons: your traffic and keys stay in your infrastructure; no per-token markup (you pay providers directly); central governance — virtual keys, budgets, rate limits across a team; and on-prem / air-gapped or compliance needs your infra already satisfies. The trade-off is real operational work.

The leading options

GatewayStrength / best when
LiteLLMBroadest coverage — 100+ providers, virtual keys, budgets, load balancing. The default first choice.
BifrostGo-native, very low overhead at high request rates. Pick when throughput/latency dominate.
Portkey GatewayOpen-source, edge-deployable gateway with routing, caching and guardrails.
HeliconeObservability-first — logging, caching, monitoring with a gateway. Pick when you need visibility.
HigressEnvoy/Istio-based, cloud-native — AI gateway for Kubernetes shops wanting an enterprise data plane.
KongAI plugins on a battle-tested API-gateway data plane — RBAC, audit, semantic caching at enterprise scale.

How to choose in one line

Your priorityStart with
Broadest features, fastest to adoptLiteLLM
Lowest overhead / high throughputBifrost
Observability & cost visibilityHelicone
Edge deploy + guardrailsPortkey Gateway
Enterprise Kubernetes + auditHigress / Kong
⚖️ Self-hosting removes the gateway fee, but the model you choose still dominates cost — a 100×+ spread across models, far larger than any markup you're avoiding. Size your workload → cost calculator.

Before production: verify fidelity

Self-hosted or not, a proxy can still misbehave after a misconfiguration or upgrade — silently swapping models, fake-streaming, or misreporting usage. Run the canary fidelity test against your deployment, and pin to a known-good release.

FAQ

What's the best open-source LLM gateway?

No single winner — LiteLLM for breadth, Bifrost for throughput, Helicone for observability, Higress/Kong for enterprise K8s.

Is LiteLLM the best?

It's the common default for breadth and governance; pick something else if throughput, observability or enterprise K8s is your top priority.

Which is fastest?

Go-native gateways like Bifrost target low overhead — but benchmark with your own traffic before committing.

Self-hosted or hosted?

Self-host for data control / no markup / governance (if you can run a service); hosted for zero ops and fastest reach.