LLM Routing Solutions: Open Source vs Commercial

Intro

The moment your app calls more than one model provider, the plumbing gets ugly. Different SDKs, different auth, no shared view of spend, and when one provider has a bad afternoon your bot just goes dark. The fix is an LLM gateway: one endpoint in front of every provider that handles routing, fallbacks, cost control, and governance so your app talks to one thing instead of a dozen. There are a lot of options now, commercial and open source, and they serve different teams. So lately I ask myself: “how do you pick the right one?” Let’s break it down.

Note: We left out the cloud hyperscaler gateways (Bedrock, Vertex, Azure AI,etc) as they’re too rigid for the multi-provider, multi-cloud setup this post is about.

The field at a glance

ToolCampLicenseBuilt onBest for
LiteLLMopen-sourceMITPythonWidest provider coverage, self-hosted
Heliconeopen-sourceApache 2.0RustOne-line observability + caching
Bifrostopen-sourceApache 2.0GoMicrosecond overhead at scale
LLM Gateway (llmgateway.io)open-sourceAGPLv3 + EETypeScriptSelf-hosted OpenRouter alternative
Portkeymanaged-firstApache 2.0 coreTypeScriptConfig-driven reliability + observability
Kong AI Gatewaymanaged-firstOSS core + KonnectNginx + pluginsEnterprise governance on an existing API mesh
TrueFoundrymanagedProprietaryKubernetesFull MLOps suite, not just routing
Merge Gatewaymanaged-firstProprietaryHosted SaaSGovernance + audit by default
OpenRoutermarketplaceProprietaryHosted marketplaceBreadth: one key, 300+ models

Open Source

These lead with self-hosting. The code is the product; the paid tier (if any) is for support, SSO, audit and compliance.

I. LiteLLM: The Community Default

A lightweight Python library and proxy (MIT) that calls 100+ providers in the OpenAI format. pip install it or run the container and you own the gateway end to end. Think “host your own OpenRouter.” It translates API parameters and error codes into one consistent shape, so swapping Claude for Gemini is trivial. Out of the box: virtual keys, per-team budgets, spend tracking, load balancing, guardrails, and an admin dashboard. Current stable line is 1.87.x.

📒 Docsdocs.litellm.ai

Pros

  • Widest provider coverage and a neutral, vendor-agnostic abstraction.
  • Full ownership: runs anywhere, no log limits or request quotas.
  • Core is free; Enterprise tier (SSO, audit, JWT) starts around $250/mo.

Cons

  • Ops burden at scale: wants PostgreSQL + Redis plus ongoing patching.
  • Python overhead: GIL and interpreter cost mean multiple instances behind a load balancer past a few hundred to a few thousand RPS (per competitor benchmarks).

Best for developers and startups wanting a customizable proxy, with the DevOps capacity to run it.

II. Helicone: The One-Liner

Observability-first. Change your base URL and you instantly get cost, latency, token usage, and user-level attribution, with routing and failover layered on. The cost lever is caching: for repetitive workloads, a cache hit serves instantly and kills token spend. Apache 2.0 and self-hostable via Docker or Helm for VPC deployments.

📒 Docsdocs.helicone.ai
⚠ Heads-up: Acquired by Mintlify in March 2026 (still Apache 2.0). Also note the caching nuance: the classic proxy cache is exact-match (Cloudflare edge KV), while true semantic-similarity caching lives in the newer Rust AI Gateway, a separate open-source project. Cloud pricing: free at 10k req/mo, Pro $79/mo, Team $799/mo.

Pros

  • Fastest path to observability: one URL change.
  • Caching cuts cost on repetitive traffic.
  • Open source, self-hostable for data control.

Cons

  • Shallower tracing than dedicated observability tools (request-level, not span-level).
  • Ownership change to factor into long-term plans.

Best for product-led teams needing granular cost attribution and developer-friendly debugging.

III. Bifrost: The Speed Demon

The newer, performance-obsessed entrant: open source (Apache 2.0), written in Go by Maxim AI, built so the gateway adds near-zero overhead. Ships as a single binary, starts with zero config (npx or Docker), covers ~20+ providers behind an OpenAI-compatible API. Loaded for production: adaptive load balancing, hierarchical governance, clustering for HA, dual-layer semantic caching (hash + vector, default threshold ~0.8), MCP gateway, vault, and audit logs.

📒 Docsdocs.getbifrost.ai
⚠ Heads-up: The headline numbers (11µs overhead at 5,000 RPS, “50x faster than LiteLLM”) are Maxim AI’s own benchmarks, not independent. They track the general truth that Go beats Python at the proxy layer, but treat exact multiples as marketing. There is also a license conflict: Maxim says governance ships free under Apache 2.0, while operator reports say enterprise features and support need a paid contract. Validate against the current repo before banking on a feature being free.

