Self-hosted OpenRouter alternatives in 2026: LiteLLM, Bifrost, Kong, GoModel, Agent Router and what to avoid

Short answer

There is no single drop-in “self-hosted OpenRouter”, but several credible gateways. LiteLLM has the widest provider coverage (100+) and an Enterprise tier, but had two supply-chain incidents in 2026, so pin versions. Bifrost and GoModel are newer Go gateways with budgets, caching and failover in the open-source build. Kong AI Gateway and Agent Router (formerly Envoy AI Gateway) suit teams already on Kong or Kubernetes. Portkey’s open-source gateway, Helicone’s gateway and TensorZero are no longer actively developed, so avoid starting new on them. Cloudflare AI Gateway and Azure API Management are private-but-managed. OpenRouter itself passes provider prices through and charges 5.5% (Standard) or 8% (Business) when you buy credits; it stays the better pick for model breadth and low operations effort. Prices are official USD, checked Dec 2, 2026; GBP is not published except Azure’s.

Planning a private LLM gateway? Get a free 30-minute advisory call.

Why “self-hosted OpenRouter” is a real category

OpenRouter gives an application one API key, one credit balance and one OpenAI-compatible endpoint in front of a very large catalogue of models. Its pricing page lists 700+ models and 100+ providers, and says inference is billed at the provider’s list price on every plan, with a fee charged when you buy credits. That is a good trade for many teams. The reasons people go looking for a self-hosted or private alternative are usually narrower:

  • Prompts and logs must stay inside your network. A hosted router is another party in the request path, however good its data policy is.
  • You want your own governance model. Per-team budgets, key hierarchies, audit trails and guardrail policies that live next to your identity provider and your logging stack.
  • You already have provider contracts. If you buy Bedrock, Azure OpenAI or Vertex AI capacity directly, you may only need routing and policy, not a reseller of credits.
  • You run local or private models. A hosted service cannot reach an Ollama or vLLM server on your own network.
  • The percentage fee matters at your spend. A 5.5% or 8% fee on credit purchases is small for a prototype and a real line item at scale.

This guide compares how a self-hosted gateway differs from OpenRouter, then walks through each realistic option on equal terms: LiteLLM, Bifrost, GoModel, Kong AI Gateway, Envoy AI Gateway (now called Agent Router), Portkey’s open-source gateway, Helicone and TensorZero, plus Cloudflare AI Gateway and Azure API Management as private-but-managed choices. Every claim comes from the vendor’s own docs, pricing page or repository, checked on Dec 2, 2026. Vendor benchmark numbers are labelled as vendor claims.

OpenRouter vs a self-hosted gateway

The two models differ on four axes: who hosts the routing layer, how you pay, which models you can reach, and how much governance you control.

OpenRouter (hosted) Self-hosted gateway
Hosting SaaS. Requests pass through OpenRouter. Business and Enterprise plans add EU and US in-region routing; Enterprise lists Private Endpoints as an add-on. Zero Data Retention routing is available on every plan. You run the gateway (container, binary, Helm chart or Kubernetes). Keys, logs and caches stay in your environment. Upstream providers still see the prompts you send them.
Pricing model No markup on inference. Fee when buying credits: 5.5% on Standard ($0.80 minimum per the FAQ), 8% on Business, discounted on Enterprise. BYOK: first $25,000 of list-price inference per month free, then 5%. GBP not published. Core gateway software is free in most cases. You pay providers directly, plus your own infrastructure and engineering time. Commercial tiers (LiteLLM Enterprise, GoModel Pro, Kong, Bifrost Enterprise) add SSO, audit and support, usually quote-only.
Model access 700+ models and 100+ providers behind one account, no per-provider contracts. Only the providers you configure, each with its own account, key and rate limits. Counts vary by gateway: GoModel lists 39 providers, LiteLLM says 100+. Local models via Ollama or vLLM are reachable.
Governance Activity logs, workspaces, per-key credit caps, budgets and spend controls on paid plans, fallback routing, data-policy-based routing. SSO/SAML, managed policy enforcement and contractual SLAs are Enterprise only. You decide: virtual keys, per-team budgets, rate limits, guardrails, caching, failover chains and audit logs, in the gateway and in your own identity and logging systems. Depth varies a lot by product and by edition.

Two further differences are easy to miss. First, OpenRouter’s fallback logic does not bill a failed attempt, and it is a managed reliability layer you do not operate; with a self-hosted gateway the gateway itself becomes something you must keep highly available. Second, OpenRouter’s pricing page lists Budgets & Spend Controls as unavailable on its Free plan and available on Standard, Business and Enterprise.

Sources: OpenRouter pricing, OpenRouter FAQ and OpenRouter Zero Data Retention docs.

Check maintenance status before you choose

The gateway market changed a lot in 2026, and older comparison articles are now wrong about several projects. Check these before shortlisting:

  • TensorZero is archived. Its GitHub repository was archived on June 12, 2026. TensorZero’s own site says it “remains available on GitHub but is no longer maintained”, and its CEO said on Hacker News that the open-source repository remains available under Apache 2.0 but will not be actively maintained.
  • Portkey is now part of Palo Alto Networks. Palo Alto Networks announced on May 29, 2026 that it had closed the acquisition, and portkey.ai now reads “Portkey is now PRISMA AIRS AI Gateway”. The MIT-licensed open-source gateway repository is still public, but its latest GitHub release is v1.15.2 from January 12, 2026 and its latest commit is from May 25, 2026.
  • Helicone is in maintenance mode. Mintlify announced it was acquiring Helicone in March 2026 and said Helicone would continue in maintenance mode with security updates, bug fixes and new models. Helicone’s website now says it is part of Experiential Labs. The separate open-source AI gateway repository has had no commit since November 21, 2025.
  • Envoy AI Gateway was renamed Agent Router. The project is now an Agentic AI Foundation project at theagentrouter.ai; the repository moved to theagentrouter/agent-router, and the CRDs, CLI (aigw), images and Helm charts keep their names.
  • LiteLLM had two supply-chain incidents. Malicious PyPI releases 1.82.7 and 1.82.8 on March 24, 2026, and a compromised release v1.107.0 on October 21, 2026, both described in LiteLLM’s own incident posts.

Sources: TensorZero repository, Palo Alto Networks press release, Mintlify’s Helicone announcement, Agent Router repository, LiteLLM March 2026 security update and LiteLLM October 21, 2026 incident report.

The alternatives at a glance

Gateway How you run it Licence Published price (USD) GBP Maintenance signal (Dec 2, 2026)
LiteLLM AI Gateway Self-host: Docker, Helm or Terraform with Postgres MIT, except the enterprise directory (separate licence) Open source free. Enterprise: quote-only (SSO free up to 5 users) Not published Active: release v1.112.0 on Dec 1, 2026; two 2026 supply-chain incidents
Bifrost (Maxim) Self-host gateway with web UI, or Go SDK; in-VPC on Enterprise Apache 2.0 Open source free. Enterprise: no public price found, treat as quote-only Not published Active: commit Dec 1, 2026
GoModel Single binary, Docker, Compose or Helm; SQLite, Postgres or MongoDB MIT; Pro is a commercial build Core free. Pro: quote-only, 21-day free trial Not published Active: v0.2.8 on Dec 1, 2026; pre-1.0
Kong AI Gateway Your data planes plus Kong’s Konnect control plane; fully self-hosted via Gateway Enterprise Kong Gateway repository is Apache 2.0; several AI plugins are paid Konnect Plus from $25/month plus usage; see Kong section. Fully self-hosted: quote-only Not published Active: commit Nov 23, 2026
Agent Router (Envoy AI Gateway) Kubernetes with Envoy Gateway, or standalone aigw run Apache 2.0 Open source free. Commercial distributions from Tetrate and others: no public price on the project page Not published Active: v1.3.0 on Nov 18, 2026; commit Dec 1, 2026
Portkey open-source gateway Node (npx), Docker or Cloudflare Workers MIT Open source free. Hosted product is now Prisma AIRS AI Gateway: no public price found Not published Stale: last release Jan 12, 2026; last commit May 25, 2026
Helicone AI Gateway Docker or Kubernetes LICENSE file is GPL-3.0; README badge says Apache Open source free. Hosted: not checked Not published Stale: last commit Nov 21, 2025; Helicone platform in maintenance mode
TensorZero Self-host (Rust gateway with observability and optimisation components) Apache 2.0 Free Not published Archived Jun 12, 2026; not maintained
Cloudflare AI Gateway Managed on Cloudflare’s network, not self-hosted Proprietary service Core features free; 5% fee on Unified Billing credits; guardrails billed as Workers AI usage Not published (percentage fee) Managed service
Azure API Management (AI gateway) Managed inside your Azure subscription Proprietary service Basic v2 $0.20548/hour (about $150/month); Standard v2 $0.9589/hour (about $700/month), UK South Basic v2 £0.1567/hour (about £114.39/month); Standard v2 £0.7312/hour (about £533.78/month) Managed service

Azure monthly figures multiply the official hourly rate from the Azure Retail Prices API by 730 hours; they exclude API-call charges, scale-out units and the external Redis cache that semantic caching needs. Microsoft says its prices are estimates converted from USD at London closing spot rates. All other vendors publish USD or percentages only.

LiteLLM proxy

LiteLLM is the incumbent. Its docs describe a self-hosted gateway that gives applications one OpenAI-compatible endpoint for 100+ LLM providers, plus MCP tools and A2A agents. A Postgres database stores keys and spend; the Admin UI at /ui manages models, keys, guardrails, usage and logs.

  • Budgets and keys: a virtual key per user, team or project, each with its own models, budgets and rate limits; spend tracked per key, team, user and tag.
  • Failover: load balancing, fallbacks and retries across deployments.
  • Guardrails: the open-source framework includes custom guardrails and Presidio PII masking; several built-in integrations (for example hide_secrets and lakera_prompt_injection) need an Enterprise licence.
  • Observability: callbacks to Langfuse, Datadog, OpenTelemetry and Prometheus.
  • Enterprise: SSO and SCIM, audit logs, org and team admins, secret managers, IP allowlists and support SLAs; SSO is free for up to five users. Pricing is “based on usage”, contact-sales, and LiteLLM states it is SOC 2 Type II audited.

At a glance

Published price (USD): Open source free; Enterprise quote-only
GBP: Not published
Maintenance signal on Dec 2, 2026: Release v1.112.0 on Dec 1, 2026; last commit Dec 2, 2026 (GitHub)

Watch-out: LiteLLM’s own incident posts describe compromised PyPI releases 1.82.7 and 1.82.8 (March 24, 2026) and a compromised v1.107.0 (October 21, 2026). Pin exact versions or image digests, scan images, and keep provider keys in a secrets manager rather than in the container environment.

Sources: LiteLLM AI Gateway docs, LiteLLM Enterprise docs and the repository.

Bifrost (Maxim)

Bifrost is an open-source gateway written in Go, licensed Apache 2.0. Its docs describe a drop-in gateway with a built-in web UI, plus a Go SDK, in front of 20+ providers; its README describes an OpenAI-compatible API for “10,000+ models”, which is a vendor count of models reachable through those providers rather than a provider count.

  • Open-source features per its docs: automatic fallbacks, weighted load balancing, virtual keys, hierarchical budgets and rate limits (virtual key, team and customer levels), semantic caching, MCP gateway with tool filtering, Prometheus metrics, OpenTelemetry and custom plugins in Go or WASM.
  • Enterprise features per its docs: guardrails (AWS Bedrock Guardrails, Azure Content Safety, Google Model Armor, Patronus AI), adaptive routing, clustering, Okta and Entra identity integration, RBAC, in-VPC deployments and immutable audit logs.
  • Local models: Ollama, vLLM and SGLang are listed providers.
  • Performance: the README says it adds under 200µs of overhead at 5,000 requests per second and the docs quote 11µs; both are vendor figures from the vendor’s own tests and the two pages do not agree.

At a glance

Published price (USD): Open source free; Enterprise: no public price found, treat as quote-only
GBP: Not published
Maintenance signal on Dec 2, 2026: Commit Dec 1, 2026; Helm chart release Dec 1, 2026 (GitHub)

Watch-out: audit logs, guardrails and SSO-style identity features are on the Enterprise list, so check which edition your compliance needs. Sources: Bifrost docs and repository.

GoModel

GoModel is an MIT-licensed gateway in Go from Enterpilot. Its site pitches it as “Like OpenRouter, but open-source and self-hosted”. It ships as a single binary or container with an embedded admin dashboard, and serves OpenAI-compatible (/v1/chat/completions, /v1/responses) and Anthropic-compatible (/v1/messages) APIs, so you swap the base URL and keep your SDK.

  • Providers: the site says 39 providers (OpenAI, Anthropic, Gemini, Vertex AI, Azure OpenAI, Bedrock, Groq, xAI, DeepSeek, Ollama, vLLM, SGLang, llama.cpp and OpenRouter itself, plus any OpenAI-compatible backend). Some write-ups quote 38; the current site says 39.
  • Governance: scoped workflows that toggle cache, audit logging, usage tracking, budgets, guardrails and failover per provider, model or user path; per-key and per-team budgets and rate limits; audit logs with the resolved route and each provider attempt; tags and user paths for cost attribution.
  • Caching: exact-match response caching and semantic caching backed by Qdrant, pgvector, Pinecone or Weaviate.
  • Failover: retries with backoff, circuit breakers and failover chains. Mid-stream failover is listed on the road to v0.3.0, not as shipped.
  • Operations: SQLite by default, PostgreSQL or MongoDB at scale; Prometheus metrics and OpenTelemetry traces.
  • GoModel Pro: commercial build with prompt compression (the site claims 2 to 20% fewer input tokens on agentic traffic), OIDC single sign-on, per-child quota templates, intelligent routing (beta) and egress proxy pools (beta). Licensed per company with nothing counted; price set on a discovery call; 21-day free trial; license is a signed token validated offline.

At a glance

Published price (USD): Core gateway free (MIT); Pro quote-only
GBP: Not published
Maintenance signal on Dec 2, 2026: v0.2.8 released Dec 1, 2026; last commit Dec 1, 2026 (GitHub); version 0.x

Watch-outs: the project is pre-1.0. Its README says budgets are soft limits, so concurrent and in-flight requests can overshoot a limit. GoModel’s benchmark claims (for example 2.32ms median vs 79.16ms for LiteLLM, and 34× lower latency) are the vendor’s own, and the site itself says LiteLLM supports more providers today. Reproduce the benchmark on your hardware and traffic mix before relying on it.

Sources: GoModel site and repository.

Kong AI Gateway

Kong is the choice when an API gateway team already exists. Kong’s docs describe AI Gateway as a control plane for LLM, MCP and A2A traffic. In the current 2.x model the control plane is managed in Konnect while data plane nodes run in your own environment (self-hosted, cloud or Kubernetes); Kong also documents on-prem installs on Docker Compose and Kubernetes, and a fully hosted Dedicated Cloud Gateway option.

  • Routing and failover: routing and load balancing across OpenAI, Anthropic, Azure AI, Bedrock, Gemini and more, with failover to another provider or model when one is slow or unavailable. Its AI Proxy plugin lists Ollama and vLLM among providers.
  • Governance: consumer groups with token quotas and cost budgets, AI cost management with budget alerts, OIDC or Kong Identity attribution, ACLs, and audit logs and OpenTelemetry metrics.
  • Guardrails and caching: prompt guard, semantic prompt guard, PII sanitizer, semantic response guard, AWS, Azure and GCP guardrail integrations, and a semantic cache. Kong’s pricing page lists AI AWS Guardrails, AI Azure Content Safety, AI Prompt Compressor, AI Proxy Advanced, AI Rate Limiting Advanced, AI Sanitizer, AI Semantic Cache and AI Semantic Prompt Guard as paid enterprise plugins.

At a glance

Published price (USD): Konnect Plus “from $25/month plus usage”. In the Plus column of Kong’s pricing table: Hybrid AI gateway control plane $200/month, 1 million AI requests per month included then $200/month per additional million, and $100/month per model for AI plugin model proxying (limit of 5 models on Plus). Kong says Plus card payments are in US dollars only. Fully self-hosted control plane and data plane: Gateway Enterprise, quote-only
GBP: Not published
Maintenance signal on Dec 2, 2026: Kong repository last commit Nov 23, 2026 (GitHub); AI Gateway 2.x docs current

Watch-out: “self-hosted” has two meanings here. Hybrid keeps the data plane in your network but uses Kong’s hosted control plane; running both yourself needs the separate Gateway Enterprise licence. Kong’s 2.x entity model also replaced the AI Proxy plugin configuration, so older tutorials may not match.

Sources: Kong AI Gateway docs, AI Proxy plugin docs and Kong pricing.

Envoy AI Gateway (now Agent Router)

Envoy AI Gateway is the Kubernetes-native option, built on Envoy and Envoy Gateway. In 2026 it was renamed Agent Router, an Agentic AI Foundation project; the maintainers say it is the same code, maintainers, release cadence and Apache 2.0 licence. The project site says it routes to 23 providers out of the box.

  • Routing: OpenAI-compatible API in front of Anthropic, Bedrock, Vertex, Azure or self-hosted vLLM, with provider fallback and model-name virtualization.
  • Limits: token limits per team, app or model. Provider API keys and AWS, GCP and Azure credentials stay with the router and not in your application.
  • Self-managed models: Kubernetes InferencePool support and inference-aware endpoint picking.
  • MCP and observability: one MCP tool catalogue filtered by caller, and OpenTelemetry GenAI conventions for tokens, time to first token and fallbacks.
  • Run it: aigw run starts a standalone router locally; the same configuration later ships to a dedicated gateway or a Kubernetes cluster.

At a glance

Published price (USD): Open source free (Apache 2.0). Commercial products built on it from Tetrate, Nutanix and Paper Compute are listed on the project site; no prices are published there, so treat them as quote-only
GBP: Not published
Maintenance signal on Dec 2, 2026: Release v1.3.0 on Nov 18, 2026; last commit Dec 1, 2026 (GitHub)

Watch-out: the pages we checked do not describe response caching or a spend dashboard, so budgets, caching and chargeback may need to be built around it or bought through a commercial distribution. It is the best fit if you already run Kubernetes and Envoy. Sources: project site and repository.

Portkey open-source gateway

Portkey’s open-source gateway is a small TypeScript router, MIT-licensed, run with npx @portkey-ai/gateway, Docker, Node or Cloudflare Workers. The README says it routes to 1,600+ models and describes retries, fallbacks, load balancing, conditional routing and guardrails driven from one JSON config. Its latency (<1ms) and size (122kb) figures are the vendor’s own.

The README lists secure key management, simple and semantic caching, access control and PII redaction under its enterprise offering rather than the open-source build, and says a “Gateway 2.0” release will merge the enterprise gateway into open source via a pre-release branch.

At a glance

Published price (USD): Open source free (MIT). Hosted product is now sold as Prisma AIRS AI Gateway by Palo Alto Networks; no public price was found on the pages checked, so treat as quote-only
GBP: Not published
Maintenance signal on Dec 2, 2026: Stale: latest release v1.15.2 on Jan 12, 2026; latest commit May 25, 2026 (GitHub)

Watch-out: the roadmap now sits with Palo Alto Networks, which closed its acquisition on May 29, 2026. Running the MIT code today is possible, but do not plan around the 2.0 promise without checking the repository again.

Sources: repository and README and Palo Alto Networks announcement.

Helicone and TensorZero: read the status first

Helicone AI Gateway

Helicone’s open-source gateway is written in Rust and described as a public beta. Its README lists smart routing (latency-based, weighted and cost-based), rate limits per user, team or globally, response caching on Redis or S3, OpenTelemetry, and Docker or Kubernetes deployment, with 20+ providers. The README badge says Apache, but the repository’s LICENSE file is GPL-3.0, and GitHub reports GPL-3.0; have counsel read the file before you embed it.

Helicone announced it was joining Mintlify in March 2026 and moving to maintenance mode (security updates, bug fixes and new models, no new features), and its site now says it is part of Experiential Labs with details to come. The gateway repository’s last commit was November 21, 2025. Fine for an existing deployment; a risky foundation for a new one.

TensorZero

TensorZero combined a Rust gateway with observability, evaluation, optimization and A/B experimentation, under Apache 2.0. Its repository was archived on June 12, 2026, and the project says it is no longer maintained. The code still runs, but nobody ships provider-API fixes or security patches. Use it only if you are ready to maintain a fork; otherwise treat it as design reference for feedback-driven optimisation.

