Open Source Alternatives
  • Alternatives
  • Categories
    Categories by size882 projects
    • Developer Tools461
    • AI & Machine Learning404
    • Web Development196
    • Business & Productivity191
    • Communication & Collaboration126
    • Security & Monitoring126
    • IT Management123
    • Product & Project Management106
    • Cloud & Hosting105
    • Data & Analytics104
    Browse all 21 categoriesLLMOps & AI Tooling, Design & Creative and 9 more
  • Blog
  • Advertise
SearchNotion, Slack, password manager.../
Submit
Open Source Alternatives
  • Alternatives
    • Developer Tools461
    • AI & Machine Learning404
    • Web Development196
    • Business & Productivity191
    • Communication & Collaboration126
    • Security & Monitoring126
    • Browse all 21 categories
  • Blog
  • Advertise
Submit your project

New open source projects by email

The projects we add and every new guide. Free, unsubscribe any time.

Open Source Alternatives LogoOpen Source Alternatives

Handpicked Open Source Alternatives to Paid Softwares

Product

  • Categories
  • Tag
  • Advertise

Resources

  • Blog
  • Collection
  • Submit

Company

  • Privacy Policy
  • Terms of Service
  • Refund Policy
  • Sitemap

Alternatives

  • Claude Code
  • Jira
  • Notion
  • Slack
  • Linear
  • Wispr Flow
  • All alternatives
© 2026 Open Source Alternatives. All rights reserved.
Open SourceAlternatives
Home/Categories/AI & Machine Learning/Litellm
icon of Litellm

Litellm

Open source alternative to Portkey and OpenRouter

  • 61.8K stars
  • MIT with enterprise directory carve-out
  • Active this week
  • Last commit today

Last verified Oct 22, 2026

Run a self-hosted AI gateway that routes 100+ LLM providers through one OpenAI-format API, with virtual keys, spend tracking, and fallbacks.

Visit websiteGitHub61.8K starsDeploy on Hostinger
image of Litellm
TL;DR

Litellm gives you one OpenAI-format interface to call 100+ LLM providers, as a Python SDK or as a self-hosted proxy gateway. The gateway adds virtual keys with budgets, spend tracking per key, team, and user, guardrails, caching, load balancing with fallbacks, and an admin UI. It also fronts MCP servers and A2A agents. The non-enterprise code is MIT-licensed; an enterprise/ directory carries a separate license. Choose it when you want to own the routing layer instead of paying a hosted gateway.

Read the full breakdownHide the full breakdownWho it is for, how it works, trade-offs, the quick start and the FAQ
who it's for

Who Litellm is for#

Central LLM access for an engineering organization

Run the proxy once, issue virtual keys per team with budgets, and let every developer use their usual OpenAI client against one endpoint.

Skip if:

You are a single developer calling one provider, where the provider's own SDK is simpler.

Multi-provider apps with fallbacks

Use the SDK and Router to spread traffic across deployments and fail over automatically when a provider rate limits or errors.

Skip if:

Your application will only ever use a single model from a single provider.

Routing coding agents and MCP tools

Point agents and editors at the gateway so model calls and MCP tool access share one set of keys, logs, and budgets.

Skip if:

You do not want to operate any infrastructure and prefer a managed service.

the problem

The problem it solves#

Calling several LLM providers means juggling different SDKs, authentication schemes, request formats, and error types. Once more than one team shares those models, the harder questions arrive: who holds the provider keys, who is allowed to call which model, what each team spent, and what happens when a provider rate limits or goes down. Hosted gateways answer those questions by sitting between your traffic and the providers. If you would rather keep keys, logs, and routing rules on your own infrastructure, you need a gateway you can run yourself.

how Litellm solves it

How it solves it#

One OpenAI-format interface for 100+ providers

Call OpenAI, Anthropic, Vertex AI, Bedrock, Azure, Ollama, and many more through the same completion() call. Responses follow the OpenAI Chat Completions format, and provider errors map to OpenAI exception types.

Router with retries, fallbacks, and load balancing

Spread requests across multiple deployments and set automatic fallbacks, so one rate-limited or failing deployment does not take your application down.

Self-hosted proxy with virtual keys and budgets

