Skip to content
Agent Radar
List

LiteLLM alternatives open source: Portkey and OpenRouter

Updated By Agent Radar5 min read

Short answer

LiteLLM alternatives compared: Portkey's MIT-licensed gateway repo and OpenRouter's API, with migration notes (checked 2026-10-14).

Top pick: Portkey. Portkey's gateway repository describes an AI gateway with integrated guardrails that routes to 1,600+ LLMs through one API. Its docs show native SDKs and OpenAI SDK usage via a gateway URL.

Quick comparison

Rank order is editorial
LiteLLM alternatives open source: Portkey and OpenRouter: quick comparison
PickLicensePricingSource
1.PortkeyMITNot statedGitHub
2.OpenRouterNot statedNot statedWebsite

Two documented options for teams leaving LiteLLM, as checked 2026-10-14: Portkey, whose gateway repository reports an MIT license, and OpenRouter, which exposes an OpenAI-compatible API at openrouter.ai whose license and pricing the cited sources do not state. Portkey's sources describe a gateway; OpenRouter's describe an API endpoint and SDKs.

Quick comparison

ToolBest fit (from sources)LicensePricing as statedPrimary source
PortkeyTeams that want a gateway with guardrails and a repo they can inspectMIT (GitHub API)not statedPortkey-AI/gateway
OpenRouterTeams that want to call models through one API endpoint with existing OpenAI SDK codenot statednot statedQuickstart

Why teams look beyond LiteLLM

The cited sources do not give reasons for leaving LiteLLM, so treat these as criteria to check rather than documented complaints.

  • License clarity: the GitHub API does not report a recognized license for the LiteLLM repository, while it reports MIT for Portkey's gateway repository.
  • Packaging: LiteLLM's docs describe a Python SDK, a separate litellm-core package and a self-hosted proxy with an admin UI. Check whether you need all of that.
  • Hosting model: decide whether you want to run a gateway yourself or call a provider-hosted endpoint.

LiteLLM itself is described in its docs as an open-source library giving a unified interface to 100+ LLMs in the OpenAI format, with a self-hosted gateway offering virtual keys, cost tracking and an admin UI. See the LiteLLM hub for more.

How the options differ

Portkey

The Portkey gateway repository describes an AI gateway with integrated guardrails that routes to 1,600+ LLMs and 50+ guardrails through one API. Its topics include mcp-gateway and model-router.

Portkey's docs show a native SDK in Python and Node, plus a curl call to api.portkey.ai/v1/chat/completions. They also show the OpenAI SDK pointed at a Portkey gateway URL with Portkey headers.

For enterprises, the docs say managed hosting is available to deploy Portkey inside private clouds. They also say a feature that does not store request and response bodies can be enabled on request. The docs page is titled as Prisma AIRS AI Gateway, so check naming and packaging before you plan.

OpenRouter

OpenRouter's quickstart shows a chat completions endpoint at https://openrouter.ai/api/v1/chat/completions. Examples cover Python requests, fetch, curl, and the OpenAI SDK with a changed base URL.

The docs also list an @openrouter/sdk package, a Python openrouter client, an @openrouter/agent package for tool use, and an MCP URL.

Practical migration notes

Application code that uses LiteLLM's completion() interface will need to change. Both alternatives show chat-completions style calls, so the message format in the examples is similar to LiteLLM's OpenAI-format responses.

  • API surface: both alternatives' docs show the OpenAI SDK working with a changed base URL. OpenRouter needs a bearer key, and Portkey needs a Portkey key plus provider headers.
  • Model names: LiteLLM uses provider-prefixed names such as openai/.... OpenRouter's examples use names such as ~openai/.... Portkey's examples pass a provider separately. Map names before cutover.
  • Self-hosting: the Portkey repository is public under MIT. Whether OpenRouter can be self-hosted is not stated in the cited sources.
  • Proxy features: LiteLLM's virtual keys, cost tracking and admin UI have no documented one-to-one equivalent in the excerpts we read. Verify each one you rely on.

How we compared

We read the GitHub repository metadata for Portkey and LiteLLM, the Portkey introduction docs, the OpenRouter quickstart and the LiteLLM getting-started docs. All were checked on 2026-10-14. We did not run any gateway, measure latency or cost, or test migration of a real LiteLLM config.

Limitations

  • Pricing, free tiers and rate limits are not stated in the cited sources for either option.
  • OpenRouter's license and self-hosting options are not stated.
  • No source here states Go support. LiteLLM's repo mentions a Rust core, but no Rust or Go alternative is documented in these sources.
  • Provider coverage, streaming and function-calling parity with LiteLLM are not verified.
  • A repository license does not imply that any hosted service is free.

Related: LiteLLM hub, Portkey hub, OpenRouter hub, Agent infra category and the broader guide Best LLM gateway: LiteLLM, Portkey, OpenRouter compared.

The picks

In rank order
  1. Rank 1

    Portkey

    MITOpen source

    Portkey's gateway repository describes an AI gateway with integrated guardrails that routes to 1,600+ LLMs through one API. Its docs show native SDKs and OpenAI SDK usage via a gateway URL.

    Pros

    • Repository license reported as MIT by the GitHub API
    • Docs show OpenAI SDK usage by changing the base URL and headers
    • Managed hosting in private clouds is offered for enterprises

    Cons

    • Pricing is not stated in the cited sources
    • Docs page is titled as Prisma AIRS AI Gateway, so naming may be in flux
    • Self-hosting steps are not stated in the cited excerpts
  2. OpenRouter's quickstart shows a chat completions API at openrouter.ai/api/v1 usable from raw HTTP, its own SDKs, or the OpenAI SDK with a changed base URL.

    Pros

    • Documented OpenAI SDK usage with a base URL change
    • Offers TypeScript and Python SDKs and an agent package
    • Lists an MCP endpoint

    Cons

    • License is not stated in the cited sources
    • Pricing is not stated in the cited sources
    • Self-hosting is not stated in the cited sources

Questions

What are open-source alternatives to LiteLLM?

Among the sources checked, Portkey's gateway repository reports an MIT license. OpenRouter's license is not stated in the cited sources.

Can I self-host a LiteLLM alternative?

Portkey's gateway code is in a public MIT-licensed repository, and its docs mention managed hosting in private clouds for enterprises. Self-hosting for OpenRouter is not stated in the cited sources.

Is there a free LiteLLM alternative?

Pricing is not stated in the cited sources for Portkey or OpenRouter. An MIT repository license does not mean hosted use is free.

Is there a Rust or Go alternative to LiteLLM?

The cited sources do not document a Go alternative. LiteLLM's own repository description mentions a Rust core, and neither Portkey nor OpenRouter is described by language in the excerpts.

More guides

View all
Comparison

Agno vs CrewAI: agent frameworks compared

Agno vs CrewAI compared from repo metadata and product sites: Agno's agent service and AgentOS layer versus CrewAI's enterprise build and runtime platform.

Top pick
Agno
Read time
5 min
Updated
Comparison

Agno vs LangChain: agent frameworks compared

Agno vs LangChain compared from repo metadata and docs: Agno targets running agents as a service, LangChain a model-agnostic agent API.

Top pick
Agno
Read time
3 min
Updated
Comparison

Agno vs LangGraph: agent frameworks compared

Agno vs LangGraph compared from repo metadata and docs: service layer for agents versus a durable orchestration runtime, checked 2026-10-14.

Top pick
Agno
Read time
5 min
Updated