Overview
OmniRoute is an MIT-licensed AI gateway that you install and run on your own machine. It aggregates hundreds of model providers — the major labs (OpenAI, Anthropic, Google Gemini, xAI, DeepSeek, Mistral, Qwen, Meta Llama, Groq, NVIDIA) alongside many smaller ones, a large share of which have free tiers — and exposes all of them through a single OpenAI-compatible `/v1` endpoint on `localhost:20128`, with a web dashboard for managing credentials and routing.
The point of the aggregation is resilience and cost. Requests can be sent to the special `auto` model and OmniRoute picks a provider for you; when one fails or hits a quota, quota-aware fallback moves the request on, backed by circuit breakers, exponential backoff and per-connection cooldowns. A multi-engine compression pipeline (which bundles techniques such as RTK, Caveman and LLMLingua-2) can shrink prompts before they go out, and a set of routing strategies covers priority, round-robin, cost-optimised, auto-scoring, fusion and pipeline modes.
It is aimed squarely at coding agents: the project lists integrations with Claude Code, Cursor, Cline, Codex, GitHub Copilot, Continue, Aider, OpenCode and other CLI tools, all of which just need their base URL pointed at the local gateway. Credentials are stored locally with AES-256-GCM encryption and telemetry is off by default; MCP and A2A support lets an agent drive the gateway itself. It is written in TypeScript and ships via npm, Docker, pnpm, AUR and Nix.
What it does
- One OpenAI-compatible endpoint in front of hundreds of providers and models, including many free tiers
- Quota-aware automatic fallback with circuit breakers, exponential backoff and per-connection cooldowns
- A range of routing strategies — priority, round-robin, cost-optimised, auto-scoring, fusion and pipeline
- A multi-engine prompt-compression pipeline (RTK, Caveman, LLMLingua-2 and others) to cut outbound tokens
- Zero-config `auto` model selection, so a client can work before any provider key is added
- MCP and A2A support so agents can control the gateway as a tool
- Local-first by design: AES-256-GCM encrypted credentials and no telemetry by default
Getting started
OmniRoute installs as a global npm package and runs as a local server with a dashboard. Docker, pnpm, AUR and Nix packages are also available.
Install and start the gateway
Install globally with npm, then run it. The server comes up on http://localhost:20128 with a dashboard and an OpenAI-compatible API at /v1.
npm install -g omniroute
omnirouteConnect a provider
Open the dashboard and connect a provider. A free-tier provider is enough to start — you do not need a paid API key to make the first call.
Send a request through it
Call the special `auto` model and let OmniRoute pick a provider and fall back if one fails.
curl http://localhost:20128/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"user","content":"Hello!"}]}'Point your coding agent at it
Set your IDE or CLI agent's base URL to the local gateway. The project documents integrations for Claude Code, Cursor, Cline, Codex, GitHub Copilot, Continue, Aider and OpenCode, among others.
http://localhost:20128/v1Tune routing and compression
Configuration comes from environment variables in a .env file, the dashboard panels, CLI commands or per-request headers — covering compression mode, routing strategy, provider credentials and proxy settings.
Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Give a coding agent one stable endpoint and let the gateway handle provider outages and quota limits
- Cut spend by routing cheap requests to free or low-cost providers and compressing prompts before they leave
- Try many models from many providers without wiring up a separate SDK and key for each one
- Keep keys and traffic on your own machine when a hosted gateway is not acceptable
How OmniRoute compares
OmniRoute alongside other open-source gateways & routing tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| OmniRoute | ★ 79.9k | A local-first AI gateway that puts hundreds of providers behind one OpenAI-compatible endpoint |
| Free Claude Code | ★ 62.7k | A local proxy that points Claude Code, Codex, Pi, OpenCode, Cline and other agent CLIs at 50 free, paid, subscription or local model providers, with automatic failover and an admin UI. |
| LiteLLM | ★ 61.8k | A Python SDK and proxy server that gives one OpenAI-compatible API to 100+ LLM providers, with cost tracking, budgets, fallbacks, rate limiting, and an admin UI. |
| Kong Gateway | ★ 44.3k | A Lua/NGINX API gateway whose AI Gateway plugins put one universal endpoint in front of OpenAI, Anthropic, Gemini, Bedrock and other providers, with semantic routing, caching and MCP traffic governance. |
| 9Router | ★ 31.2k | Local OpenAI-compatible router for coding CLIs that tracks per-provider quota, falls back from subscription to cheap to free models, and compresses tool results to cut tokens. |
| magpie | ★ 19.5k | Menu bar app and local gateway that lets Claude Code, Codex, Gemini CLI and dozens of other coding agents run on any provider's model, with routing groups that fail over across accounts when a quota runs out. |
| OpenCodex | ★ 17.8k | Local proxy that translates the Codex Responses API to 40+ providers, so Codex CLI, Claude Code and Grok Build can run on any model, with routing combos, failover and account pooling. |
| Apache APISIX | ★ 17.2k | A cloud-native API gateway whose AI plugins add multi-provider LLM proxying, load balancing, retries and fallbacks, token-based rate limiting, and content moderation. |