Pros

  • Microsecond overhead and stable memory under sustained load.
  • Single-binary deploy, straightforward setup.
  • Good semantic caching and full governance/clustering.

Cons

  • Smaller community than LiteLLM.
  • Fewer integrations.
  • Unclear paywall line on enterprise features (see heads-up).

Best for production deployments where performance and stability at scale are the priority.

IV. LLM Gateway (llmgateway.io): The OSS OpenRouter

The cleanest open-source answer to OpenRouter. The project at llmgateway.io (by theopenco) gives you one OpenAI-compatible endpoint across 35+ providers and 280+ models (per its docs), with API-key management, usage analytics (requests, tokens, latency, cost), caching, and automatic failover. It goes beyond text routing, too: standard REST endpoints for embeddings, speech, moderation, and image generation/editing, plus an MCP server you can wire straight into Claude Code, Cursor, or Codex.

The image tools route to Qwen or Gemini, and none of it is enterprise-gated. The Self-hosted runs with Docker (Postgres + Redis). It’s a young but active TypeScript stack, with 1.3k GitHub stars, and BYOK is free on the hosted side.

📦 Repogithub.com/theopenco/llmgatewayAGPLv3 + EE
⚠ Heads-up: It ships under a dual license: the core is AGPLv3, and the commercial features in the ee/ directory need a paid Enterprise license. Two notes. First, AGPLv3 is strong copyleft: if you modify it and offer it as a network service, you must publish your changes, a different posture from LiteLLM (MIT) or Helicone and Bifrost (Apache 2.0). Second, some capabilities are gated: Enterprise covers advanced billing, unlimited data retention (the open core keeps 30 days), team and organization management, custom provider-key configs, and priority support, with hosted plans adding SSO/RBAC, white-label, and custom SLAs.

Pros

  • True OSS aggregator: one API for many providers, self-host or hosted, BYOK free.
  • Multimodal, not just text: image gen (Qwen, Gemini), speech, embeddings, and an MCP server for Claude Code or Cursor.
  • Analytics built in: per-request tokens, latency, and cost out of the box.

Cons

  • Young and small: ~1.3k stars, limited track record next to LiteLLM.
  • AGPLv3 copyleft may not suit teams that modify and serve.
  • Key features gated: retention, team management, and SSO sit behind the Enterprise license.

Best for teams that want OpenRouter’s “one key, many models” convenience but self-hosted and open source, and who can live with AGPL or buy the enterprise tier.

Commercial / Managed-First

These are SaaS. The center of gravity is the managed platform, the support contract, and the compliance story.

V. Portkey: The Control Plane

Portkey LLM gateway

Based on its open source self hosted version, this middleware that adds reliability and visibility without touching app code. Its signature is the Config object: you declare routing logic (retries with exponential backoff, multi-model fallbacks) as configuration, not code. Around it sit deep observability, Virtual Keys (scoped per team or environment so one experiment can’t drain the org budget), prompt versioning, and an MCP gateway.

📒 Docsportkey.ai/docs 📦 Repogithub.com/Portkey-AI/gatewayApache 2.0
⚠ Heads-up: The core gateway is Apache 2.0 and self-hostable (private-cloud, 100% data ownership). Portkey is moving its enterprise features into open source via Gateway 2.0, which is pre-release, so confirm what has actually shipped before depending on it. Bigger picture: Palo Alto Networks has now closed its acquisition of Portkey, folding it into Prisma AIRS as a security control plane. The Apache 2.0 code is protected, but the managed product’s roadmap and pricing will likely re-shape under a security-first owner, the free Developer tier and Production from $49/mo included. Model/provider counts are vendor-reported and inconsistent across Portkey’s own docs.

Pros

  • Config-driven reliability: fallbacks and retries without code changes.
  • Strong observability: single pane for cost, latency, errors across providers.
  • Open-source core now under Apache 2.0.

Cons

  • Now owned by Palo Alto (folded into Prisma AIRS): roadmap may drift from developer DX toward enterprise security.
  • Vendor-reported catalog numbers; verify the live model list.

Best for SRE and DevOps teams building resilient, high-availability AI systems with deep monitoring.

VI. Kong AI Gateway: The Enterprise Incumbent

If you already run Kong for API traffic, the AI Gateway is the path of least resistance. It is a plugin layer on Kong’s Nginx core, so you govern LLM traffic with the same machinery you use for web traffic. The AI plugins are the draw: a PII Sanitizer (20 categories, 9 languages) applied before a prompt leaves for an external provider, Semantic Prompt Guard, semantic caching, AI rate limiting, and semantic load balancing that routes by the meaning of the input. Recent releases added MCP and agent-to-agent governance.