At a glance

Published price (USD): Both free (Helicone gateway GPL-3.0 per LICENSE file; TensorZero Apache 2.0)
GBP: Not published
Maintenance signal on Dec 2, 2026: Helicone: last commit Nov 21, 2025, platform in maintenance mode. TensorZero: archived Jun 12, 2026

Sources: Helicone AI Gateway repository, Mintlify announcement and TensorZero site.

Private but managed: Cloudflare AI Gateway and Azure API Management

Not every team that wants “private” wants to operate a gateway. Two managed services give you policy, caching and logs inside a cloud account you already govern.

Cloudflare AI Gateway

Cloudflare’s pricing docs say core features, dashboard analytics, caching and rate limiting, are free on all plans. DLP scanning is free on all plans; Guardrails uses Llama Guard on Workers AI and is billed as token-based inference; Logpush is billed on volume. Unified Billing, where Cloudflare invoices provider usage, adds a 5% fee on credits purchased (a $100 purchase becomes a $105 charge), with provider inference passed through at no markup. Legacy Logs cap storage at 100,000 logs on Workers Free and 10,000,000 per gateway on Workers Paid. It is a hosted proxy on Cloudflare’s network, so it does not keep traffic off a third party.

Azure API Management AI gateway

Microsoft documents AI gateway capabilities in API Management: the llm-token-limit policy (tokens per minute or periodic quotas per key, working with OpenAI Chat Completions or Responses, Anthropic Messages in v2 tiers, and Google Vertex AI schemas), and semantic caching through llm-semantic-cache-store and llm-semantic-cache-lookup. Semantic caching requires an external Redis-compatible cache such as Azure Managed Redis, which is an extra cost; the built-in cache does not support it. Microsoft’s pricing page lists a separate “AI Gateway tier” with “pricing details coming soon”.

  • Basic v2 unit: $0.20548 per hour (UK South; about $150 a month at 730 hours) and £0.1567 per hour (about £114.39). 10M API requests included.
  • Standard v2 unit: $0.9589 per hour (about $700 a month) and £0.7312 per hour (about £533.78). 50M API requests included.
  • Source for the hourly rates: the Azure Retail Prices API, effective March 1, 2024, USD and GBP queried on Dec 2, 2026; Microsoft’s pricing page notes prices are estimates converted from USD at London closing spot rates.

Sources: Cloudflare AI Gateway pricing, Azure AI gateway capabilities and Azure API Management pricing.

Local model servers: Ollama and vLLM as backends

Ollama (MIT) and vLLM (Apache 2.0) are not gateways. They are model servers you put behind a gateway. The gateway adds keys, budgets, logging and failover on top, so applications use one endpoint whether a request goes to a hosted model or your own GPU. GoModel, Bifrost, Kong’s AI Proxy and Agent Router all document Ollama or vLLM as backends, and LiteLLM lists vLLM among its providers.

Local models change the privacy picture in a way a gateway alone cannot: they are the only path where prompts never leave your network. They also change the cost picture, because you pay for GPUs and operations instead of tokens. Treat them as one more route in the gateway, usually the fallback or the default for sensitive data classes.

When hosted OpenRouter is still the right pick

  • Breadth of models with no operations. One account reaches 700+ models across 100+ providers. A self-hosted gateway only reaches providers you open accounts with.
  • Fast experiments and low spend. The 5.5% credit-purchase fee is a small absolute number at low volume, and you avoid running anything.
  • Managed reliability. OpenRouter pools provider uptime and does not charge for failed attempts. A gateway you run becomes a production service with its own uptime.
  • Data controls that already satisfy you. OpenRouter documents Zero Data Retention routing on every plan, data-policy-based routing, EU and US in-region routing on Business and Enterprise, and says it does not train on your data. If those meet your policy, self-hosting adds work without removing the upstream provider from the path.
  • Mixed setups work too. GoModel and Bifrost both list OpenRouter as a provider, so a self-hosted gateway can keep OpenRouter as the long-tail upstream while direct provider routes handle sensitive or high-volume traffic.

A simple cost test: take your monthly credit purchases, multiply by 5.5% (or 8% on Business), and compare the result with the loaded monthly cost of running two gateway replicas, a database, monitoring and the engineer time to patch and upgrade them. Use your own numbers; we have not published a break-even figure because it depends entirely on your spend and team.