The proxy is an OpenAI-compatible gateway. Issue virtual keys with per-key, team, and user budgets and rate limits, and track spend across every provider in one place.

Guardrails, caching, and logging

Add content filtering, PII masking, and safety checks at the gateway, cache responses, and send input and output to observability tools such as Langfuse, MLflow, and Helicone.

MCP and A2A gateway

Expose MCP servers through a central endpoint with per-key access control, and add A2A agents to the same gateway, so models, tools, and agents share one entry point.

strengths · trade-offs

Strengths and trade-offs#

Strengths

  • Provider switching without code rewritesBecause every response uses the OpenAI format, changing the model string is usually the whole migration, and existing OpenAI clients work against the proxy unchanged.
  • Cost and access control in one placeVirtual keys, budgets, and spend tracking per key, team, and user give platform teams a single place to see and limit LLM usage.
  • Two ways to adopt itStart with the Python SDK inside one application, then move to the shared proxy when a team needs central keys and logging. A leaner litellm-core package exists for SDK-only use.
  • Stated gateway overheadThe README reports 8ms P95 latency at 1k requests per second and links benchmarks, so you can check the figure against your own load.

Trade-offs

  • -Not plain MIT across the whole repositoryThe non-enterprise code is MIT-licensed, and you can use, modify, deploy, and redistribute it freely, including commercially. Content under the enterprise/ directory is governed by a separate license that is not included in the repository, so check those terms before relying on anything from that folder. GitHub reports no SPDX license for the repo.
  • -You operate the gatewaySelf-hosting means you run, secure, upgrade, and monitor the proxy and its supporting services. A hosted gateway removes that work; this one does not.
  • -Large and fast-moving projectThe repository lists over 5,000 open issues, and the docs show packaging changes in flight, such as the separate litellm-core distribution that cannot be installed alongside litellm. Pin versions and test upgrades.
  • -Some features sit in the enterprise tierThe docs list SSO/SAML, audit logs, and advanced security under an Enterprise offering, so teams with those needs should confirm what the open source tier covers.
versus alternatives

Litellm vs alternatives#

LiteLLM vs Portkey

Portkey is a commercial AI gateway. LiteLLM covers similar ground in an open source package that you host: a unified OpenAI-format API, virtual keys with budgets, guardrails, caching, load balancing, and observability callbacks. The practical difference is where it runs. With LiteLLM, the proxy and its logs live on your infrastructure and you carry the operational work. Check Portkey's current feature list and pricing directly before deciding, since this page only describes LiteLLM from its own docs.

LiteLLM vs OpenRouter

OpenRouter is a commercial service for reaching many models through one API. LiteLLM gives you the same single-interface idea, but you bring your own provider accounts and keys, and the gateway runs where you put it. That means you pay providers directly and keep routing rules under your control, in exchange for running the service yourself. LiteLLM also adds team budgets, an admin UI, and MCP and A2A gateways.

Which to pick

Choose LiteLLM when key custody, self-hosting, and per-team spend control matter more than avoiding operations work. Choose a hosted gateway when you want someone else to run the infrastructure.

install · quick start

Quick start#

bash
Self-hosting the proxy needs Python with uv, or Docker plus a litellm_config.yaml for your models.

```bash
uv tool install 'litellm[proxy]'
litellm --model gpt-4o
docker run -v $(pwd)/litellm_config.yaml:/app/config.yaml -p 4000:4000 docker.litellm.ai/berriai/litellm:latest --config /app/config.yaml
```
tech stack · detected from GitHub

What it's built on#

Languages
PythonRustTypeScript
Frameworks
LangChainNext.jsReact
Tooling
esbuild
frequently asked

FAQ#

What is LiteLLM?

LiteLLM is an open source AI gateway that lets you call 100+ LLM providers using the OpenAI format. You can use it as a Python SDK inside your code or deploy the proxy server as a shared gateway for a team.

Is LiteLLM free to self-host?

Yes. The non-enterprise portions are MIT-licensed, so you can use, modify, deploy, and redistribute them for any purpose, including commercial production use. Content under the enterprise/ directory is governed by a separate license that is not included in the repository, so review it before using that code.

How do I start the proxy?

Install it with uv tool install 'litellm[proxy]' and run litellm with a model, or run the Docker image with a litellm_config.yaml mounted. The proxy listens on port 4000 and accepts any OpenAI client.

