
OmniRoute
Self-hosted AI gateway that sends Claude Code, Cursor and other coding tools through hundreds of providers with free-tier fallback and token compression.
Open source alternative to:

OmniRoute is a self-hosted AI gateway that puts one OpenAI-, Claude-, Gemini- and Responses-API-compatible endpoint in front of several hundred model providers, 150+ of which carry free tiers. You install it with npm, Docker or the Electron desktop app, connect your own provider accounts (OAuth sign-in, API keys, local runtimes such as Ollama and LM Studio, or keyless public endpoints), then point Claude Code, Codex, Cursor, Cline, Continue, Aider, OpenCode or GitHub Copilot Chat at http://localhost:20128/v1. Requests are matched to your own providers from your machine, and keys, quotas, spend and health are managed in a single local dashboard.
Routing is the core feature. model: auto builds a live combo from the providers you connected, or you assemble your own chain from 22 strategies (priority, fill-first, weighted, cost-optimized, quota-weighted, reset-aware, context-relay and more) with four fallback tiers that run from subscription quota to API keys to cheap models to free tiers. Three resilience layers — a provider circuit breaker, per-key cooldown and per-model lockout — keep one dead key or rate-limited model from ending a session. A 12-engine compression pipeline (RTK plus Caveman by default) cuts eligible tool output and context by 15–95% while a preservation engine leaves code blocks, JSON, URLs and structured data untouched.
Beyond proxying, OmniRoute ships a CLI with more than 80 commands, a built-in MCP server (110 tools over stdio, HTTP or SSE), an A2A agent endpoint, webhooks and a semantic response cache. Provider credentials are encrypted with AES-256-GCM in a local SQLite database, prompts make no extra hop through a hosted service, and telemetry is off by default. Where OpenRouter, Portkey and Cloudflare AI Gateway are metered services between you and the model vendors, OmniRoute is MIT-licensed software you run yourself, and it can route through flat-rate subscriptions and free tiers that hosted gateways generally cannot.
Categories:
Frequently Asked Questions
Which platforms does OmniRoute run on?
OmniRoute installs globally from npm or Bun on Linux, macOS and Windows, and ships a multi-arch Docker image for AMD64 and ARM64. There is an Electron desktop app with a system tray for Windows, macOS and Linux, a separate macOS menu-bar app called OmniRouteTray, and an Android route through Termux that runs without root. The dashboard is also an installable PWA, and a VS Code extension adds OmniRoute models to the native Copilot Chat model picker.
Does OmniRoute work with Claude Code, Cursor and other coding agents?
Yes. Any OpenAI-compatible client can point at the local base URL http://localhost:20128/v1, and the project lists 39 integrations, including Claude Code, Codex CLI, Cursor, Cline, Continue, Aider, OpenCode, Copilot CLI, Gemini CLI, Goose, Kilo Code and Windsurf. The CLI can also launch a tool with credentials injected for that process only, using commands such as omniroute run claude --model openai/gpt-5.4, or write the tool's own config with omniroute configure codex.
What APIs and agent protocols does OmniRoute expose?
The gateway serves an OpenAI-compatible REST surface under /v1 for chat, embeddings, images, audio and OCR requests, and translates Claude, Gemini and OpenAI Responses API formats as well. On top of that it runs an MCP server with 110 tools over stdio, streamable HTTP and SSE, an A2A endpoint with a JSON-RPC 2.0 agent card and six skills, webhooks for request and quota events, and a CLI with more than 80 commands. Remote instances can be driven with scoped read, write or admin access tokens.
How does OmniRoute's token compression work, and does it modify my code?
Compression is a 12-engine pipeline. The default stacked pair is RTK, which filters and deduplicates command and tool output, and Caveman, which condenses prose with rule-based rewriting; combined they are documented at roughly 89 percent savings on eligible payloads, with a 15 to 95 percent range. A preservation engine protects code blocks, URLs, JSON and structured data, and profiles such as Lite, Standard, Aggressive and Ultra control how far it goes, including a per-request x-omniroute-compression header if you want to override the default for a single call.
What are the system requirements to self-host OmniRoute?
OmniRoute needs Node.js 22.22.2 or newer on the 22.x line, or Node 24 LTS and up to 26.x, and stores its data in a local SQLite database, so no external database is required. The Docker image defaults to a 1 GB V8 heap, which is enough for the dashboard and light chat, while one coding agent needs about an 8 GB heap in a 10 GB container. Running two concurrent long /v1/responses contexts needs a 10 to 12 GB heap and 12 to 16 GB of container memory.
OpenAltFinder Score
Project Details
Repository details
Updated 11/22/2026, 7:01:00 AM
View RepositorySponsor OmniRoute
Get the latest open source alternatives delivered weekly.
Discover tools that give you freedom from proprietary software.
Compare OmniRoute with
Similar open source alternatives

Ollama
Get up and running with Llama 3.3, DeepSeek-R1, Phi-4, Gemma 3, Mistral Small 3.1 and other large language models.

Lobe Chat
Open-source AI chat and agent platform with multi-provider support, RAG, plugins, and an agent marketplace — self-hostable ChatGPT alternative.

Onyx
Onyx is an open-source AI chat and enterprise search platform with RAG that works with every LLM. Bring your own model, connect your tools, and unify all your team's knowledge.
Glean
Experiential
Open source AI gateway and router that exposes hosted, BYOK, local, and custom models through one OpenAI-compatible API.
OpenRouter
UnoRouter
Self-hostable frontend for an AI model gateway: model catalog, API keys, usage and a local-first chat client.
OpenRouter
Open WebUI
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)







