Skip to content
Agent Radar

LLM gateways for fallbacks and cost tracking: LiteLLM, Portkey, OpenRouter

Updated Published By Agent Radar5 min read

LiteLLM
Portkey
OpenRouter

Short answer

Choose a self-hosted or hosted LLM gateway by fallback controls, budget enforcement, license boundaries and real platform costs. Checked October 19, 2026.

Top pick: LiteLLM. For teams operating their own gateway and database, with provider credentials and spend controls under their administration.

Quick comparison

LLM gateways for fallbacks and cost tracking: LiteLLM, Portkey, OpenRouter: quick comparison
PickLicensePricingSource
1.LiteLLMMIT core; enterprise directory separately licensedOSS gateway has no software license fee; infrastructure and inference are separateDocumentation
2.PortkeyMIT gateway repositorySelf-hosted gateway or separate hosted plansDocumentation
3.OpenRouterNot statedProvider inference plus applicable credit-purchase or BYOK feesDocumentation

Start with one decision: do you want to operate the gateway, or buy model access through a hosted service? LiteLLM and Portkey provide gateway software you can run. OpenRouter is the hosted option here. None is a universal winner, and an open-source gateway does not make model inference free.

Checked October 19, 2026. This is a documentation-based shortlist, not a latency benchmark or a hands-on reliability test. The numbered cards are reading order, not performance scores.

Pick by the responsibility you want to own

Your requirementStart by evaluatingQuestion to settle before adopting
Run your own proxy and control team spendLiteLLMWho owns its database, updates and incident response?
Compare an OSS gateway with a managed observability platformPortkeyWhich required controls exist in your chosen edition?
Access hosted models without deploying a gatewayOpenRouterWhich providers, fees and fallback policies are acceptable?

A gateway only controls traffic that goes through it. Keep direct provider credentials out of application clients if you expect gateway policy to apply consistently. Self-hosting the proxy does not keep prompts local when its upstream model runs in someone else's cloud.

LiteLLM: self-hosting with explicit budget dependencies

LiteLLM logo

The repository's license applies MIT terms outside the enterprise directory; that directory has separate terms. An unrecognized license label in repository metadata is not a substitute for reading the license file.

Pricing lists the OSS gateway at $0 to self-host. Enterprise is quoted by annual request capacity, deployment and support needs; features such as SSO and audit logs sit in that separate offer. Hosting and upstream inference remain your costs.

The important operational detail is in the budget documentation: budget enforcement requires a database. A DB-less deployment does not enforce these spending caps. With team-linked keys, understand the team and member budget hierarchy rather than assuming every personal limit applies. Decide who receives alerts and whether your application must stop or degrade when a budget is exhausted.

Fallback configuration covers retry and failover behavior. Treat a backup model as another dependency to qualify, not merely another model name.

What the recent release changes

LiteLLM v1.106.0, released October 18, adds a combined gateway/Postgres/admin-UI quickstart and disables stdio MCP servers by default. The first change is relevant to setup ownership; the second matters if an existing deployment uses local MCP processes. Neither proves a performance advantage. See the release summary, deployment documentation and security advisories when planning an upgrade. We are not endorsing an untested container tag as secure.

Portkey: separate the gateway from the hosted plan

Portkey logo

The gateway repository documents local Node.js and Docker deployment, retries, fallbacks, load balancing and conditional routing. Its MIT license covers that repository, not every hosted platform feature or enterprise contract.

The hosted pricing page lists Developer as free, with 10,000 recorded logs per month and three-day log retention. It explicitly positions that plan for prototypes, not production. Production lists $49/month, 100,000 recorded logs and $9 per additional 100,000 requests; Enterprise has custom pricing and deployment options. These are platform charges, not a promise of free upstream inference.

For procurement, ask which meter applies to your traffic and what happens when recorded-log limits are reached. Also distinguish a basic self-hosted dashboard from managed retention, support and enterprise controls. Do not select a plan from the gateway's license alone.

OpenRouter: hosted routing, not an OSS deployment

OpenRouter logo

Provider routing supports provider ordering, backup-provider control and parameter requirements. Set these deliberately: availability alone does not establish that a backup supports the tools, structured output or data policy your app requires. Restricting providers reduces the set available for recovery.

The pricing page separates inference from platform fees. Standard charges 5.5% on credit purchases and Business 8%; inference uses posted provider prices. With BYOK, Standard and Business include $25,000/month of list-price inference without an OpenRouter fee, then charge 5% above that allowance. BYOK provider inference is billed separately by the provider. The hosted free plan is limited model access, not an open-source software license or unrestricted production capacity. Recheck the live plan before budgeting.

A short acceptance test before switching traffic

This is a suggested test plan, not work we have performed:

  1. Choose one ordinary request, one structured-output request and one tool call from your application. Keep private production data out of the test fixtures.
  2. Simulate a timeout and a rate-limit response in staging. Record which provider and model actually answer, the retry count and the total elapsed time.
  3. Check output compatibility after failover. A valid HTTP response is not enough if the app cannot parse it or the tool schema changes.
  4. Exercise a small test budget and verify that the intended team or key is blocked. Confirm behavior after restart and during database problems rather than assuming a dashboard total is a hard cap.
  5. Compare the gateway's usage record with upstream billing, including retries, cache hits and any auxiliary services. Decide how discrepancies are investigated.
  6. Review what is logged, who can read it, how long it remains and how it is deleted. Then document rollback before moving more traffic.

Bottom line

If operating the proxy is acceptable, compare LiteLLM's budget requirements with Portkey's OSS feature boundary. If avoiding gateway operations matters more, evaluate OpenRouter's hosted routing and fee model. The useful comparison is ownership, failure behavior and total cost, not provider-count marketing or an unmeasured speed ranking.

For deeper tracing requirements, continue to self-hosted LLM observability tools. Product hubs: LiteLLM, Portkey, OpenRouter.

The picks

  1. Rank 1

    LiteLLM

    MIT core; enterprise directory separately licensedOpen source

    For teams operating their own gateway and database, with provider credentials and spend controls under their administration.

    Pros

    • Configurable fallback chains
    • Per-key and team budget controls with a database

    Cons

    • You operate and patch the gateway
    • SSO, audit and other enterprise features have separate terms

    Pricing OSS gateway has no software license fee; infrastructure and inference are separate

  2. Rank 2

    Portkey

    MIT gateway repositoryOpen source

    For teams choosing between a self-hostable gateway and a managed platform with observability.

    Pros

    • Self-hosting documented in the official repository
    • Retries, fallbacks and conditional routing

    Cons

    • Hosted plan features are not identical to the OSS gateway
    • Check logging quotas and retention before choosing a plan

    Pricing Self-hosted gateway or separate hosted plans

  3. For hosted access to multiple model providers without deploying a gateway yourself.

    Pros

    • Provider ordering and fallback controls
    • One hosted model-access service

    Cons

    • Not a self-hostable gateway option in this comparison
    • Check provider policies and request parameter support

    Pricing Provider inference plus applicable credit-purchase or BYOK fees

Questions

Does a free LLM gateway include free inference?

No. Gateway software, model hosting and provider inference are different costs. A hosted free tier or temporary trial is also different from a reusable open-source license.

Which gateway should I choose for fallbacks?

Choose by deployment ownership and failure policy, not a universal ranking. Check whether fallback changes the provider, the model, or both, then test that path against your application requirements.

Can I self-host OpenRouter?

This guide covers OpenRouter as a hosted service. For gateway software you operate yourself, evaluate LiteLLM or the Portkey gateway repository.

More guides

View all