Open source LLM gateway with cost routing
RelayPlane is an open source LLM gateway with cost routing built in: install it free under MIT, and it routes each request to the cheapest model that meets the task's complexity, then meters exactly what every request costs in a local ledger.
No paid tier, no fee on your API calls, and a hard spend cap enforced before a runaway job drains the budget. It runs on your machine across 6 native providers plus 300+ more through OpenRouter.
npm install -g @relayplane/proxy relayplane start export ANTHROPIC_BASE_URL=http://localhost:4100 # Cost routing is on by default. View the ledger: relayplane watch
Open source LLM gateways with cost routing, compared
A check means the feature ships and is documented on their public source.
| Feature | RelayPlane | LiteLLM | Bifrost | Helicone |
|---|---|---|---|---|
| License | MIT, no paid tier | OSS + paid enterprise tier | Apache 2.0 | Apache 2.0 (self-host) + paid cloud |
| Cost routing by task complexity, on by default | You configure routing rules | You configure routing rules | Observability-first, routing is manual | |
| Per-request cost ledger included | Spend logs in the proxy database | Logs, self-hosted dashboard | ||
| Hard spend cap, enforced before the call leaves | Budgets per virtual key | Rate limits, budget via plugins | Alerts, not a hard block by default | |
| Install | npm install -g @relayplane/proxy | pip / uv install | Go binary / Docker | Docker / hosted |
| Providers reachable | 6 native + OpenRouter for 300+ more | 100+ providers | 12+ providers | Proxy for major providers |
Sources: LiteLLM README, Bifrost README, Helicone README, RelayPlane source (MIT).
Frequently asked questions
Is there a free, open source LLM gateway with cost routing built in?
Yes. RelayPlane is MIT licensed with no paid tier, and cost-based routing is on by default: it classifies each request by complexity and sends routine work to cheaper models automatically, while pricing every request into a local ledger.
What does "cost routing" mean in an LLM gateway?
Cost routing means the gateway picks which model handles a request based on how complex the task is and what each model costs, instead of always using the model your code named. RelayPlane's classifier is authoritative and routes down: a simple request goes to a cheaper model even if your app requested an expensive one, unless you bypass it.
Do open source LLM gateways track cost per request?
It varies. RelayPlane and Helicone both track cost per request out of the box. LiteLLM and Bifrost log spend too, but the detail and where it lives differs, LiteLLM in its proxy database, Bifrost in its self-hosted dashboard. RelayPlane writes a local SQLite ledger with model, tokens, cost, agent, and session for every request, no separate database to run.
What is the difference between RelayPlane and other open source LLM gateways?
RelayPlane is narrower by design: a local, single-machine proxy focused on cost visibility, automatic cost routing, and hard spend caps, no database, no Docker. LiteLLM and Bifrost are built for platform teams with virtual keys and broader provider coverage. Helicone leans toward observability over enforcement. Pick RelayPlane if you want the cost control and routing to just work on one machine for free.
Get the source
MIT licensed. The whole product is in the repo.
View on GitHub