diegosouzapw/OmniRoute
AI EngineeringSelf-hosted AI gateway that routes coding agents and apps across many model providers with fallback and token compression.
What it does
OmniRoute is a self-hostable AI gateway written in TypeScript. You connect your own provider accounts or API keys, and it exposes one OpenAI-compatible endpoint at http://localhost:20128/v1 that Claude Code, Codex, Cursor, Cline, Copilot and other coding tools can point at. The gateway catalog lists 380 providers, including 153 marked as having free tiers, and routes requests across them according to "combo" strategies (3)(52).
The main pieces are model routing (auto plus 20 strategies such as priority, cost-optimized, and quota-weighted), fallback when a provider or key fails, and a compression pipeline that shrinks prompts before they reach the upstream model. The compression engines, including RTK and Caveman, are documented as saving 15–95% on eligible workloads (31)(32). It also ships a dashboard, a CLI, MCP/A2A interfaces and a desktop/PWA build.
Quick start
Prerequisites: Node.js 22.22.2+ within the 22.x or 24.x–26.x range, and at least one provider account or API key.
-
Install and start the gateway:
npm install -g omniroute omnirouteOn npm 11 or later, npm may block lifecycle scripts. The postinstall step is required for native runtime files; allow the packages named in npm's warning when installing globally (3).
-
Open the dashboard, connect a provider with your own credentials, and copy your OmniRoute API key from Dashboard → Endpoints (19).
-
Call the endpoint:
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!"}]}'autoneeds at least one eligible connection. A fresh install may have no eligible targets if the keyless providers reject third-party clients (21).
Docker, pnpm, source builds and Arch packages are documented as alternatives (3).
Constraints
- Bring your own providers. The advertised free-tier token volume is an aggregate across separately eligible third-party providers, not a grant from OmniRoute; each provider controls its own limits and terms (6).
- Compatibility. The runtime is Node.js 22.x or 24.x LTS, and the README states the supported engine range explicitly. Docker image
latesttracks the highest published stable SemVer, not gitmain(3). - Memory. Coding agents that post to
/v1/responsesneed a much larger V8 heap than the default container's 1024 MB to avoid out-of-memory failures under long contexts (3). - Data and credentials. The gateway and control plane run on your machine; prompts go to the selected upstream provider. Credentials are encrypted at rest, and telemetry is off by default (64).
- License. MIT (3).
HotRepo's take
Between late June and early July 2026 the project appeared on HotRepo's all-language daily snapshot with daily gains of roughly 600–1,000 stars, then rose from about 21k stars on 20 July to about 29k by 25 July, with daily gains between roughly 1,300 and 2,000. By September it had passed 63k stars. Those are single-day snapshot figures rather than a continuous growth curve, so they support the fact of repeated large daily gains but not a trend line. A gateway that consolidates many coding-agent setups into one endpoint fits the pattern of a project being picked up by developers who already use several CLI agents; the README's own free-tier aggregation claims still depend on each upstream provider's policy and should be read as such.
Written by AI from the project's README, updated . The project's own docs are the source of truth.