cheaper-inference/OmniRoute
AI EngineeringA self-hosted AI gateway that unifies hundreds of providers behind one OpenAI-compatible endpoint with routing, fallback, and token compression.
OmniRoute
OmniRoute is a self-hosted, MIT-licensed AI gateway that puts many model providers behind a single OpenAI-compatible endpoint at http://localhost:20128/v1. You connect your own provider accounts or API keys, then point coding agents and CLIs such as Claude Code, Codex, Cursor, Cline, and Copilot Chat at that endpoint. The README describes 380 registered providers (153 marked free tier), 1,475 chat model IDs, and 20 routing strategies, including a zero-config auto model that builds a virtual combo from your connected providers.
Beyond routing, the gateway adds resilience and cost controls: multi-tier auto-fallback, provider circuit breakers, token compression, MCP/A2A interfaces, and a dashboard. Prompts go to the upstream provider selected per request; OmniRoute says it adds no hosted prompt-processing hop and disables telemetry by default.
Quick start
Install the CLI globally and start the gateway:
npm install -g omniroute
omniroute
On npm 11 or later, lifecycle scripts may be blocked. The README says the postinstall step is required to prepare native runtime files, so allow the named packages during install:
npm install -g --allow-scripts=omniroute,keytar,onnxruntime-node,@parcel/watcher,@swc/core,protobufjs,esbuild omniroute
With the server running, open the dashboard at localhost:20128, connect at least one eligible provider with your own account or API key, and copy your OmniRoute key from Dashboard → Endpoints. Then send a request using auto as the model:
curl http://localhost:20128/v1/chat/completions \
-H "Authorization: Bearer YOUR_OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"user","content":"Hello!"}]}'
The README notes a fresh install may have no eligible keyless targets, so auto needs an eligible route. Docker and source installs are documented as alternatives; use omniroute setup for the guided first-run wizard and omniroute doctor to diagnose providers and ports.
Requirements and constraints
- Runtime: Node.js ≥22.22.2 (24.x LTS supported), with the gateway and dashboard running locally or on a VPS; remote mode lets another machine drive it with scoped tokens.
- Providers: You supply your own accounts and credentials; each provider controls its limits, availability, and terms. The ~1.62B tokens/month figure is an estimate across separately eligible third-party free tiers, not a grant from OmniRoute.
- Routing exclusions: Providers marked
tos: avoidare excluded from automatic routing by default, and connecting an account does not override that setting. - Compression: The 15–95% savings range applies to eligible workloads; the documented default stacked combo (RTK → Caveman) reports about 89% average savings when both engines act on the same payload.
- Docker memory: The image defaults to
OMNIROUTE_MEMORY_MB=1024, enough for the dashboard and light chat; coding agents need a larger V8 heap and container memory. - License: MIT, so self-hosting and modification are permitted.
HotRepo's take
On November 2, 2026, OmniRoute appeared in HotRepo's all-languages GitHub daily ranking snapshot at position 9 on the TypeScript list, with 390 stars gained that day and about 83.8k stars and 12.5k forks in total. That single recorded snapshot shows sustained attention around the project; HotRepo has no additional snapshots or discussion threads for it, so the record does not support claims about longer-term growth. The repository itself is large and detailed, covering installation, routing internals, compression, CLI tools, and operations documentation.
Written by AI from the project's README, updated . The project's own docs are the source of truth.