Can it handle MCP servers and agents?

Yes. The gateway can host a central MCP endpoint with per-key access control and can add A2A agents, alongside the 100+ LLM providers.

also worth a look

Similar open-source tools#

OmniRoute

Alternative toOpenRouter

352-provider AI gateway with automatic fallback and token compression

  • 78,353 GitHub stars
  • MITLicence MIT

freellmapi

Alternative toOpenRouter

One OpenAI-compatible key for 635 free LLM endpoints

  • 38,191 GitHub stars
  • MITLicence MIT

sub2api

Alternative toOpenRouter

One API gateway for Claude, OpenAI, Gemini, and Grok subscriptions

  • 44,454 GitHub stars
  • LGPL-3.0Licence LGPL-3.0

Switchyard

Alternative toPortkey

LLM proxy with API translation and multi-backend routing

  • 3,413 GitHub stars
  • Apache-2.0Licence Apache-2.0

9Router

Alternative toOpenRouter

Smart AI Router with 3-Tier Fallback

  • 31,123 GitHub stars
  • MITLicence MIT

Bifrost

Alternative toPortkey

Open-source AI gateway with 23+ providers, failover, and MCP support.

  • 8,975 GitHub stars
  • Apache-2.0Licence Apache-2.0
by category

Open source tools in these categories#

404

AI & Machine Learning

freeCodeCamp, OpenClaw, REA (Reverse Engineer Anything)
461

Developer Tools

REA (Reverse Engineer Anything), superpowers, Skills for Real Engineers
101

LLMOps & AI Tooling

Hermes Agent, OpenCode, MarkItDown
Hostinger

Run Litellm on your own server

Self-host Litellm on a Hostinger VPS.

Deploy on Hostinger

Featured

Omnara

Alternative toCClaude Managed Agents

Open-source agent deployment API. Self-host or use Omnara Cloud.

  • 2,957 GitHub stars
  • Apache-2.0Licence Apache-2.0
  • #AI Agents

Inbox Zero

Alternative toSuperhuman

AI email assistant that drafts replies and clears your inbox

  • 12,712 GitHub stars
  • AGPL-3.0Licence AGPL-3.0
  • #Email

rakazo

Alternative toGrok Bot

AI teammates you own: your keys, your model, your machine.

  • 4,904 GitHub stars
  • Apache-2.0Licence Apache-2.0
  • #AI Agents
Feature your project

New open source projects by email

The projects we add and every new guide. Free, unsubscribe any time.

Find open source alternatives to paid software

/
  • Claude Code to OpenCode
  • Jira to Windshift
  • Notion to AppFlowy
  • Slack to Mattermost
  • Linear to GitLab
  • Wispr Flow to Handy
  • CapCut to Concat
  • Grok Bot to rakazo
  • Superhuman to Inbox Zero
  • Airtable to AITable
  • Muse to OpenClaw
  • GitHub Copilot to Cline
  • Datadog to Netdata
  • Microsoft Teams to Rocket.Chat
  • Pinecone to Qdrant
  • Zapier to n8n
  • Devin AI to OpenHands
  • Firebase to Supabase
  • 1Password to KeePassXC
  • Confluence to Docmost
  • Contentful to Strapi
  • Adobe Premiere Pro to Shotcut
  • ChatGPT to AnythingLLM
  • LangSmith to Langfuse
  • Claude Code to OpenCode
  • Jira to Windshift
  • Notion to AppFlowy
  • Slack to Mattermost
  • Linear to GitLab
  • Wispr Flow to Handy
  • CapCut to Concat
  • Grok Bot to rakazo
  • Superhuman to Inbox Zero
  • Airtable to AITable
  • Muse to OpenClaw
  • GitHub Copilot to Cline
  • Datadog to Netdata
  • Microsoft Teams to Rocket.Chat
  • Pinecone to Qdrant
  • Zapier to n8n
  • Devin AI to OpenHands
  • Firebase to Supabase
  • 1Password to KeePassXC
  • Confluence to Docmost
  • Contentful to Strapi
  • Adobe Premiere Pro to Shotcut
  • ChatGPT to AnythingLLM
  • LangSmith to Langfuse