cheaper-inference/OmniRoute
Self-hosted OpenAI-compatible gateway for multi-provider routing and fallback
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
OmniRoute is a TypeScript inference gateway, not a model runtime. A client calls the OpenAI-compatible /v1/chat/completions endpoint with an OmniRoute API key. The model field can select auto, which builds a virtual Combo from eligible connected targets, or a saved Combo, which fixes the target list and routing strategy. The gateway ranks or orders candidates and can try another healthy target when a provider fails, a model is locked out, or quota is exhausted.
The gateway separates client authentication from upstream access. Release v3.8.54 includes a ChatGPT sign-in integration using PKCE and live model discovery, while the Compose web profile adds Chromium/Playwright for browser-cookie providers. These paths share a client-facing endpoint but have different credential lifecycles and runtime requirements.
Key Capabilities & Differentiators
The v3.8.54 catalog lists 394 providers and 1,539 unique chat model IDs across 3,186 provider/model pairs. auto scores eligible targets across 16 factors; auto/fast favors latency and provider health, while auto/cheap favors lower catalog prices. Last-known-good routing stays with the previous successful provider until it fails, then rescores rather than chasing every ranking change.
Saved Combos give operators more control: fill-first stays with the first available target, cache-optimized favors the account likely to have cached the prompt prefix, and context-relay passes a conversation summary when switching accounts. The dashboard and Combos API accept all 22 strategies; the CLI accepts 15. The Cheaper Inference integration exposes native /v1/responses, vision, and tool calling, but that feature set should not be assumed for every route.
Trade-offs & Limitations
Compared with calling the OpenAI API directly, OmniRoute centralizes credentials and fallback policy across providers, but adds a network hop and another service to operate. A fallback can preserve availability while changing output, tool-call behavior, context handling, or final cost. Test the actual target pool with representative requests rather than assuming endpoint compatibility makes models interchangeable. The cost-optimized strategy sorts on catalog input-token price, not total request cost.
The MIT license covers the gateway code, not upstream account access or provider terms. A fresh installation may have no eligible keyless route, and connecting a provider marked tos: avoid does not make it eligible for automatic routing by default. Treat free-tier quotas as external capacity that can change: size against the accounts and shared quota pools you can actually use, not the sum of catalog rows.
Hardware & Deployment Guide
Start with docker compose --profile base up -d, connect an upstream provider, create an OmniRoute API key in the dashboard, and test http://localhost:20128/v1/chat/completions. Add web only for browser-backed integrations. The cli profile bundles CLI tools; host mounts host CLI binaries and is Linux-only. Optional profiles add CLIProxyAPI on port 8317, Qdrant on 6333 for semantic memory offload, or Bifrost on 8080 for routing.
docker-compose.selfhost.yml and docker-compose.ollama-local.yml are present. Self-hosting the gateway does not make cloud routes offline. For API-backed traffic, size the host for concurrency and open streams, then account separately for browser workers, sidecars, or local model serving. The v3.8.54 release adds ChatGPT sign-in with live model discovery and MiniMax Code device-code sign-in; pin the version you test and verify authentication and model discovery before upgrading.
/v1/chat/completions on port 20128 in the quickstart, authenticated with an OmniRoute API key.auto uses a 16-factor scorer; auto/fast and auto/cheap express preferences rather than performance or price guarantees.Teams running coding assistants or internal LLM clients that need one API endpoint, centralized routing policies, and tested fallback across multiple upstream accounts.
One provider meets your needs, native API behavior must be preserved end to end, or you need an offline model runtime rather than a routing gateway.
Quick Start & Installation
# After connecting a provider, create your OmniRoute key in Dashboard → API Keys: 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!"}]}'
Comparison vs. Top LLMs & Inference Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| OmniRoute ★ | 92.1k | +1.5k | TypeScript | MIT | Self-hosted OpenAI-compatible gateway for multi-provider routing and fallback |
| gpt-load | 7.2k | +6 | Go | MIT | Self-hosted Go gateway for routing LLM traffic across providers and credentials |
| freellmapi | 62k | +2.6k | TypeScript | MIT | Self-hosted LLM gateway for routing across free tiers and custom endpoints |
| bifrost | 10.2k | +125 | Go | Apache-2.0 | Self-hosted Go gateway for routing and governing multi-provider LLM traffic |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/cheaper-inference/OmniRoute.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about OmniRoute
How does an existing OpenAI-compatible client connect, and where is the provider chosen?
auto or a saved combo name as the model. The gateway then chooses among eligible upstream routes using the connected provider credentials. Start with /v1/chat/completions, then test the exact endpoints and features your client needs against the targets you intend to use.Does the gateway need a GPU, and how should I size the host?
Can a company self-host OmniRoute for commercial use?
When is OmniRoute a better fit than calling the OpenAI API directly?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy