
OrcaRouter-Lite
Self-hosted LLM router with a managed safety net. OpenAI-compatible. BYOK. Single-workspace. Streaming. For more advanced routing choose hosted OrcaRouter
Install with your AI
Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.
Install and set up OrcaRouter-Lite (git-clone project) into my current project. Found on https://claudeers.com/orcarouter-lite Repo: https://github.com/Continuum-AI-Corp/OrcaRouter-Lite Homepage/docs: https://www.orcarouter.ai Detected install method: git-clone → git clone https://github.com/Continuum-AI-Corp/OrcaRouter-Lite Category: uncategorized. Platforms: cli, api, desktop, mobile. Read the repo's README for exact setup and env vars, then install it and wire it into my project. Claudeers Health Verdict: unknown; community-verified: false. Confirm the source before running anything.
git clone https://github.com/Continuum-AI-Corp/OrcaRouter-Lite
// compatibility
| Platforms | cli, api, desktop, mobile |
|---|---|
| Operating systems | — |
| AI compatibility | claude |
| License | MIT |
| Pricing | open-source |
| Language | Python |
OrcaRouter Lite
Put a budget on every coding agent. See and cap what Claude Code, Codex, Gemini CLI, OpenCode and your own apps spend, across every model provider, without your prompts leaving your machine. A menu-bar app for one developer, and a self-hosted router for a whole team. MIT licensed.
Languages
Find us: All model APIs · OrcaCode Review · OrcaReplay · OrcaPromptVault
OrcaRouter Lite is the open-source edition of OrcaRouter. It runs on your computer or your server, speaks the OpenAI, Anthropic and Gemini APIs, and can use hosted api.orcarouter.ai as a safety net for outages and for models you don't hold keys for.
The desktop app
The Orca app lives in your menu bar. It runs the router on 127.0.0.1, connects your
coding agents to it, and shows what they spend.
- Spend today, per agent. Today's total sits next to the clock; the panel splits it by agent, and a Monday notification sums up the week.
- A daily budget. Notifications at 80% and 100% of the amount you set. Alerts only by default; tick one box and Orca pauses your coding agents once it's reached.
- One-click connect. Orca edits the agent's own settings, keeps a backup, and restores it when you disconnect.
- Never down. When a provider fails or rate-limits you, requests fall back to another provider or to hosted OrcaRouter, and the app counts how many it rescued. Link your account with
orca link --key sk-orca-…or in setup. - Private by default. Prompts go straight from your agents to the provider you choose. No telemetry.
- Works with your team's gateway.
orca login https://ai-gw.example.com --key …(or "Join my company's gateway" in setup) points your agents at the gateway your platform team runs;orca logoutrestores them.
Install. Just the app: it carries its own engine and a local SQLite file, so there's no
server or database to set up. Installers (.dmg, .deb, .AppImage, .msi) are built by
desktop.yml and attached to each release, starting with
the next tagged version. INSTALL.md covers downloading a build today, opening
it before it's code-signed, first run, start at login and uninstalling. Without the app, the
same engine and CLI are one command away:
uvx --from git+https://github.com/Continuum-AI-Corp/OrcaRouter-Lite orca up
uvx --from git+https://github.com/Continuum-AI-Corp/OrcaRouter-Lite orca connect claude-code
uvx --from git+https://github.com/Continuum-AI-Corp/OrcaRouter-Lite orca status
orca up serves the panel at http://127.0.0.1:8765/desktop/panel.html; to build the
menu-bar app itself, see desktop/. Once the first release is out,
macOS users can also brew install --cask continuum-ai-corp/tap/orcarouter-lite.
Today's spend in Claude Code's status bar: add this to ~/.claude/settings.json.
"statusLine": { "type": "command", "command": "orca statusline" }
orca report prints the week as Markdown (or --format csv) to paste into a chat or a sheet.
| Agent | How it connects |
|---|---|
| Claude Code | Automatic: sets ANTHROPIC_BASE_URL and a dedicated key in ~/.claude/settings.json |
| Codex | Automatic: adds an orca provider (Responses API) to ~/.codex/config.toml and selects it with model = "auto" |
| Gemini CLI | Automatic: sets GOOGLE_GEMINI_BASE_URL and a dedicated key in ~/.gemini/.env, and Gemini CLI's gateway sign-in in ~/.gemini/settings.json |
| OpenCode | Automatic: adds an orca provider to ~/.config/opencode/opencode.json and selects orca/auto; the key stays in a private file OpenCode reads |
| Command Code | Automatic: adds an orca provider to ~/.commandcode/providers.json whose key comes from a private file (Command Code refuses raw keys there) |
| Cline | One paste step: choose API Provider → OpenAI Compatible in Cline and paste the base URL and key the app shows |
| Aider | Automatic: sets openai-api-base, a dedicated key and model: openai/auto in ~/.aider.conf.yml |
| Cursor | One paste step: the app shows a base URL and key for Cursor's model settings |
| Hermes Agent | Automatic: ~/.hermes/config.yaml (Windows: %LOCALAPPDATA%\hermes) → providers.orca, model.provider: custom:orca |
| Pi | Automatic: ~/.pi/agent/models.json → providers.orca; settings.json → defaultProvider: orca, defaultModel: auto |
| OMP | Automatic: ~/.omp/agent/models.yml → providers.orca; config.yml → modelRoles.default: orca/auto |
| Kilo Code | Automatic: ~/.config/kilo/kilo.json → provider.orca, model: orca/auto ({file:…} key) |
| OpenClaw | Automatic: ~/.openclaw/openclaw.json → models.providers.orca, agents.defaults.model.primary: orca/auto |
| Kimi Code | Automatic: ~/.kimi-code/config.toml → [providers.orca], [models.orca-auto], default_model |
| Goose | Automatic: ~/.config/goose/custom_providers/orca.json (auth.command key) + config.yaml → GOOSE_PROVIDER: orca |
| Zed | One paste step: settings.json → language_models.openai_compatible.Orca (api_url, model auto) + key in Zed / ORCA_API_KEY |
| OpenHands | One paste step: /settings → Advanced: model openai/auto, base URL, key |
| DeepSeek Harness | One paste step: Settings → Models → custom OpenAI-compatible provider, model auto |
| ZCode | One paste step: Add provider → Create custom provider → OpenAI chat completions, model auto |
Each connected agent gets its own key: that is how spend is split per agent, and why disconnecting revokes access at once. What the app may touch on your computer is spelled out in SECURITY.md.
Free and open, for good
- MIT, permanently. Everything one developer or one team needs stays in this repository under MIT: routing,
model="auto", budgets, the dashboard, the desktop app. We won't move a feature from Lite to a paid plan. - Paid is for organisations. Governing many teams (SSO/SCIM, role-based access, fleet-wide budgets and policy, audit retention, alerts to Slack and email) lives in hosted OrcaRouter.
- Verifiable. Releases are signed and ship with provenance and an SBOM. See SECURITY.md.
How it compares
| Best for | How it runs | |
|---|---|---|
| OrcaRouter Lite | One developer up to a team that wants spend per agent, budgets and failover without new infrastructure | Desktop app, uvx/pip, or Docker; SQLite by default |
| LiteLLM proxy | Teams that want a large configuration surface and a Python SDK | Self-hosted server; Postgres for spend tracking |
| OpenRouter | One API key for many models, billed by them | Hosted only; prompts pass through their service |
| Claude Code's own gateway support | Companies that only use Claude | Points Claude Code at a gateway you run; Claude models only |
Run it as a server (60 seconds)
Two ways to use OrcaRouter:
Path A — Self-hosted (BYOK)
Run Lite on your own machine; bring your own provider keys.
git clone https://github.com/Continuum-AI-Corp/OrcaRouter-Lite.git
cd OrcaRouter-Lite
cp .env.example .env
# add at least one: OPENAI_API_KEY=sk-... (or ORCAROUTER_API_KEY=...)
docker compose up
# logs: ✓ orcarouter-lite ready. API key: sk-orca-abc123...
Base URL: http://localhost:8000/v1. Use the sk-orca-* key printed at startup.
Path B — Hosted (account required)
No clone, no docker. Register, get a key, point any OpenAI SDK at hosted.
# 1. Register at https://www.orcarouter.ai and copy your sk-orca-* key
# 2. Use https://api.orcarouter.ai/v1 as the base URL
Account required. Hosted handles routing, billing, and the long tail of providers — billed per-token on your OrcaRouter account. See docs.orcarouter.ai/introduction.
Then call it from any OpenAI SDK
Examples below use Path A's localhost base URL — swap for https://api.orcarouter.ai/v1 if you're on Path B.
Python
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8000/v1",
api_key="sk-orca-abc123...",
)
r = client.chat.completions.create(
model="auto", # or "gpt-4o-mini", "claude-3-5-sonnet-latest", ...
messages=[{"role": "user", "content": "Hello!"}],
)
print(r.choices[0].message.content)
Node.js
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "http://localhost:8000/v1",
apiKey: "sk-orca-abc123...",
});
const r = await client.chat.completions.create({
model: "auto",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(r.choices[0].message.content);
curl
curl http://localhost:8000/v1/chat/completions \
-H "Authorization: Bearer sk-orca-abc123..." \
-H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"user","content":"Hello!"}]}'
Open http://localhost:8000/ for the dashboard — providers, routing, analytics, keys (Path A only).
model="auto"
Send model="auto" and OrcaRouter picks the cheapest model in your configured providers that meets the request's capability requirements (tools, vision, JSON mode). No manual routing rules; no rate-limit gymnastics; no if x: ... cost optimization in your code.
client.chat.completions.create(
model="auto",
messages=[{"role": "user", "content": [
{"type": "text", "text": "What's in this image?"},
{"type": "image_url", "image_url": {"url": "data:..."}},
]}],
)
# → routes to the cheapest VISION-capable model your keys cover
The resolved model is exposed back to callers via the x-orca-resolved-model response header so you can log/display what was actually used.
Hosted as upstream (Lite + hosted)
Already running Lite? Set ORCAROUTER_API_KEY to your sk-orca-* from www.orcarouter.ai, and hosted becomes one more provider in the routing chain — covering models your local keys don't:
# .env
ORCAROUTER_API_KEY=sk-orca-hosted-abc...
Use cases:
- Try-before-you-buy — no local provider keys needed
- Local logging — hosted handles routing, Lite stores RequestLog rows for the dashboard
- Failover — local providers fail, hosted is the safety net
Streaming
OpenAI-compatible SSE format with the standard data: ... \n\n framing and a terminal [DONE] sentinel — drop-in for any SDK that already streams from OpenAI.
for chunk in client.chat.completions.create(
model="auto",
messages=[{"role": "user", "content": "Tell me a story"}],
stream=True,
):
print(chunk.choices[0].delta.content or "", end="", flush=True)
Native protocol endpoints (Anthropic + Gemini)
Lite speaks three inbound protocols against one routing pipeline. Clients that only talk Anthropic or Gemini wire formats connect directly — no OpenAI SDK required:
# Claude Code, pointed at Lite (no /v1 suffix in the base URL)
export ANTHROPIC_BASE_URL=http://localhost:8000
export ANTHROPIC_API_KEY=sk-orca-...
claude
# google-genai SDK, pointed at Lite
from google import genai
from google.genai.types import HttpOptions
client = genai.Client(api_key="sk-orca-...",
http_options=HttpOptions(base_url="http://localhost:8000"))
client.models.generate_content(model="auto", contents="Hello!")
Requests are translated at the edge into the same internal pipeline, so
model="auto", the cross-provider prompt cache (shared across protocols),
routing strategies, and the analytics dashboard all work identically. Guides:
integrations/claude-code.md,
integrations/gemini-sdk.md.
Model catalog
100+ chat models are loaded at startup from LiteLLM's community-maintained pricing database — no model list to maintain manually. Each entry exposes:
id(e.g.gpt-4o,claude-3-5-sonnet-latest)provider(mapped to your configured keys)- Capability flags:
supports_tools,supports_vision,supports_json_mode - Per-token input/output cost (drives the savings widget +
model="auto")
GET /v1/models returns the OpenAI-format catalogue.
Deploy somewhere else
| Platform | How |
|---|---|
| Docker | docker run -p 8000:8000 -e OPENAI_API_KEY=... ghcr.io/continuum-ai-corp/orcarouter-lite:<version> (published from the next tagged release; verify it with the commands in SECURITY.md) |
| Render | render.yaml, generates the secrets, keeps the database on a disk |
| Fly.io | fly launch --no-deploy, then the volume and fly secrets set steps at the top of fly.toml, then fly deploy |
| Railway | railway init, railway volume add --mount-path /data, railway variables --set CREDENTIAL_ENCRYPTION_KEY=$(openssl rand -hex 32) --set API_KEY_PEPPER=$(openssl rand -hex 32) --set DATABASE_URL=sqlite+aiosqlite:////data/orca.db, then railway up (builds with railway.json) |
What's in the box
POST /v1/chat/completions— proxy + streaming +model="auto"+ cross-provider prompt cachePOST /v1/messages— Anthropic Messages API ingress (Claude Code / Anthropic SDKs connect directly;+ /count_tokens)POST /v1/responses— OpenAI Responses API ingress (Codex and Responses SDK clients; streaming, function and custom tools)POST /v1beta/models/{model}:generateContent— Gemini API ingress (google-genai SDK connects directly;+ :streamGenerateContent,GET /v1beta/models)GET /v1/models— discoverable model catalog (100+ models fromlitellm.model_cost)GET/PUT/DELETE /v1/providers/{provider}— set / list / revoke encrypted provider keys (decryptableflags rows that no longer open after aCREDENTIAL_ENCRYPTION_KEYrotation)GET/PUT /v1/routing— change strategy (balanced/cheapest/fastest/quality)GET /v1/analytics/{recent,spend,latency,savings,unreachable}— local analytics, no telemetry leaves the boxGET /v1/hosted— hosted-fallback status (drives the dashboard's "Get $5 free credit" card)GET/POST/DELETE /v1/keys/...— list / rotate / revoke API keys/v1/app/*— agents, spend summary and budget for the desktop app (only when started withorca up; see SECURITY.md)- Single-page dashboard at
/ - SQLite by default; Postgres opt-in via
DATABASE_URL; Redis optional - Multi-worker safe: set
REDIS_URLand config changes (provider keys, routing, quality overrides) are invalidated across all workers/replicas via pub/sub. Single worker (the default) needs no Redis.
Rotating CREDENTIAL_ENCRYPTION_KEY
Dashboard-stored provider keys are sealed with AES-256-GCM using CREDENTIAL_ENCRYPTION_KEY. Changing that value without a migrate step leaves the ciphertext intact but unreadable: build_deployments skips the row, chat returns 503 if nothing else is configured, and the providers list now reports decryptable: false instead of a green "Enabled".
To rotate without re-entering every key:
# 1. Keep the old key, set the new one
CREDENTIAL_ENCRYPTION_KEY=<new 64-hex>
CREDENTIAL_ENCRYPTION_PREVIOUS_KEY=<old 64-hex>
# 2. Restart. Startup re-encrypts stored keys and logs
# reencrypted_provider_keys / undecryptable_provider_keys.
# 3. Confirm the dashboard shows Enabled, then unset the previous key
# and restart once more.
If you already rotated without CREDENTIAL_ENCRYPTION_PREVIOUS_KEY, re-save each provider key in the dashboard (or fall back to env vars). Do not reuse a previous key as the current key after you have already re-saved — that would reseal new ciphertext with the old material.
Cross-provider prompt cache
Deterministic requests (temperature=0 or pinned seed) are served from cache on repeat — works across every provider, not just Anthropic. Backend is Redis when REDIS_URL is set, in-process LRU otherwise. Cache hits return instantly with x-orca-cache: HIT and cost $0.
$ curl ... -d '{"model":"auto","messages":[...], "temperature": 0}' -i
HTTP/1.1 200 OK
x-orca-cache: MISS
x-orca-resolved-model: gpt-4o-mini
$ curl ... # same payload again
HTTP/1.1 200 OK
x-orca-cache: HIT ← served from cache, no upstream call
Savings widget
GET /v1/analytics/savings?baseline=gpt-4o&days=7 reports what your traffic would have cost on always-GPT-4 vs what it actually cost. The dashboard shows it as a tile.
Integrations
Drop-in configs for Claude Code, Gemini SDK, Continue.dev, Aider, Cursor, LangChain, LlamaIndex, Vercel AI SDK, and any tool that speaks the OpenAI Chat Completions protocol — plus native Anthropic and Gemini wire formats. See integrations/.
What's deliberately not
This is the single-workspace edition. By design, no:
- multi-tenancy, RBAC, SSO
- billing, wallets, points, partner program
- admin console, audit logs, trust & safety
- multi-pod deployment / Kubernetes
- email / Slack / webhooks for alerts
Those are organisation features and live in hosted OrcaRouter; see Free and open, for good.
Testing
Built test-first: every behaviour shipped here had a failing test first.
pip install -e ".[dev]"
PYTHONPATH=. pytest # router, protocols, desktop API, CLI, supply-chain checks
cd desktop && npm test # desktop view logic (node --test)
cd desktop/src-tauri && cargo test --lib # menu-bar title and notification rules
Architecture
app/
├── main.py FastAPI factory + lifespan + SPA mount
├── config.py Settings (~15 fields)
├── deps.py DI helpers
├── seed.py First-run bootstrap
├── auto_routing.py model="auto" capability + cost scoring
├── router_cache.py Single-workspace router
├── prompt_cache.py Cross-provider exact-match cache (Redis or in-memory LRU)
├── schemas.py OpenAI-compatible request schema
├── middleware/auth.py sk-orca-* validation
└── routes/
├── chat.py /v1/chat/completions (blocking + streaming)
├── models.py /v1/models
├── providers.py BYOK CRUD
├── routing.py strategy config
├── analytics.py recent / spend / latency / savings / unreachable
├── keys.py list / rotate / revoke API keys
├── hosted.py /v1/hosted — hosted-fallback status for the dashboard
└── health.py
desktop/
├── ui/ Menu-bar panel + setup pages (served by the engine at /desktop/)
├── src-tauri/ Native shell: tray title, notifications, starts the engine
└── engine/ PyInstaller build of the bundled `orca-engine`
packages/
├── desktop/ Agent connectors (backup/restore) + desktop home folder
├── litellm_adapter/ Router wrapper + 100+ model catalog
├── auth/ hashing + AES-256-GCM
└── db/ models + engine + session
Roadmap
- OpenAI-compatible chat completions, streaming,
model="auto" - Anthropic and Gemini native endpoints
- Hosted-as-upstream fallback, encrypted BYOK, local dashboard
- Cross-provider prompt cache
- Desktop app: menu-bar spend, daily budget alerts, one-click agent connect
- Signed releases with provenance and SBOM; hash-locked dependencies
- Daily budget that alerts, or pauses coding agents at the limit
-
orca login/ "Join my company's gateway": use a team's gateway from the app -
/v1/responses, so Codex connects; Gemini CLI, OpenCode, Command Code and Cline too - Encryption key in the OS keychain; one update check a day
- Per-developer budgets enforced on a shared team gateway
- Embeddings, Ollama/vLLM providers, custom fallback chains
See DEMO.md for the failover demo.
License
MIT. See LICENSE.
// faq
What is OrcaRouter-Lite?
Self-hosted LLM router with a managed safety net. OpenAI-compatible. BYOK. Single-workspace. Streaming. For more advanced routing choose hosted OrcaRouter. It is open-source on GitHub.
Is OrcaRouter-Lite free to use?
OrcaRouter-Lite is open-source under the MIT license, so it is free to use.
What category does OrcaRouter-Lite belong to?
OrcaRouter-Lite is listed under uncategorized in the Claudeers registry of Claude-compatible tools.
// embed badge
[](https://claudeers.com/orcarouter-lite)
// retro hit counter
[](https://claudeers.com/orcarouter-lite)
// reviews
// guestbook
// related in Uncategorized / Others
Reverse engineer anything with agents, from app behavior down to native binaries.
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
The agent engineering platform.
利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
// built by
1 of its contributors also build on official projects — claude-code, claude-cookbooks, claude-plugins-official
→ see how OrcaRouter-Lite connects across the ecosystem