LiteLLM alternatives: when a self-hosted proxy stops being enough
LiteLLM is the reason most teams never evaluate a commercial gateway: it is open source, it speaks the OpenAI schema, and it removes the immediate pain of juggling provider SDKs. It is a good default.
It is also a proxy you run. This page is about the point where that stops being an asset — and what to check before you migrate, from someone who ran both shapes.
What LiteLLM does well
- Schema translation between OpenAI-style requests and a long list of provider APIs.
- Fallback chains you configure yourself: try A, then B, then C.
- Budget and rate controls per key or team.
- Self-hosting, which means no third party sees your prompts.
If your requirements are "one interface, a few providers, and we have an ops team," stop here. Self-hosting is the correct answer and no vendor page will tell you that.
The four signals you have outgrown it
1. You are maintaining routing logic instead of product
Fallback chains start as a list. They become a health-checking system, a price table, a retry policy with idempotency rules, and a per-provider cost ledger. Each of those is a small distributed system, and none of them is your product.
The tell: your proxy repo has more maintainers than your billing service.
2. Provider prices move faster than your deploys
A self-hosted proxy routes on a static config. If three providers offer the same model at rates that shift weekly, a static config structurally overpays — it keeps sending traffic to whichever provider was cheapest the day the config was written.
Marketplaces solve this by taking the best live offer per request. That is the actual product difference: not features, but the update frequency of the thing that decides where your money goes.
3. Key custody is a compliance question, not an ops one
Self-hosting keeps credentials in your environment — good for risk, expensive to audit. Someone must own rotation, encryption at rest, and per-environment separation. In practice this lands on whoever is already on call for the proxy.
4. You need failover you did not write
Configured fallback is deterministic in a way that real outages are not: a provider that accepts connections and then stalls mid-stream will pass a naive health check and fail your user. Getting this right requires streaming-aware health signals and a retry boundary at the first-token mark.
The comparison that actually matters
| Self-hosted proxy | Managed marketplace | |
|---|---|---|
| Routing input | your static config | live provider offers |
| Price freshness | your deploy cadence | per request |
| Ops load | you own upgrades, health, keys | vendor |
| Prompt visibility | only yours | the vendor's policy |
| Cost shape | infra + engineer time | per token |
| Failure mode | config drift, silent staleness | vendor incident, dependency |
| Exit | delete the container | export usage, keep keys |
Neither column wins universally. The mistake is assuming "free and open source" is cheaper without pricing the maintenance.
What a migration has to preserve
Before switching anything, write these down — they are what breaks:
- Model name mapping. Your LiteLLM config probably translates names (
gpt-4o→ a provider-specific id). Any replacement must accept the same strings or you touch every call site. - Error shapes. Application retry logic was written against whatever your proxy returned. Match it, or fix the callers deliberately.
- Streaming semantics. Chunk boundaries,
[DONE]handling, and whether usage arrives in the final chunk. - Per-key budgets. If you gate spend per team, confirm the replacement enforces it server-side rather than in a dashboard.
- Logs. Export before you switch; after migration, old logs are usually the thing you cannot reconstruct.
- Keep the proxy for provider-native features (Anthropic prompt caching headers, Gemini safety settings) that a generic gateway may normalize away.
- Route high-volume commodity models through a marketplace where several suppliers compete on price.
- Keep one direct path to each primary provider as the documented emergency route.
A hybrid that works
Most teams that outgrow LiteLLM do not remove it — they narrow its job.
That arrangement survives a vendor incident in any single leg, and it lets you measure: run the same workload both ways for a week and compare effective cost per 1M tokens.
How to decide in one afternoon
# same 50 requests, both paths, compare effective unit price
for base in https://litellm.internal/v1 https://api.cisoma.com/v1; do
for i in $(seq 1 50); do
curl -s "$base/chat/completions" \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"model":"claude-opus-5","messages":[{"role":"user","content":"ping"}]}'
done
done
Then check three things in the logs: effective price per model, p95 latency, and how many requests needed a retry. If the self-hosted path is cheaper per token than a marketplace after including your time, keep it.
Where these numbers come from
Live marketplace rates behind the comparison come from the pricing page, refreshed against provider offers rather than a static rate card. LiteLLM's own documentation is the reference for what a self-hosted proxy can and cannot do, and OpenAI's production best practices covers the retry and rate-limit patterns any gateway has to implement.
For the routing side specifically, how AI model routing lowers inference costs shows what the policy looks like when it is evaluated per request instead of per deploy, and the routing documentation covers the request shape.
FAQ
Is LiteLLM still the best open-source option?
For Python shops wanting an OpenAI-compatible proxy with broad provider coverage, it remains the default. Evaluate portable alternatives only if you need non-Python deployment or a different licence posture (for example Portkey's gateway).
Can I run LiteLLM and a marketplace together?
Yes, and it is the most common production shape: the proxy handles provider-native features and internal policy, the marketplace handles price-competitive commodity traffic.
What breaks most often in a gateway migration?
Error shapes and streaming semantics, not authentication. Applications written against one gateway's error bodies tend to treat a provider 400 as retryable, which turns a validation bug into a retry storm.
Does a managed gateway see my prompts?
Assume yes unless the policy says otherwise. If prompts are sensitive, either self-host or confirm pass-through with your own keys — and get that in writing before the first production request.
Every number on this page comes from the marketplace's own live offers. Point the OpenAI SDK at Cisoma and keep your code.
Get 100M free tokens