OmniRoute
352-provider AI gateway with automatic fallback and token compression
Replaces Openrouter, Portkey, Requesty, Vercel Ai Gateway, Inworld Router

Who it's for
Connect your existing coding agent to http://localhost:20128/v1 and let OmniRoute handle provider selection, fallback, and token compression. When a provider's rate limit kicks in mid-task, OmniRoute routes the next request to the next healthy target without interrupting the session.
Skip if you rely on provider-specific features that OmniRoute cannot pass through, such as Anthropic's extended thinking controls or provider-specific streaming behaviors outside the OpenAI-compatible API surface.
Key pools with fair-share quota allocation distribute a shared subscription across team members without each person needing their own API key. Usage analytics on the dashboard show token spend per provider and model, making it possible to identify which workloads consume the most quota.
Skip if each developer already has their own separate API accounts and the team does not need central quota management or a shared fallback configuration.
One OpenAI-compatible endpoint lets you switch providers by changing the model name in your request, not your code. The 19 routing strategies and catalog of 352 providers mean you can shift between OpenAI, Anthropic, Google, and cheaper alternatives without rewriting your integration.
Skip if your application requires provider-specific API features outside the OpenAI-compatible surface, such as Anthropic's tool_choice parameter or Google's safety settings.
OmniRoute catalogs 150+ free-tier providers and a keyless quick-start mode. On a fresh install, the auto combo routes through free providers before escalating to paid tiers. The /dashboard/free-tiers page shows live used and remaining quota across every pool, deduplicated.
Skip if your workflow requires sustained high-throughput output from a specific model. Free tiers are rate-limited; once quota is exhausted within the billing window, OmniRoute falls back to paid routes or stops if no paid fallback is configured.
The problem
Managing AI providers as separate services creates a fragile workflow for developers building coding agents and LLM pipelines. Each provider has its own SDK, authentication format, rate limit, and quota tracker. When Anthropic's rate limit kicks in mid-task, the coding session freezes until you manually switch to a different provider or wait for the quota window to reset. Token costs compound the problem. Tool-calling agents generate large context windows that providers charge at full rate, and there is no built-in mechanism for compressing tool output before sending it upstream. Teams running Claude Code or Cursor across multiple machines often share a single API key or subscription, which accelerates quota burn with no visibility into where the tokens went.
How it works
Routes requests through a Subscription, API Key, Cheap, then Free tier cascade when a provider is unavailable or out of quota. Fallback happens in milliseconds, so a coding session in Claude Code or Cursor continues without interruption even if the primary provider is rate-limited.
An RTK and Caveman compression pipeline reduces eligible context payloads by 15-95%. A tool-heavy workload example in the documentation reduced context from 18,400 tokens to 2,024, an 89% reduction. Compression is composable across dedup, RTK, Caveman, and ultra modes.
The local provider catalog covers 352 providers including OpenAI, Anthropic, Google, DeepSeek, Mistral, Groq, and Ollama. The documented recurring free-tier budget totals approximately 1.47 billion tokens per month across 34 pool keys, deduplicated so shared pools are counted once.
Nineteen routing strategies let you pick a preset (auto, auto/coding, auto/fast, auto/cheap, auto/offline, auto/smart) or build a custom combo with tiered fallback. A 15-factor scoring engine selects the next healthy target at request time based on quota, cost, and provider health.
A built-in MCP server exposes 110 gateway tools across 33 scopes via stdio or HTTP. The A2A protocol layer provides a JSON-RPC 2.0 agent server with 6 skills and an Agent Card at /.well-known, enabling agent-to-agent communication without external infrastructure.
Claude Code, Codex CLI, Cursor, Cline, GitHub Copilot, Gemini CLI, Aider, Goose, Windsurf, and 26 other tools connect by updating their base URL to http://localhost:20128/v1. The OmniCopilot VS Code extension adds OmniRoute models to the Copilot Chat model picker without requiring a Copilot plan.
Features
- 4-tier automatic fallback
- 12-engine token compression pipeline
- 352-provider catalog with 150+ free tiers
- 19 routing strategies (Combos)
- Built-in MCP server and A2A protocol
- 35 coding tool integrations
How to install
Install using the npm package manager and start the gateway on port 20128.
npm install -g omniroute
omnirouteRecommended for this setup
Strengths
- MIT license with fully local operation: The MIT license places no restrictions on commercial or team use. API keys are encrypted at rest with AES-256-GCM and stay on your local machine; no credentials or usage data pass through a third-party cloud. Unlike OpenRouter or Portkey, which route traffic through their own servers, OmniRoute is a process you run on your own hardware.
- Keyless quick-start with no signup: A fresh install responds to requests immediately via keyless free-tier providers (OpenCode Free is pre-wired into the auto combo). No API key, no account creation, no configuration required to get a response. This lets a developer validate the setup before connecting paid accounts.
- Persistent memory with vector recall: Conversational memory with FTS5 keyword search and Qdrant vector recall persists across sessions and providers. This is a capability that commercial AI gateways like Portkey and Vercel AI Gateway do not include natively, requiring external memory infrastructure.
- Nine supported deployment targets: OmniRoute runs as an npm global package, Docker container (AMD64 and ARM64), native desktop app (Windows, macOS, Linux), Android app via Termux without root, Raspberry Pi or ARM server, PWA, OpenCode plugin, VS Code extension, or from source. Teams can run it on a shared server or each developer can run a local instance.
Trade-offs
- 611 open issues on a seven-month-old project: The GitHub repo had 611 open issues as of the research date. The project was created in February 2026 and has grown rapidly to 63,000+ stars, which means the issue tracker has accumulated faster than it can be resolved. Users integrating OmniRoute into production workflows should expect rough edges, particularly around newer provider integrations and edge-case routing scenarios.
- Provider terms risk varies across the free-tier catalog: The README documentation flags 13 providers as having terms-of-service risk (reselling or pooling free tiers may violate their terms). OmniRoute publishes a terms-risk catalog so users can review these, but teams relying on free tiers for production workloads should audit which providers they route through.
- Free-tier budget is re-audited and can decrease: The documented 1.47B free tokens per month is recalculated every two weeks against the live provider catalog. A provider ending its free tier removes that budget from the count. Teams building workflows that depend on free-tier capacity should monitor the /dashboard/free-tiers page, as the budget moves both directions when upstream providers change their policies.
Tech stack
FAQ
Yes. OmniRoute is MIT licensed and free to self-host on your own infrastructure. The keyless quick-start mode routes through free-tier providers on a fresh install with no API key required. The documented free-tier budget is approximately 1.47 billion tokens per month across 34 recurring pool keys, recalculated every two weeks against the live catalog. Using paid providers (OpenAI, Anthropic, etc.) through OmniRoute requires your own API keys, which you pay to those providers directly.
No. OmniRoute is a local process that runs on your machine at localhost:20128. API keys are stored with AES-256-GCM encryption in local storage and sent directly from your machine to the provider. No credentials or prompt content pass through OmniRoute's servers. The self-hosted deployment model means OmniRoute itself never handles your data in the cloud unless you deploy the Docker image to a remote server you control.
OmniRoute supports 35 integrations as of the research date, including Claude Code, Codex CLI, Cursor, Cline, GitHub Copilot (via the OmniCopilot VS Code extension), Gemini CLI, Aider, Goose, Windsurf, Devin CLI, and Kilo Code. Any OpenAI-compatible client that accepts a configurable base URL will work. Configuration typically requires setting the base URL to http://localhost:20128/v1 and an API key (which can be any string for keyless providers).
OmniRoute runs a 3-layer resilience stack: a provider circuit breaker, a connection cooldown, and a model lockout that isolates failures at the smallest useful scope. When the circuit breaker trips, OmniRoute falls back to the next healthy target in the 4-tier cascade (Subscription, API Key, Cheap, Free) without the calling client needing to retry. The fallback selection uses a 15-factor scoring engine that considers quota, cost, and provider health.
Both route AI requests across multiple providers through a single endpoint. OpenRouter is a managed cloud service; OmniRoute is a local gateway you self-host. With OmniRoute, requests go from your machine directly to the provider, so your prompts and API keys never touch a third-party server. OpenRouter offers a simpler setup (no install required) but requires an account and routes traffic through its infrastructure. OmniRoute adds token compression, an MCP server, persistent memory, and coding-tool integrations that OpenRouter does not include.