📒 Docsdeveloper.konghq.com/ai-gateway

Pros

  • Enterprise governance out of the box: PII redaction, policy enforcement, audit.
  • Reuses your existing Kong mesh and plugins.
  • Open-source self-hosted core.

Cons

  • Heavy: assumes Kong infrastructure underneath.
  • Opaque pricing: full features run through Konnect (multi-dimensional; third-party estimates exceed $30 per million requests at scale).
  • Plugin velocity: custom logic has historically meant Lua (a knock raised mostly by competitors).

Best for large organizations and platform engineers managing AI traffic alongside a complex microservices ecosystem.

VII. TrueFoundry: The Whole Platform

TrueFoundry LLMOps platform

Not really a gateway, but a full LLMOps platform with gateway functionality inside it. Kubernetes-native and bring-your-own-cloud: it deploys into your own AWS, GCP, Azure, on-prem, or air-gapped account. Alongside the AI Gateway you get GPU model serving (vLLM, SGLang), fine-tuning, agent frameworks, MCP, and prompt management. The gateway reports roughly 3 to 4 ms latency and 350+ RPS on one vCPU (vendor-reported).
Recently it has pushed into the agent layer: an Agent Gateway and MCP Gateway alongside the LLM Gateway, plus the June 2026 acquisition of Seldon AI to pull real-time ML serving under one Kubernetes-native control plane.

📒 Docstruefoundry.com/llmops
⚠ Heads-up: Pricing is not cleanly public. A widely cited “$499/mo Pro tier” figure traces back to TrueFoundry’s own blog and could not be independently confirmed. Treat enterprise pricing as custom.

Pros

  • Full lifecycle: serving, fine-tuning, agents, gateway in one platform.
  • BYO-cloud, including air-gapped, good for regulated industries.
  • Kubernetes-native for teams already deep in K8s.

Cons

  • Overkill if you only need routing.
  • Heavy setup and learning curve; platform tax on everything.
  • Aimed at large enterprises, not startups.

Best for ML teams that need a full platform and already use Kubernetes extensively.

VIII. Merge Gateway: The Governance Play

The new kid on the block, launched March 31, 2026 by Merge, the unified-API company behind Merge Unified and Agent Handler. It sits between your app and the providers (OpenAI, Anthropic, Google, xAI, etc) behind one OpenAI-compatible endpoint at gateway.merge.dev/v1, a base-URL swap, with a native SDK if you want a deeper integration.

Build Your Own Router feature. Instead of trusting a black-box ML router, you define what “best” means by weighting benchmarks (HumanEval, MMLU, leaderboards like LMSYS Arena Elo or your own scores). The logic lives in your config, and every decision comes with a plain-language explanation of which model won and why.

Governance: budgets per account, team, or customer, semantic caching, PII filtering and DLP, per-customer region and model policies, and an audit log of every request. Addressing the “governance failures” according to CEO Shensi Ding.

📒 Docsmerge.dev/gateway
⚠ Heads-up: Brand new (launched March 2026), so the production track record is thin next to LiteLLM or Kong, and it is proprietary and hosted-only with no self-host path. Pricing is promo-shaped right now: zero platform fees for 12 months if you sign up before June 30, 2026 (you still pay standard provider rates), with BYOK billed at $0.05 per million tokens. What the steady-state platform fee looks like after the promo is not spelled out, and that deadline is days away as of writing, so check the live pricing page before planning around it.

Pros

  • Transparent routing: config-based benchmark weighting, not a black-box model, with a plain-language reason for every pick.
  • Governance-first: per-customer budgets, region and model policies, DLP, and a full audit trail by default.
  • Enterprise credentials early: SOC 2, ISO 27001, GDPR, and HIPAA, plus a one-line base-URL swap or native SDK.

Cons

  • Very new: limited production track record.
  • Proprietary, hosted-only; no self-host option.
  • Post-promo pricing unclear: the steady-state platform fee after the 12-month offer is not published.

Best for teams whose primary driver is governance and audit, especially regulated or multi-tenant SaaS, that want budgets and DLP without building them.

IX. OpenRouter: The Marketplace

The odd shape in this lineup: less a control plane, more a model marketplace. One API key and one balance buy access to 300+ models from 60+ providers behind an OpenAI-compatible endpoint, with automatic routing, fallback (billed only for the successful run), and per-model price and latency comparison. Founded in 2023, it is now the default aggregation layer for a lot of developers: 8 million users, ~100T tokens per month, a $113M Series B at ~$1.3B in May 2026.

OpenRouter MCP ranking top coding models by price inside a coding agent

