# Repository Briefing: cheaper-inference/OmniRoute
> Source: https://repoforai.com/repo/cheaper-inference/OmniRoute (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/cheaper-inference/OmniRoute
- **Official Docs / Website**: https://omniroute.online
- **Category**: LLMs & Inference (大模型与推理微调)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (100/100 · Maintenance 35/35 · Adoption 25/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v3.8.54 (2026-11-17) — https://github.com/cheaper-inference/OmniRoute/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Docker, Self-Hosted, API
- **Momentum**: 92,106 ★ total (+150 24h / +1,544 7d) · 14,462 forks
- **Topics**: `a2a`, `ai-agents`, `ai-gateway`, `anthropic`, `claude`, `claude-code`, `cline`, `codex`, `copilot`, `cursor`, `deepseek`, `free-ai`
- **When to Use**: Best for: Teams running coding assistants or internal LLM clients that need one API endpoint, centralized routing policies, and tested fallback across multiple upstream accounts. Skip if: One provider meets your needs, native API behavior must be preserved end to end, or you need an offline model runtime rather than a routing gateway.

## Overview
```text
### Architecture & Core Mechanics
OmniRoute is a TypeScript inference gateway, not a model runtime. A client calls the OpenAI-compatible `/v1/chat/completions` endpoint with an OmniRoute API key. The `model` field can select `auto`, which builds a virtual Combo from eligible connected targets, or a saved Combo, which fixes the target list and routing strategy. The gateway ranks or orders candidates and can try another healthy target when a provider fails, a model is locked out, or quota is exhausted.

The gateway separates client authentication from upstream access. Release v3.8.54 includes a ChatGPT sign-in integration using PKCE and live model discovery, while the Compose `web` profile adds Chromium/Playwright for browser-cookie providers. These paths share a client-facing endpoint but have different credential lifecycles and runtime requirements.

### Key Capabilities & Differentiators
The v3.8.54 catalog lists 394 providers and 1,539 unique chat model IDs across 3,186 provider/model pairs. `auto` scores eligible targets across 16 factors; `auto/fast` favors latency and provider health, while `auto/cheap` favors lower catalog prices. Last-known-good routing stays with the previous successful provider until it fails, then rescores rather than chasing every ranking change.

Saved Combos give operators more control: `fill-first` stays with the first available target, `cache-optimized` favors the account likely to have cached the prompt prefix, and `context-relay` passes a conversation summary when switching accounts. The dashboard and Combos API accept all 22 strategies; the CLI accepts 15. The Cheaper Inference integration exposes native `/v1/responses`, vision, and tool calling, but that feature set should not be assumed for every route.

### Trade-offs & Limitations
Compared with calling the OpenAI API directly, OmniRoute centralizes credentials and fallback policy across providers, but adds a network hop and another service to operate. A fallback can preserve availability while changing output, tool-call behavior, context handling, or final cost. Test the actual target pool with representative requests rather than assuming endpoint compatibility makes models interchangeable. The `cost-optimized` strategy sorts on catalog input-token price, not total request cost.

The MIT license covers the gateway code, not upstream account access or provider terms. A fresh installation may have no eligible keyless route, and connecting a provider marked `tos: avoid` does not make it eligible for automatic routing by default. Treat free-tier quotas as external capacity that can change: size against the accounts and shared quota pools you can actually use, not the sum of catalog rows.

### Hardware & Deployment Guide
Start with `docker compose --profile base up -d`, connect an upstream provider, create an OmniRoute API key in the dashboard, and test `http://localhost:20128/v1/chat/completions`. Add `web` only for browser-backed integrations. The `cli` profile bundles CLI tools; `host` mounts host CLI binaries and is Linux-only. Optional profiles add CLIProxyAPI on port 8317, Qdrant on 6333 for semantic memory offload, or Bifrost on 8080 for routing.

`docker-compose.selfhost.yml` and `docker-compose.ollama-local.yml` are present. Self-hosting the gateway does not make cloud routes offline. For API-backed traffic, size the host for concurrency and open streams, then account separately for browser workers, sidecars, or local model serving. The v3.8.54 release adds ChatGPT sign-in with live model discovery and MiniMax Code device-code sign-in; pin the version you test and verify authentication and model discovery before upgrading.
```

## Key Capabilities
```text
- API surface: OpenAI-compatible `/v1/chat/completions` on port `20128` in the quickstart, authenticated with an OmniRoute API key.
- Automatic routing: `auto` uses a 16-factor scorer; `auto/fast` and `auto/cheap` express preferences rather than performance or price guarantees.
- Policy control: Saved Combos are callable as model IDs; the dashboard and Combos API accept all 22 strategies, while the CLI accepts 15.
- Fallback: A Combo can move to another eligible, healthy target on quota exhaustion, provider failure, or model lockout.
- Catalog scope: v3.8.54 lists 394 providers and 1,539 unique chat model IDs across 3,186 provider/model pairs, not all usable from a fresh install.
- Deployment profiles: Compose separates the minimal gateway from Chromium/Playwright, bundled or host-mounted CLIs, and optional sidecars.
```

## Quick Start / Clone
```bash
# After connecting a provider, create your OmniRoute key in Dashboard → API Keys:
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!"}]}'
```