How to choose and how to architect it

If you need… Start with
Broadest provider coverage and the most mature governance in open source LiteLLM, with pinned versions and digests; budget for Enterprise if you need SSO beyond five users, audit logs or SLAs
A small, fast Go gateway with budgets, semantic cache and MCP in the open-source build Bifrost or GoModel; benchmark both on your own traffic (their speed claims are vendor claims)
An API-gateway team’s existing Kong estate Kong AI Gateway, after deciding whether hybrid (Konnect control plane) is acceptable
Kubernetes-native routing and your own inference pool Agent Router (Envoy AI Gateway)
Policy and logging in a cloud you already govern, without operating a gateway Azure API Management or Cloudflare AI Gateway
A stable base for several years Prefer projects with recent releases; avoid starting new on TensorZero, Helicone’s gateway or Portkey’s open-source build without a fork plan

Reference architecture

  • Run at least two replicas behind a load balancer. The gateway is now on the critical path for every model call; give it health checks and an SLO.
  • Keep state in a managed database. LiteLLM’s docs call for Postgres; GoModel supports SQLite, PostgreSQL and MongoDB. Back up keys and budget state.
  • Store provider keys in a secrets manager, not in container environment variables. See our guide to HashiCorp Vault alternatives.
  • Give each team or app its own virtual key, with a model allow-list, a budget and a rate limit, so attribution and blast radius are clear from day one.
  • Set fallback chains deliberately. Fail over between providers that satisfy the same data policy, and log every attempt.
  • Export traces and metrics through OpenTelemetry or Prometheus to the monitoring you already run, and redact prompt bodies in logs where policy requires it.
  • Pin and verify releases. Given 2026’s LiteLLM incidents, deploy by image digest, scan images and avoid latest tags in production.
  • Restrict egress. Let only the gateway reach provider endpoints; applications talk to the gateway.

This reference list is our practical guidance, not a vendor requirement.

Migrating from OpenRouter to a self-hosted gateway

OpenRouter’s FAQ says its API is OpenAI-compatible and migration from OpenAI or Anthropic means updating the base URL and model names. The same is true in reverse for gateways that expose an OpenAI-compatible API. A staged migration looks like this:

Phase 1: inventory

List every OpenRouter model ID, key and OpenRouter-specific feature in use: model variants and the auto or free routers, provider-routing preferences, ZDR flags and fallbacks. Note which providers you already have direct accounts with.

Phase 2: stand up the gateway

Deploy the gateway, add provider keys and create virtual keys per team. Define stable aliases for your model names (GoModel calls them virtual models; Agent Router calls it model-name virtualization) so applications keep a name like smart-chat while the provider behind it changes.

Phase 3: swap the base URL

In the OpenAI SDK, change base_url and the API key; model IDs may need mapping because OpenRouter’s IDs may differ from each gateway’s. Add OpenRouter itself as an upstream provider for models you have not onboarded directly.

Phase 4: test the awkward paths

Streaming, tool calls, structured output, vision and long-context requests behave differently across providers. Run your regression suite against each route, and compare token accounting and cost against OpenRouter’s Activity logs.

Phase 5: canary, then cut over

Send a small share of traffic through the gateway, with fallback to OpenRouter, then raise it. Rate limits now come from your own provider accounts, so request higher limits before cut-over.

Two gaps to plan for: OpenRouter’s single credit balance becomes several provider invoices, and its model-catalogue convenience (new models appearing without contracts) becomes a per-provider onboarding task. GoModel notes it can return each request’s cost as usage.cost, in OpenRouter’s shape, which can ease cost-tracking code that already reads that field.

What we could not verify

  • No public Bifrost Enterprise price, LiteLLM Enterprise price, GoModel Pro price, Agent Router commercial price, or Palo Alto Networks (Prisma AIRS AI Gateway) price was found on the official pages checked, so they are shown as quote-only.
  • Helicone’s licence is contradictory: its repository LICENSE file is GPL-3.0 and its README badge says Apache.
  • Performance figures (GoModel vs LiteLLM, Bifrost overhead, Portkey latency) are the vendors’ own and were not reproduced.
  • Model, provider and “10,000+ models” counts are the vendors’ own and change frequently; GoModel’s count of 39 differs from earlier write-ups of 38.
  • GBP prices are not published by OpenRouter, Cloudflare, Kong, LiteLLM, Bifrost, GoModel or Agent Router. Azure is the only vendor here that publishes GBP, converted from USD.

