OmniRoute is a self-hosted AI gateway that puts a large catalog of model providers behind one OpenAI-compatible endpoint on localhost. Point any tool that speaks the OpenAI, Anthropic, Gemini, or Responses API at that endpoint and calls are routed on your behalf; a fresh install answers immediately with keyless free providers pre-wired, before any credentials are configured.
Routing is organised around combos: a chain of models the gateway moves across when quota runs out, a provider fails, or costs rise. Nineteen strategies are available per combo step — among them priority, fill-first, weighted, round-robin, least-used, cost-optimized, headroom, cache-optimized, and last-known-good-provider — and a set of auto model IDs builds a virtual combo from your connected providers scored for balance, coding quality, latency, cost, or quota headroom. Resilience is layered: a provider circuit breaker, a per-key connection cooldown that honours Retry-After, and a per-model lockout that never disables a whole connection.
A compression pipeline sits in front of the provider and needs no client changes. Twelve engines run in order and can be toggled per combo — session deduplication, context archiving behind retrieve markers, whitespace trimming, tool-result filtering, tabular JSON compaction, extractive relevance scoring, rule-based prose compression, summarization with progressive aging, machine-learning semantic pruning, heuristic token pruning, and an experimental context-as-image encoding. Code blocks, URLs, and structured data are preserved. The default stacked combination is documented as follows:
| Preset | Documented savings | Intended for |
|---|---|---|
| Lite | ~15% | Always-on safe default |
| Standard | ~30% | Daily coding |
| Aggressive | ~50% | Long tool-heavy sessions |
| Ultra | ~75% | Maximum savings |
| Tool-result filtering | 60–90% | Shell, test, build, and git output |
| Stacked | 78–95% | Mixed prompts and tool logs |
The gateway ships a CLI that can launch a supported coding tool through OmniRoute in one command, injecting credentials per process without writing config files, or write that tool’s own configuration interactively. A remote mode runs the CLI locally against an OmniRoute instance on a server. Beyond routing, it exposes an MCP server and an A2A agent endpoint, so an agent can drive OmniRoute itself, and runs as a server, a desktop application, a progressive web app, or under Termux.
Keys are stored locally with AES-256-GCM encryption, and a dashboard reports usage, quota, savings, and p95 latency, including a page that tracks remaining free-tier budget across the catalog.
Features
- One endpoint: an OpenAI-compatible local URL in front of a large registered provider catalog
- Zero-config start: keyless free providers answer an auto request on a fresh install
- Combos: chains of models with automatic movement to the next healthy target on quota, failure, or cost
- 19 routing strategies: priority, fill-first, weighted, round-robin, least-used, cost-optimized, headroom, cache-optimized, and more
- Three resilience layers: provider circuit breaker, per-key cooldown honouring Retry-After, and per-model lockout
- 12-engine compression: context reduction that requires no client changes, with code, URLs, and structured data preserved
- CLI launcher: run or configure a supported coding tool through the gateway, with a dry-run preview
- Remote mode: drive a gateway hosted elsewhere from the local CLI
- MCP and A2A: an agent can call the gateway’s own toolset and other agents over A2A
- API compatibility: OpenAI, Anthropic, Gemini, and Responses API shapes at the same /v1 path
- Local-first storage: keys held locally with AES-256-GCM encryption
- Dashboards: usage, quota, savings, p95 latency, and remaining free-tier budget
Integrates with
Aider
Command-line LLM pair programmer that maps your repo, edits files, and auto-commits each change to git
Claude Code
Terminal-based agentic coding tool that reads your codebase and runs tasks through natural-language commands
Cline
Open-source coding agent with one engine behind VS Code, JetBrains, a headless CLI, an SDK, and a parallel Kanban board
Codex
Lightweight coding agent that runs in your terminal