Its latest MCP server for Claude Code, Cursor, or Codex: hands free lookups to let your agent pick a model from live benchmarks and pricing, and chat-send runs the job through it (billed against a scoped key). Handy for choosing models; for production you still call the API directly.

📒 Docsopenrouter.ai/docs
⚠ Heads-up: The “no markup on inference” claim is real: per-token rates pass through at provider list price. The fees live elsewhere. There is a 5.5% fee on credit purchases (a $0.80 minimum, so small top-ups effectively pay more), and on BYOK the first 1M requests/month are free, then 5% of the equivalent cost. Credits are prepaid, the free tier is a sandbox (20 RPM, 50 to 1,000 requests/day), and there is no platform SLA below Enterprise. Budget ~5 to 7% overhead on top of token cost.

Pros

  • Breadth: 300+ models, 60+ providers, one key, unified billing.
  • MCP picker and runner: an official server ranks models on live data (free lookups) and runs the job through the chosen one via chat-send (billed).
  • No inference markup; pay-as-you-go, no minimum commitment.

Cons

  • Marketplace fees (5.5% credit fee, 5% BYOK tail past 1M req/mo) need to be in your unit economics.
  • Lighter governance than a control plane: request-level visibility, not deep per-team policy.
  • No client-side retry/backoff or free-tier SLA; you build resilience around it.

Best for developers who want the widest model catalog behind one key, fast, for prototyping and breadth-first apps where governance depth is secondary.

🟢Summary

Head-to-head at a glance

ToolStandout strengthMain trade-offEntry price
LiteLLMWidest coverage, neutralityPython overhead + ops burdenFree → ~$250/mo
HeliconeOne-line observability + cachingShallow tracing; Mintlify-ownedFree → $79/mo
BifrostMicrosecond overhead, single binarySmaller community, fewer integrationsFree → enterprise
LLM Gateway (llmgateway.io)Open-source OpenRouter alternative, analytics built inYoung/small; AGPLv3 copyleftFree self-host → enterprise
PortkeyConfig-driven reliability + observabilityNow Palo Alto-owned (Prisma AIRS)Free → $49/mo hosted
Kong AI GatewayEnterprise governance, PII, semantic routingHeavy; opaque pricingFree self-host → Konnect
TrueFoundryFull MLOps suiteOverkill + platform tax for routing aloneCustom
Merge GatewayTransparent routing + governance/audit by defaultBrand new, unproven; no self-hostZero-fee 12mo promo → usage
OpenRouter300+ models, one key, unified billingMarketplace fees; lighter governance/SLAPass-through + 5.5% fee

Prices, model counts, and performance figures are vendor-reported and move fast. Re-confirm before you budget.

💡When to Pick Which

The first fork is one question: do you want to own the infrastructure, or not?

  • Own it, Python-first → LiteLLM. Widest coverage, flexible custom plugin logic. You own the backend, and pager.
  • Own it, latency-critical → Bifrost. Go, single binary, built for high RPS. Younger ecosystem.
  • Own it, cost is the pain → Helicone. One URL change to start logging spend, with caching to cut the bill.
  • Own it, want an OSS OpenRouter → LLM Gateway. One key, many providers, self-hosted, AGPL or enterprise.
  • Don’t own it, need reliability + governance as a product → Portkey. Eyes open on the acquisition.
  • Don’t own it, governance /audit focusMerge Gateway. Built around budgets, DLP, and audit logs, but very new.
  • Don’t own it, already run Kong → Kong AI Gateway. Extend the mesh you operate.
  • Don’t own it, need the whole ML lifecycle → TrueFoundry. Right call only if you need more than routing.
  • Don’t own it, want every model behind one key fastOpenRouter. Breadth over governance + marketplace fees.

A common pattern:
Pair an open-source gateway for routing with a dedicated observability tool for deep tracing, rather than buying one box that claims to do everything.

Final Thoughts

The day your stack touches a second provider or cluster, the gateway stops being optional. Good news: whatever you need exists, from a single binary you fully control to a managed control plane with a contract behind it.

The big lesson today: the open-core and commercial line is blurred. Most “commercial” tools open-source their core, and most “open-source” ones sell an enterprise tier on top. So pick for your constraints, not the leaderboard, the fastest gateway on a slide is the wrong choice if your real bottleneck is cost attribution or a compliance audit.

Hoping this gave you enough breadth in LLM routing options.

What’s next:

Next, we’ll dive into a practitioner comparison of LLM guardrails solutions, open source vs commercial. Stay tuned!

Share this…

Don't miss a Bit!

Join countless others!
Sign up and get awesome cloud content straight to your inbox. 🚀

Start your Cloud journey with us today .