gateway vs litellm

litellm is much bigger: 58.1k stars against 12.9k. Over the days we have tracked them gateway moved +3.2% and litellm +6.9%, so litellm is growing faster right now.

gateway leads on customization and setup ease. litellm does not take any axis by a clear margin.

Stars and commit dates come from our own daily tracking. The six axes are read off each project's documentation by our review pipeline, so they describe what a project says about itself, not what we measured in its code.

Where they stand today

A tiny, high-performance LLM gateway that routes to 1,600+ models while providing built-in guardrails, retries, and load‑balancing.

Stars
12.9k
Tracked growth
+3.2%
Maturity
Last commit
102d ago
Language
TypeScript
License
MIT
Cost to run
Uses your provider API keys; self-hosted or hosted enterprise plans.

A lightweight, production-ready self-hosted AI gateway that unifies 100+ LLM providers into a single OpenAI-compatible API with virtual keys, spend tracking, guardrails, and load balancing.

Stars
58.1k
Tracked growth
+6.9%
Maturity
Last commit
12m ago
Language
Python
License
NOASSERTION
Cost to run
Self-hosted — your API keys (pay providers)
0%+7%46 tracked days
Portkey-AI/gatewayBerriAI/litellm

Six axes, head to head

Each axis runs 0 to 5. The label under a score is what that project's own docs claim, not a category average.

Axisgatewaylitellm
Context depth
How much of your codebase it sees before it answers: the open diff, the diff plus related files, or the whole repository.
Diff only
No repo context
Noise control
How it keeps output volume down — severity thresholds, deduplication, incremental runs over new commits only.
Guardrails & filters
Basic guardrails
Customization
How far it bends to your team: custom rules, prompts, style guides, per-path config.
Custom rules & prompts
Configurable
Privacy
Whether your code stays on your own infrastructure: fully local, self-hostable, or cloud API only.
Self-hostable
Self-hostable
Model freedom
Whether you can point it at any provider, or it is wired to one.
Bring-your-own keys
Bring-your-own-key
Setup ease
What it takes to get a first useful run out of it.
One-command start
Config + API key

Which one to pick

Pick gateway if…

Easy setup — Run a lightweight, self-hostable gateway in one command that centralizes routing, guardrails, and provider flexibility.

  • Customization: Custom rules & prompts (5/5 against 3/5)
  • Setup ease: One-command start (5/5 against 3/5)
Runs in cli, web-app. Works with byok, openai, anthropic, gemini, other-fixed.

Pick litellm if…

Unified multi-provider support — use one OpenAI-compatible API to call 100+ LLMs with a self-hosted gateway, virtual keys, and cost tracking.

Runs in cli, web-app. Works with byok.

What people want from each one

Questions people ask

Is gateway better than litellm?

gateway leads on customization and setup ease. litellm does not take any axis by a clear margin. gateway is worth picking when easy setup — Run a lightweight, self-hostable gateway in one command that centralizes routing, guardrails, and provider flexibility.

Which of gateway and litellm keeps my code private?

gateway: Self-hostable (4/5). litellm: Self-hostable (4/5).

What does each one cost to run?

gateway: Uses your provider API keys; self-hosted or hosted enterprise plans.. litellm: Self-hosted — your API keys (pay providers).

Full profiles: Portkey-AI/gateway and BerriAI/litellm. Everything else in Gateways & routing.