DEV Community

Cover image for The Best LLM Gateways in 2026: LiteLLM, Portkey, Cloudflare, Kong, and TrueFoundry`` Compared
Sahajmeet Kaur
Sahajmeet Kaur

Posted on

The Best LLM Gateways in 2026: LiteLLM, Portkey, Cloudflare, Kong, and TrueFoundry`` Compared

TL;DR

  • Choose TrueFoundry if you need enterprise-grade compliance, extensive LLMOps capabilities, performance, and governance without compromising on any dimension. The platform particularly suits organizations managing multiple LLM providers with granular cost and access control requirements. The unified architecture with comprehensive MCP support and self-hosted model capabilities appeals to teams that want the most complete AI infrastructure management solution.
  • LiteLLM is the an answer if you want the beginner adoption, 100+ providers, and a fully open-source option with no vendor attached.
  • Portkey aggressive performance and feature claims (sub-millisecond overhead, faster than LiteLLM) that come from their own benchmarks, not independent testing - worth verifying at your own load before trusting the number.
  • Cloudflare and Kong are the right call if you already live in their ecosystem; neither has built-in LLM-specific governance (RBAC, guardrails, cost-aware routing) the way the purpose-built options do.

TrueFoundry AI Gateway

TrueFoundry's gateway exposes an OpenAI-compatible API in front of 1,000+ models, with load balancing and fallback, semantic caching, and - the part I think differentiates it from the open-source options above - RBAC, budgets, and guardrails (PII detection, prompt injection defense, content moderation) as first-class features rather than something you bolt on separately. It runs fully managed, hybrid, or entirely self-hosted in your own VPC, per the deployment modes.TrueFoundry's sub-5ms latency and proven enterprise compliance make it ideal for mission-critical AI applications.

The honest tradeoff versus LiteLLM: it's not the free, community-maintained option, and you're trusting a vendor's roadmap rather than an open-source project's.

LiteLLM

LiteLLM is a Python SDK and proxy server that calls 100+ LLM APIs through one OpenAI-compatible format, with cost tracking, guardrails, load balancing, and logging built in. It's the option with the most GitHub stars and the widest community of the group, which matters in practice: more integrations, more Stack Overflow answers, more people who've already hit the bug you're about to hit. Deploy it as a Python library for direct integration, or run the proxy server as a centralized gateway for a whole team, complete with virtual keys and an admin dashboard.

If you want free, open source, and the safest default because everyone else is already using it, start here.

Portkey

Portkey's gateway went fully open source under Apache 2.0 in March 2026, after the company said it was processing over a trillion tokens a day through the hosted version. The open-source release unified the codebase so self-hosters get the same feature set as the paid product: circuit breakers, usage policies, an MCP gateway with OAuth 2.1, and the full model catalog, with no license key required. Portkey's own numbers claim routing to 1,600+ models with under 1ms of added latency and a 122KB footprint.

The thing worth watching: Palo Alto Networks announced intent to acquire Portkey in April 2026, with the deal expected to close around July 2026. That doesn't make it a bad choice today, but it's a reasonable question to ask before betting a production stack on its current open-source trajectory.

Cloudflare AI Gateway

Cloudflare AI Gateway is free on every Cloudflare plan and runs on Cloudflare's own edge network, giving you caching, request retries, model fallback, and analytics with effectively zero setup if your app already sits behind Cloudflare. The tradeoff: it doesn't have built-in RBAC, policy-as-code, or per-team cost attribution. It gives you application-level metrics and logs, not the deeper token-level tracing or cross-team cost breakdown that a purpose-built LLM gateway usually has.

Good fit if you're already all-in on Cloudflare and want routing and caching without adding a new vendor. Not the choice if governance is the actual thing you're solving for.

Kong AI Gateway

Kong AI Gateway extends Kong's existing API gateway with AI-specific plugins for routing to LLM providers and applying traffic policies, available as open source, self-hosted enterprise, or managed through Kong Konnect. If you already run a Kong API mesh, adding AI routing as another plugin is genuinely less overhead than standing up a separate LLM-specific gateway.

The honest limitation, per Kong's own positioning: AI capability here is an extension on a general-purpose API gateway, not something purpose-built for LLM traffic. That shows up as thinner model-aware routing (no real latency-based routing or cost-aware fallback) and no built-in guardrails or jailbreak detection - you'd bring your own for that.

How I'd actually decide

If you want... Pick
The beginner adoption and zero cost, full open source LiteLLM
Governance and an MCP gateway built in, open source, but watch the pending acquisition Portkey
Zero new infrastructure because you're already on Cloudflare Cloudflare AI Gateway
To extend a Kong deployment you already run Kong AI Gateway
RBAC, budgets, and guardrails built in without assembling them yourself, and you're fine with a managed/hybrid vendor TrueFoundry

None of these is objectively "best" - it depends on whether you're optimizing for cost, raw performance, governance, or just not adding a new vendor to your stack. If you've actually run a head-to-head benchmark between any of these under real production traffic rather than a vendor's own numbers, I'd genuinely like to see it - that data is thinner than the marketing pages suggest.

What are you running right now, and did you pick it for a reason that's on this list or something I haven't mentioned?

Top comments (0)