All facts were checked on Dec 2, 2026 against the sources linked in each section. Gateway products change quickly, so re-check the linked pages before you commit.

Frequently asked questions

What is a self-hosted OpenRouter alternative?

It is a gateway you run in your own environment that gives applications one OpenAI-compatible endpoint in front of many model providers, with routing, failover, budgets and logs. You bring your own provider keys and pay providers directly. Examples with a public repository or docs include LiteLLM, Bifrost, GoModel, Kong AI Gateway, Envoy AI Gateway (now Agent Router) and Portkey’s open-source gateway.

Does OpenRouter mark up model prices?

No. OpenRouter’s pricing page says inference is billed at the provider’s list price on every plan. Its fee is charged when you buy credits: 5.5% on Standard (with a $0.80 minimum per its FAQ) and 8% on Business, with Enterprise fee discounts available. GBP is not published.

Can I use my own provider keys with OpenRouter instead of self-hosting?

Yes. OpenRouter’s BYOK allowance is $25,000 of list-price inference per month with no OpenRouter fee on Standard and Business, then 5% of what the same request would cost at list price on OpenRouter. Your traffic still passes through OpenRouter, so BYOK changes billing, not where requests are handled.

How is GoModel different from OpenRouter?

OpenRouter is a hosted service you buy credits on. GoModel is an MIT-licensed gateway you run yourself, with your own provider keys, and its site says it supports 39 providers. Pro, its commercial build, is licensed per company with price set on a discovery call. Treat GoModel’s speed comparisons with LiteLLM as vendor benchmarks until you reproduce them.

Which self-hosted LLM gateways are actively maintained?

On Dec 2, 2026 the GitHub repositories for LiteLLM, Bifrost, GoModel, Kong and Agent Router (formerly Envoy AI Gateway) all had commits within the previous two weeks. Portkey’s open-source gateway had no commit after May 25, 2026 and no release after January 12, 2026. TensorZero’s repository was archived on June 12, 2026. Helicone’s AI gateway repository had no commit after November 21, 2025.

Is LiteLLM safe to run after its 2026 security incidents?

LiteLLM published two incident reports. In March 2026 PyPI releases 1.82.7 and 1.82.8 were malicious; LiteLLM said users of its official proxy Docker image were not affected. On October 21, 2026 release v1.107.0 was compromised on PyPI and in container registries. Pin versions or image digests, do not track a latest tag, and rotate any secrets that were exposed to an affected version.

Does self-hosting keep my prompts private?

Only partly. A self-hosted gateway keeps routing logic, keys, logs and caches inside your network. Prompts still go to whichever upstream provider you call, under that provider’s data terms. Prompts stay entirely in-house only when the backend is a model you run yourself, for example through Ollama or vLLM.

Can a gateway sit in front of local models such as Ollama and vLLM?

Yes. GoModel, Bifrost, Kong AI Proxy and Agent Router document Ollama or vLLM backends, and LiteLLM lists vLLM among its providers. The gateway then exposes cloud and local models behind one endpoint.

Are Cloudflare AI Gateway and Azure API Management self-hosted?

No. Both are managed services. They suit teams that want policy and logging inside a cloud account they already govern, not a gateway they operate. Cloudflare’s core AI Gateway features are free and its Unified Billing adds a 5% fee on credits; Azure API Management bills by tier and hour.

When should I stay on OpenRouter?

Stay when your priorities are broad model access with no operations work, one invoice, quick experiments and low volume. OpenRouter’s pricing page lists 700+ models across 100+ providers, which no self-hosted gateway matches without you opening and managing accounts with each provider.

Want a private LLM gateway recommendation?

Tell us your providers, monthly model spend, compliance constraints and where you run. We will shortlist two gateways from official docs and prices, and outline a staged cut-over from OpenRouter.

We'll get back to you shortly. We use your details only to reply to this request.