Open Source LLM Gateway:
Best Self-Hosted OptionsOpen-Source LLM
Gateways
Compare self-hosted gateways by routing, policy, observability, and operating burden.
Published: March 22, 2026 · By the QVeris Team
TL;DR
LiteLLM is the first open-source gateway many teams should evaluate.
Kong, Envoy, and custom gateway patterns fit teams with platform engineering capacity.
Self-hosting increases control but also increases operational responsibility.
QVeris can sit beside self-hosted gateways to provide agent capabilities without rebuilding every integration.
Guide and search intent
Teams choose open-source gateways when data residency, compliance, provider policy, credential control, or internal platform standards matter. It is also attractive when the model layer must be deeply integrated with existing infrastructure.
The keyword “open source LLM gateway” sounds free, but the real cost is operating the layer. Someone must own deployment, scaling, version upgrades, provider changes, security patches, incident response, and internal documentation.
LiteLLM is the most direct path for an OpenAI-compatible gateway. Portkey Gateway provides open-source gateway components. Platform teams may extend Kong AI Gateway, Envoy AI Gateway, or an internal API gateway if they already have that stack.
A self-hosted model gateway does not automatically maintain hundreds of verified tool integrations. If agents need live financial data, web research, internal systems, or specialized APIs, QVeris can provide the capability layer while the model gateway remains self-hosted.
Comparison table
| Option | Category | Best for | How to read it |
|---|---|---|---|
| LiteLLM | Open-source AI gateway | Fast self-hosted start | Best first evaluation. |
| Portkey Gateway | Open components | LLMOps-oriented teams | Good if observability matters. |
| Kong / Envoy | Infrastructure gateway | Platform engineering | Good if gateway stack already exists. |
| QVeris | Capability network | Tools and data for agents | Good beside self-hosted model routing. |
Implementation playbook
Open source is attractive because teams can inspect code, control deployment, and keep policy close to their infrastructure. But the team also owns uptime, upgrades, provider changes, security patches, and documentation. The page should make that trade-off explicit rather than treating open source as automatically cheaper.
A useful page should cover deployment target, secrets management, logging retention, rate limits, cost attribution, model aliases, fallback policy, compliance needs, and incident ownership. These checklist items match how infrastructure teams actually evaluate a gateway.
Even if the model gateway is open source, every tool integration still has to be discovered, authenticated, tested, monitored, and audited. That is where QVeris can be introduced as a way to avoid rebuilding every external capability while keeping the model layer self-hosted.
Decision framework
- Choose open source when governance and data control are more important than setup speed.
- Choose managed routing when model breadth and speed matter more than owning infrastructure.
- Use QVeris when the self-hosted stack still needs external capabilities without rebuilding every connector.
Where QVeris fits
Model gateways solve model access. QVeris solves the next step: how an agent finds, inspects, and calls real-world capabilities such as financial data APIs, external tools, and auditable workflow actions. You can test that discover–inspect–call workflow in the QVeris Playground.
Open-source LLM gateway evaluation criteria
A useful open-source LLM gateway should let teams keep one application interface while changing providers behind the scenes. Compatibility reduces migration work and keeps product code from depending on one provider.
Open source is valuable only if routing behavior is explicit. Teams should be able to define aliases, fallback order, timeout rules, retry behavior, and provider-specific limits without rewriting application code.
The gateway should support virtual keys, per-team limits, usage attribution, and cost visibility. Without ownership controls, a shared gateway quickly becomes difficult to operate across multiple teams.
Production teams need request logs, latency, token usage, cost, model names, error rates, and fallback events. These signals are what make an open-source gateway operationally useful rather than just flexible.
Self-hosting creates control, but it also creates responsibility. Teams must plan upgrades, security patches, incident response, provider API changes, and internal documentation before calling open source the cheaper path.
Open-source gateway options and where QVeris fits
A strong default for teams that want an OpenAI-compatible proxy, provider routing, virtual keys, and self-hosted control. It is often the first open-source gateway teams evaluate.
Best for organizations that already think in API gateway terms. It brings AI traffic closer to existing gateway governance, security, and traffic management practices.
Best for infrastructure-heavy teams that want cloud-native traffic control patterns extended to LLM workloads. It can be powerful, but the implementation effort is higher.
Sometimes the right answer is a thin internal layer around provider SDKs. This works when the team has narrow needs, but it becomes harder as routing, logging, budgets, and fallback grow.
QVeris should sit next to the open-source gateway, not replace it. The gateway routes model calls; QVeris helps agents discover, inspect, call, and audit real-world capabilities.
Risks to plan before self-hosting
The team still owns availability, upgrades, dependency security, provider API changes, and incident response. Treat the gateway as production infrastructure, not a library.
An agent that can call models still may not be able to safely call tools, financial data, internal systems, or external workflows. That gap should be addressed separately.
If logs, cost attribution, and fallback events are not captured from the start, teams will struggle to debug spend and reliability once usage grows.
Custom routing logic feels powerful early, but it can make migration and maintenance harder. Keep policies explicit and avoid one-off behavior hidden in application code.
More open-source LLM gateway questions
LiteLLM is often the default starting point, but the best choice depends on whether the team needs a simple proxy, enterprise API gateway alignment, service mesh control, or a broader agent architecture.
It can be cheaper in vendor fees, but not automatically cheaper in total cost. Hosting, maintenance, monitoring, upgrades, and incident response still have engineering cost.
Yes. The open-source gateway can manage model access, while QVeris manages capability discovery, tool calls, financial data access, and auditable agent actions.
Self-hosting makes sense when compliance, control, data residency, or internal platform standards matter. If speed is the main requirement, a managed gateway may be faster.
Common mistakes to avoid
- Calling open source cheaper without counting engineering time.
- Forgetting that model routing and tool routing are separate operational problems.
- Publishing only a list of GitHub projects instead of explaining self-hosting trade-offs.
External references
FAQ
LiteLLM is often the first option because it is focused on OpenAI-compatible model gateway use cases.
No. It is better for control, but managed gateways can be better for speed and operational simplicity.
QVeris can provide verified capabilities and tool calls while the model gateway remains self-hosted.
