-# 🚀 OmniRoute — The Free AI Gateway
+# 🚀 OmniRoute — 免费 AI 网关
-### Never stop coding. Connect every AI tool to **237 providers** — **90+ free** — through one endpoint.
+### 永不停止编码。通过一个端点,将每个 AI 工具连接到 **237 个提供商** — **90+ 个免费**。
-**Plug Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini. Auto-fallback.**
+**将 Claude Code、Codex、Cursor、Cline、Copilot 和 Antigravity 接入免费的 Claude / GPT / Gemini。自动故障转移。**
-**RTK + Caveman compression saves 15–95% tokens. Never hit limits.**
+**RTK + Caveman 压缩可节省 15–95% 的 token。永不触及上限。**
-**~1.6B documented free tokens/month** — up to **~2.1B in your first month** with signup credits — aggregated across the free tiers, plus a long tail of permanently-free, no-cap providers, and the compression above stretches every one further. ([how we count →](docs/reference/FREE_TIERS.md#tldr--how-much-free-inference-does-omniroute-actually-aggregate))
+**每月约 1.6B 有文档记载的免费 token** — 配合注册赠送额度,首月最高可达 **约 2.1B** — 聚合各免费层额度,另有一群永久免费、无上限的提供商长尾,再加上前述压缩让每一份额度都走得更远。([统计方式 →](docs/reference/FREE_TIERS.md#tldr--how-much-free-inference-does-omniroute-actually-aggregate))
-⭐ Star the repo if OMNIROUTE helped you save money and make your work easier. [](https://github.com/diegosouzapw/OmniRoute)
+⭐ 如果 OMNIROUTE 帮你省了钱、让工作更轻松,请为仓库点 Star。 [](https://github.com/diegosouzapw/OmniRoute)
-> Stacking free tiers by hand is painful — dozens of SDKs, dozens of rate limits, and no idea how much you actually have. OmniRoute aggregates the **documented** free tiers of **40+ provider pools / 500+ models** into one honest number and shows it live on the dashboard (`/dashboard/free-tiers`).
+> 手动堆叠免费层很痛苦 — 数十个 SDK、数十个速率限制,根本不知道自己到底有多少额度。OmniRoute 将 **40+ 个提供商池 / 500+ 个模型**的**有文档记载**的免费层聚合为一个真实数字,并在仪表板(`/dashboard/free-tiers`)上实时展示。
-- **~1.6B free tokens / month** (steady) — and **up to ~2.1B in your first month** with signup credits.
-- **Pool-deduped, honest** — we count each shared free pool **once**, so the headline isn't inflated by rate-limit ceilings the way multi-billion competitor claims are. (Counting every rate limit 24/7 would read ~10B; we don't publish that.)
-- **Plus the un-countable** — permanently-free, no-token-cap providers (SiliconFlow, Z.AI GLM-Flash, Kilo, OpenCode Zen…) and a **$10 OpenRouter top-up** that unlocks **+24M/mo**, both surfaced separately so they never inflate the headline.
-- **Per-model breakdown**, **live used / remaining** for the current month, and a transparent **terms flag** per provider.
+- **每月约 1.6B 免费 token**(稳定)— 配合注册赠送额度,**首月最高可达约 2.1B**。
+- **按池去重、真实可信** — 每个共享免费池我们只**计一次**,因此标题数字不会因速率上限而被夸大,不像竞争对手动辄宣称数十亿。(若按每个速率限制 24/7 全算会达到约 10B;我们不发布那种数字。)
+- **另有无法纳入统计的部分** — 永久免费、无 token 上限的提供商(SiliconFlow、Z.AI GLM-Flash、Kilo、OpenCode Zen…),以及 **$10 OpenRouter 充值**可解锁 **每月 +24M**,二者单独列出,绝不夸大标题数字。
+- **按模型明细**、当月**实时已用 / 剩余**额度,以及每个提供商透明的**条款标记**。

-> Preview mockup — a real screenshot lands once the `/dashboard/free-tiers` page is validated. Full methodology (pool dedupe, credit tiers, provider terms): **[docs/reference/FREE_TIERS.md](docs/reference/FREE_TIERS.md)**.
+> 预览线稿 — 待 `/dashboard/free-tiers` 页面验证后会换成真实截图。完整方法说明(池去重、额度档位、服务商条款):**[docs/reference/FREE_TIERS.md](docs/reference/FREE_TIERS.md)**。
-# 💥 The Promise
+# 💥 承诺
-> One endpoint. **237 providers.** Never stop building — and let OmniRoute pick the cheapest one that works.
+> 一个端点。**237 家服务商。** 永不中断开发 — 让 OmniRoute 自动选到可用且最便宜的那一个。
-
🚫 Never hit limits Auto-fallback across 237 providers in milliseconds. Quota out? Next provider takes over — zero downtime.
-
💸 Save up to 95% tokens RTK + Caveman stacked compression cuts 15–95% of eligible tokens (~89% avg on tool-heavy sessions).
-
🆓 $0 to start 90+ providers with a free tier, 11 free forever (Kiro, Qoder, Pollinations, LongCat…). No card needed.
-📖 Per-tool setup for all 24+ tools → [`docs/reference/CLI-TOOLS.md`](docs/reference/CLI-TOOLS.md) · 🧩 OpenCode plugin → [`@omniroute/opencode-provider`](https://www.npmjs.com/package/@omniroute/opencode-provider)
+📖 24+ 款工具的逐项配置 → [`docs/reference/CLI-TOOLS.md`](docs/reference/CLI-TOOLS.md) · 🧩 OpenCode 插件 → [`@omniroute/opencode-provider`](https://www.npmjs.com/package/@omniroute/opencode-provider)
@@ -389,15 +395,15 @@ Result: 4 layers of fallback = zero downtime
-# 🌐 237 AI Providers — 90+ Free
+# 🌐 237 家 AI 提供商 — 90+ 免费
-> The most complete catalog of any open-source router: **237 providers**, **90+ with a free tier**, **11 free forever**.
+> 开源路由器中最完整的目录:**237 家提供商**、**90+ 提供免费套餐**、**11 家永久免费**。
-### 🏢 Every major lab — through one endpoint
+### 🏢 各家主流实验室 — 通过一个端点
@@ -426,18 +432,18 @@ Result: 4 layers of fallback = zero downtime
-…and 220+ more — every icon resolves live from the dashboard's provider catalog. 📖 [Provider Reference](docs/reference/PROVIDER_REFERENCE.md)
+…以及另外 220+ 家 — 每个图标均从仪表板的提供商目录实时解析。📖 [提供商参考](docs/reference/PROVIDER_REFERENCE.md)
-### 🆓 Free Forever — $0, no card
+### 🆓 永久免费 — $0,无需绑卡
-> Your keys, your machine, your data. OmniRoute is a **local proxy** — it never phones home.
+> 你的密钥,你的机器,你的数据。OmniRoute 是一款 **本地代理(local proxy)** —— 从不回传数据。
-- 🏠 **Runs 100% on your hardware** — npm, Docker, desktop, or your phone. No OmniRoute cloud sits in the request path.
-- 🔐 **Credentials encrypted at rest** — API keys & OAuth tokens sealed with **AES-256-GCM**.
-- 🚫 **Zero telemetry by default** — your prompts go only to the providers _you_ choose, nowhere else.
-- 🛡️ **Hardened gateway** — API-key scoping, IP filtering, rate limits, prompt-injection guard, loopback-only process routes.
-- 📜 **MIT licensed & fully open-source** — audit every line, self-host forever.
+- 🏠 **100% 在你的硬件上运行** —— npm、Docker、桌面端或你的手机。请求路径中没有 OmniRoute 云端。
+- 🔐 **凭据静态加密** —— API 密钥与 OAuth 令牌使用 **AES-256-GCM** 密封存储。
+- 🚫 **默认零遥测** —— 你的提示词仅发往 _你_ 选择的提供商,别无他处。
+- 🛡️ **加固网关** —— API 密钥作用域、IP 过滤、速率限制、提示词注入防护、仅限回环地址的进程路由。
+- 📜 **MIT 许可且完全开源** —— 审计每一行代码,永久自托管。
-📖 [Authorization](docs/architecture/AUTHZ_GUIDE.md) · [Guardrails](docs/security/GUARDRAILS.md) · [Compliance](docs/security/COMPLIANCE.md)
+📖 [授权](docs/architecture/AUTHZ_GUIDE.md) · [防护栏](docs/security/GUARDRAILS.md) · [合规](docs/security/COMPLIANCE.md)
-# 🔌 Full CLI + A2A & MCP
+# 🔌 完整 CLI + A2A 与 MCP
-> OmniRoute isn't just a server — it's a **full command-line cockpit** with **80+ commands**, plus open agent protocols so an AI agent can drive OmniRoute **by itself**.
+> OmniRoute 不仅是服务器 —— 它还是带 **80+ 条命令** 的 **完整命令行驾驶舱(cockpit)**,并开放智能体协议,让 AI 智能体能够 **自主驱动** OmniRoute。
-### ⌨️ A real CLI (not just `start`)
+### ⌨️ 真正的 CLI(不只是 `start`)
```bash
omniroute # serve gateway + dashboard (port 20128)
@@ -509,10 +515,9 @@ omniroute setup # guided first-run wizard
omniroute doctor # diagnose providers, ports, native deps
```
-### 🛰️ Remote mode — run the CLI here, OmniRoute on a VPS
+### 🛰️ 远程模式 —— 在此运行 CLI,OmniRoute 在 VPS 上
-OmniRoute on a server? Drive it from your laptop with the **same CLI**. Log in once
-with a scoped access token; every command then targets the remote.
+OmniRoute 在服务器上?用 **同一套 CLI** 从笔记本远程操控。使用作用域访问令牌登录一次;此后每条命令都指向远程实例。
```bash
omniroute connect 192.168.0.15 # password → scoped token, saved as a context
@@ -522,8 +527,8 @@ omniroute tokens create --name ci --scope read # mint narrower tokens for othe
omniroute contexts use default # ← switch back to the local server
```
-Tokens are scoped `read` / `write` / `admin`; process-spawning routes stay loopback-only.
-📖 [Remote Mode](docs/guides/REMOTE-MODE.md)
+令牌按作用域划分:`read` / `write` / `admin`;会派生进程的路由仅限回环地址。
+📖 [远程模式](docs/guides/REMOTE-MODE.md)
-> **Why use many tokens when few tokens do the trick?** Every request passes through OmniRoute's compression pipeline **transparently** — no client changes. It's now a **stack of 10 composable engines** that run in order and mix & match per routing combo — building on ideas from [RTK](https://github.com/rtk-ai/rtk), [Caveman](https://github.com/JuliusBrussee/caveman) (⭐ 78K+), [LLMLingua-2](https://github.com/microsoft/LLMLingua), and [Troglodita](https://github.com/leninejunior/troglodita) (PT-BR).
+> **何必多用 Token,少用就能搞定?** 每个请求都会 **透明地** 经过 OmniRoute 的压缩流水线 —— 无需修改客户端。它现已发展为 **10 个可组合引擎** 的栈,按顺序运行,并可根据路由组合灵活混搭 —— 借鉴了 [RTK](https://github.com/rtk-ai/rtk), [Caveman](https://github.com/JuliusBrussee/caveman) (⭐ 78K+)、[LLMLingua-2](https://github.com/microsoft/LLMLingua), 和 [Troglodita](https://github.com/leninejunior/troglodita) (PT-BR) 的思路。
-### 🧱 The 10-engine stack
+### 🧱 10 引擎栈
-Engines run in pipeline order; each is independently toggleable and configurable per combo:
+引擎按流水线顺序运行;每个引擎均可独立开关,并按组合单独配置:
-| # | Engine | What it does |
+| # | 引擎 | 作用 |
| --- | ----------------- | ------------------------------------------------------------------- |
-| 1 | **Session-Dedup** | Drops content repeated across turns (content-addressed, cross-turn) |
-| 2 | **CCR** | Archives large blocks behind retrieve markers, fetched on demand |
-| 3 | **RTK** | Smart tool-result filtering, dedup & truncation (command-aware) |
-| 4 | **Headroom** | Lossless tabular compaction of homogeneous JSON arrays (~30%+) |
-| 5 | **Relevance** | Extractive sentence scoring against the last user query |
-| 6 | **Caveman** | Rule-based prose compression (~65–75% on output) |
-| 7 | **LLMLingua-2** | ML semantic pruning via MobileBERT ONNX — code-safe, async |
-| 8 | **Lite** | Whitespace + image-URL trimming (latency-light baseline) |
-| 9 | **Aggressive** | Summarization + progressive aging of old turns |
-| 10 | **Ultra** | Heuristic token pruning with an optional small-model (SLM) tier |
+| 1 | **Session-Dedup** | 剔除跨轮次重复内容(按内容寻址,跨轮次) |
+| 2 | **CCR** | 将大块内容归档至检索标记之后,按需获取 |
+| 3 | **RTK** | 智能工具结果过滤、去重与截断(感知命令) |
+| 4 | **Headroom** | 对同质 JSON 数组进行无损表格式压缩(约 30%+) |
+| 5 | **Relevance** | 针对最近一次用户查询进行抽取式句子评分 |
+| 6 | **Caveman** | 基于规则的散文压缩(输出约 65–75%) |
+| 7 | **LLMLingua-2** | 通过 MobileBERT ONNX 进行 ML 语义剪枝 —— 代码安全、异步 |
+| 8 | **Lite** | 空白符与图片 URL 裁剪(低延迟基线) |
+| 9 | **Aggressive** | 摘要化 + 旧轮次渐进式老化 |
+| 10 | **Ultra** | 启发式 Token 剪枝,可选小模型(SLM)层级 |
-Code blocks, URLs and structured data are **always preserved** byte-perfect. **One-click presets** combine the engines:
+代码块、URL 与结构化数据 **始终按字节级精确保留**。**一键预设** 可组合这些引擎:
-| Mode | Savings | Best for |
+| 模式 | 节省幅度 | 最适合 |
| ------------------------------ | ---------- | --------------------------- |
-| 🪶 **Lite** | ~15% | Always-on safe default |
-| 🪨 **Standard (Caveman)** | ~30% | Daily coding |
-| ⚡ **Aggressive** | ~50% | Long tool-heavy sessions |
-| 🔥 **Ultra** | ~75% | Maximum savings |
-| 🧰 **RTK** | 60–90% | Shell/test/build/git output |
-| 🔗 **Stacked (RTK → Caveman)** | **78–95%** | Mixed prompts + tool logs |
+| 🪶 **Lite** | ~15% | 始终开启的安全默认 |
+| 🪨 **Standard (Caveman)** | ~30% | 日常编码 |
+| ⚡ **Aggressive** | ~50% | 长时、工具密集型会话 |
+| 🔥 **Ultra** | ~75% | 最大节省 |
+| 🧰 **RTK** | 60–90% | Shell/测试/构建/Git 输出 |
+| 🔗 **Stacked (RTK → Caveman)** | **78–95%** | 混合提示词 + 工具日志 |
-**Real example — Standard mode:**
+**真实示例 — 标准模式(Standard mode):**
-> **Before (69 tokens):** _"The reason your React component is re-rendering is likely because you're creating a new object reference on each render cycle. When you pass an inline object as a prop, React's shallow comparison sees it as a different object every time, which triggers a re-render. I would recommend using useMemo to memoize the object."_
+> **压缩前(69 tokens):** _"The reason your React component is re-rendering is likely because you're creating a new object reference on each render cycle. When you pass an inline object as a prop, React's shallow comparison sees it as a different object every time, which triggers a re-render. I would recommend using useMemo to memoize the object."_
>
-> **After (19 tokens):** _"New object ref each render. Inline object prop = new ref = re-render. Wrap in useMemo."_
+> **压缩后(19 tokens):** _"New object ref each render. Inline object prop = new ref = re-render. Wrap in useMemo."_
>
-> **Same answer. 72% fewer tokens. Zero accuracy loss.** ✅
+> **答案相同。Token 减少 72%。零精度损失。** ✅
-**PT-BR example — [Troglodita](https://github.com/leninejunior/troglodita) mode:**
+**PT-BR 示例 — [Troglodita](https://github.com/leninejunior/troglodita) 模式:**
> **Antes (42 tokens):** _"O problema é que o componente está re-renderizando porque uma nova referência de objeto está sendo criada em cada ciclo de renderização. Eu recomendaria usar useMemo."_
>
@@ -605,13 +610,13 @@ Code blocks, URLs and structured data are **always preserved** byte-perfect. **O
-### 📖 How it works — pipeline, architecture & savings math
+### 📖 工作原理 — 流水线、架构与节省计算
```
Client (10,000 tok) ──▶ OmniRoute Compression (10 engines) ──▶ Provider (~1,080 tok, up to 95% saved)
```
-Default stacked combo runs `RTK → Caveman`. When both act on the same tool/context payload, savings compound:
+默认堆叠组合会运行 `RTK → Caveman`。当两者作用于同一工具/上下文载荷时,节省效果会叠加:
```txt
combined = 1 − (1 − RTK) × (1 − Caveman_input)
@@ -619,20 +624,20 @@ average = 1 − (1 − 0.80) × (1 − 0.46) = 89.2%
range = 78.4 – 94.6%
```
-Code blocks, URLs, JSON and structured data are **always protected** by the preservation engine.
+代码块、URL、JSON 与结构化数据**始终**由保留引擎(preservation engine)保护。
-### 🎚️ Beyond the engines — output styles, the adaptive dial & per-request control
+### 🎚️ 超越引擎 — 输出风格、自适应拨盘与按请求控制
-The 10 engines above shrink what goes **in**. Three more layers shape **how**, **when**, and what comes **out**:
+上述 10 个引擎压缩的是**输入**。另外三层决定**如何**、**何时**以及**输出什么**:
-- **🪄 Output Styles** _(output-axis steering)_ — inject deterministic, cache-safe response-shaping instructions; combinable, each at `lite` / `full` / `ultra` intensity. Adding a style is a one-line registry entry:
- - **Terse prose** — drop filler / articles / hedging; keep technical substance exact.
- - **Less code** — "lazy senior dev" YAGNI: smallest working change, no unrequested scaffolding.
- - **Terse CJK (文言)** — classical-Chinese ultra-terse style (locale-gated to `zh`).
-- **🎯 Adaptive context-budget** _(the dial)_ — instead of one on/off token threshold, escalate the cheapest, most-lossless engines only as far as needed to **fit the model's context window**. Policy: `reserve-output` (default, model-aware) · `percentage` · `absolute`. Mode: `floor` (guarantee fit) · `replace-autotrigger` (your explicit choice wins) · `off` (legacy threshold).
-- **🎛️ Where compression is decided** _(precedence, high → low)_ — per-request `x-omniroute-compression` header › routing-combo override › active named profile › adaptive / auto-trigger › panel default › off. The applied plan echoes back in the `X-OmniRoute-Compression: ; source=` response header.
+- **🪄 输出风格(Output Styles)** _(输出轴引导)_ — 注入确定性、可缓存的响应塑形指令;可组合,各自强度为 `lite` / `full` / `ultra`。添加一种风格只需一行注册表项:
+ - **简洁散文(Terse prose)** — 去掉废话/冠词/含糊其辞;技术实质保持精确。
+ - **更少代码(Less code)** — “懒惰资深开发者” YAGNI:最小可用改动,不搭未请求的脚手架。
+ - **简洁文言(Terse CJK / 文言)** — 文言文极简风格(按区域限制为 `zh`)。
+- **🎯 自适应上下文预算(Adaptive context-budget)** _(拨盘)_ — 不再用单一开/关 token 阈值,而是按需逐级启用最便宜、损失最小的引擎,直至**适配模型的上下文窗口**。策略:`reserve-output`(默认,模型感知)· `percentage` · `absolute`。模式:`floor`(保证适配)· `replace-autotrigger`(你的显式选择优先)· `off`(旧版阈值)。
+- **🎛️ 压缩决策位置** _(优先级,高 → 低)_ — 按请求 `x-omniroute-compression` 请求头 › 路由组合覆盖 › 当前命名配置 › 自适应/自动触发 › 面板默认 › 关闭。应用方案会在 `X-OmniRoute-Compression: ; source=` 响应头中回显。
-Auto-trigger by token threshold, flip on the adaptive dial, pin a named profile, set a one-off per request, or assign a pipeline per routing combo — whichever fits the workload. An opt-in offline **eval harness** (`npm run eval:compression`) scores fidelity vs. savings on a pinned corpus before you promote a change.
+按 token 阈值自动触发、拨动自适应拨盘、固定命名配置、设置一次性按请求选项,或为路由组合分配流水线 — 任选适合工作负载的方式。可选的离线**评估工具(eval harness)**(`npm run eval:compression`)会在你推广变更前,对固定语料库评估保真度与节省效果。
📖 [`COMPRESSION_GUIDE.md`](docs/compression/COMPRESSION_GUIDE.md) · [`RTK_COMPRESSION.md`](docs/compression/RTK_COMPRESSION.md) · [`COMPRESSION_ENGINES.md`](docs/compression/COMPRESSION_ENGINES.md)
@@ -640,24 +645,24 @@ Auto-trigger by token threshold, flip on the adaptive dial, pin a named profile,
-# ⚡ Quick Start
+# ⚡ 快速开始
-**1) Install & run**
+**1) 安装并运行**
```bash
npm install -g omniroute
omniroute
```
-Dashboard at `http://localhost:20128` · API at `http://localhost:20128/v1`.
+仪表板:`http://localhost:20128` · API:`http://localhost:20128/v1`。
-**2) Connect a FREE provider (no signup)**
+**2) 连接免费提供商(无需注册)**
-Dashboard → **Providers** → connect **Kiro AI** (free Claude, ~50 credits/month per account) or **OpenCode Free** (no auth) → done.
+仪表板 → **Providers** → 连接 **Kiro AI**(免费 Claude,每账户约 50 积分/月)或 **OpenCode Free**(无需认证)→ 完成。
-**3) Point your coding tool**
+**3) 指向你的编码工具**
```txt
Base URL: http://localhost:20128/v1
@@ -665,15 +670,15 @@ API Key: [copy from Dashboard → Endpoints]
Model: auto (zero-config smart routing — or any provider/model)
```
-**4) Verify it's working**
+**4) 验证是否生效**
```bash
curl http://localhost:20128/v1/models -H "Authorization: Bearer YOUR_KEY"
```
-You should see your connected models listed. 🎉 That's it — start coding, and OmniRoute auto-routes & falls back for you.
+你应能看到已连接的模型列表。🎉 就这样 — 开始编码,OmniRoute 会为你自动路由与回退。
-If your client cannot send custom headers, OmniRoute also exposes tokenized compatibility aliases:
+若客户端无法发送自定义请求头,OmniRoute 也提供带 token 的兼容别名:
```txt
OpenAI catalog: http://localhost:20128/vscode/YOUR_KEY/
@@ -684,11 +689,11 @@ Ollama chat: http://localhost:20128/vscode/YOUR_KEY/api/chat
Ollama tags: http://localhost:20128/vscode/YOUR_KEY/api/tags
```
-Use these only for clients that cannot attach `Authorization: Bearer ...`. Header auth remains the preferred mode.
+仅当客户端无法附加 `Authorization: Bearer ...` 时使用这些别名。请求头认证仍是首选方式。
-## 📦 More install methods — Docker, source, pnpm, Arch
+## 📦 更多安装方式 — Docker、源码、pnpm、Arch
**🐳 Docker**
@@ -697,7 +702,7 @@ docker run -d --name omniroute --restart unless-stopped --stop-timeout 40 \
-p 20128:20128 -v omniroute-data:/app/data diegosouzapw/omniroute:latest
```
-**🛠️ From source**
+**🛠️ 从源码安装**
```bash
cp .env.example .env && npm install
@@ -727,7 +732,7 @@ npm run dev
devbox run npm run dev
```
-📖 [Docker Guide](docs/guides/DOCKER_GUIDE.md) — Compose profiles, Caddy HTTPS, Cloudflare tunnels.
+📖 [Docker Guide](docs/guides/DOCKER_GUIDE.md) — Compose 配置、Caddy HTTPS、Cloudflare 隧道。
**🦭 Podman**
@@ -743,31 +748,27 @@ echo "CONTAINER_HOST=podman" >> .env
podman compose --profile base up -d
```
-📖 [Podman Guide](contrib/podman/README.md) — Quadlet setup, podman-compose, Quadlet.
+📖 [Podman Guide](contrib/podman/README.md) — Quadlet 设置、podman-compose、Quadlet。
-**⚡ Faster / leaner install (skip the native build)**
+**⚡ 更快/更精简的安装(跳过原生构建)**
-The native SQLite engine (`better-sqlite3`) is an **optional** dependency, so a global
-install never blocks on compiling from source: it uses a prebuilt binary when one matches
-your platform/Node, and otherwise falls back transparently to a pure-JS engine
-(`node:sqlite` on Node 22+, else the bundled `sql.js` WASM) — no build tools required.
+原生 SQLite 引擎(`better-sqlite3`)是**可选**依赖,因此全局安装不会因从源码编译而阻塞:当你的平台/Node 有匹配项时使用预编译二进制,否则透明回退到纯 JS 引擎(Node 22+ 为 `node:sqlite`,否则为捆绑的 `sql.js` WASM)— 无需构建工具。
-To skip the post-install native warm-up entirely (CI, headless, or slow machines):
+若要完全跳过安装后原生预热(CI、无头环境或慢机器):
```bash
OMNIROUTE_SKIP_POSTINSTALL=1 npm install -g omniroute # CI=1 also skips it
```
-For the fastest installs prefer **pnpm** (content-addressed store + hard links — see above).
-For a dashboard-free, headless runtime use the Docker `base` profile (above) or the
-[Termux guide](docs/guides/TERMUX_GUIDE.md). The CLI and the web dashboard are served by the
-same process on one port, so there is no separate CLI-only package today.
+最快安装请优先使用 **pnpm**(内容寻址存储 + 硬链接 — 见上文)。
+若要无仪表板的无头运行时,请使用 Docker `base` 配置(上文)或
+[Termux guide](docs/guides/TERMUX_GUIDE.md)。CLI 与 Web 仪表板由同一进程在同一端口提供,因此目前没有单独的仅 CLI 包。
-# 🎬 OmniRoute in Action
+# 🎬 OmniRoute 实战
@@ -792,32 +793,34 @@ same process on one port, so there is no separate CLI-only package today.
-> 🎬 **Made a video about OmniRoute?** Open an [issue](https://github.com/diegosouzapw/OmniRoute/issues/new) or [discussion](https://github.com/diegosouzapw/OmniRoute/discussions) with the link — we'll feature it here.
+> 🎬 **制作了 OmniRoute 相关视频?** 提交 [issue](https://github.com/diegosouzapw/OmniRoute/issues/new) 或 [discussion](https://github.com/diegosouzapw/OmniRoute/discussions) 并附上链接 — 我们会在此展示。
+
+
-# 📚 Explore More
+# 📚 探索更多
-💰 Pricing at a glance & the $0 Free Stack (11 providers)
+💰 定价一览与 $0 免费技术栈(11 家提供商)
-| Tier | Example | Cost |
+| 层级 | 示例 | 费用 |
| --------------------------- | ---------------------------------------- | ---------- |
-| 💳 **Subscription** | Claude Code Pro / Codex / Copilot | $10–200/mo |
-| 🔑 **API Key (free tiers)** | NVIDIA NIM, Cerebras, Groq | **FREE** |
-| 💰 **Cheap** | GLM-5 $0.5/1M · MiniMax M2.5 $0.3/1M | pennies |
-| 🆓 **Free Forever** | Kiro, Qoder, Qwen, Pollinations, LongCat | **$0** |
+| 💳 **订阅** | Claude Code Pro / Codex / Copilot | $10–200/mo |
+| 🔑 **API Key(免费层级)** | NVIDIA NIM, Cerebras, Groq | **FREE** |
+| 💰 **低价** | GLM-5 $0.5/1M · MiniMax M2.5 $0.3/1M | pennies |
+| 🆓 **永久免费** | Kiro, Qoder, Qwen, Pollinations, LongCat | **$0** |
-**The $0 Free Stack — combine into one unbreakable combo:**
+**$0 免费技术栈 — 组合成牢不可破的一体化方案:**
-| Provider | Prefix | Free models | Quota |
+| 提供商 | 前缀 | 免费模型 | 配额 |
| ----------------- | ----------- | ----------------------------------------------- | ------------------ |
| **Kiro** | `kr/` | Claude Sonnet 4.5, Haiku 4.5, Opus 4.6 | 50 credits/mo |
| **Qoder** | `if/` | kimi-k2-thinking, qwen3-coder-plus, deepseek-r1 | ♾️ Unlimited |
@@ -828,18 +831,18 @@ same process on one port, so there is no separate CLI-only package today.
| **NVIDIA NIM** | `nvidia/` | 129 models | ~40 RPM |
| **Cerebras** | `cerebras/` | Qwen3 235B, GPT-OSS 120B | 1M tok/day |
-> 💡 The dashboard "cost" is a **savings tracker**, not a bill — OmniRoute never charges you. A "$290 total cost" using free models means **$290 saved**.
+> 💡 仪表板中的「cost」是**节省追踪器**,而非账单 — OmniRoute 从不向你收费。使用免费模型时显示的「$290 total cost」意味着**节省了 $290**。
-📖 Complete free directory → [`docs/reference/FREE_TIERS.md`](docs/reference/FREE_TIERS.md) — 25+ providers, quotas, base URLs.
+📖 完整免费目录 → [`docs/reference/FREE_TIERS.md`](docs/reference/FREE_TIERS.md) — 25+ 家提供商、配额、base URL。
-🎯 Use Cases — ready-made combo playbooks
+🎯 使用场景 — 现成组合方案手册
-**$0 forever:**
+**永久 $0:**
```
1. kr/claude-sonnet-4.5 (Kiro — ~50 credits/mo per acct)
@@ -849,88 +852,88 @@ same process on one port, so there is no separate CLI-only package today.
Compression: aggressive (~50%) → double your free quota · Cost: $0/mo
```
-**24/7 no interruptions:** chain 2 subscriptions → cheap → free for 5 layers of fallback.
-**Blocked region:** free providers + global/per-provider proxy → access AI from any country.
-**Max savings:** subscription + cheap backup + `ultra` compression (~75%) → ~$150–300/mo saved for heavy users.
+**7×24 不间断:** 串联 2 个订阅 → 低价 → 免费,形成 5 层回退。
+**受限地区:** 免费提供商 + 全局/按提供商代理 → 从任何国家访问 AI。
+**最大节省:** 订阅 + 低价备份 + `ultra` 压缩(约 75%)→ 重度用户每月可节省约 $150–300。
-🌍 Bypass geo-blocks — 3-level proxy + stealth
+🌍 绕过地理封锁 — 三级代理 + 隐匿
-🇷🇺 🇨🇳 🇮🇷 🇨🇺 🇹🇷 In a blocked region? OmniRoute's **3-level proxy** (Global / Per-Provider / Per-Connection) proxies API requests, OAuth flows, connection tests, token refresh & model sync.
+🇷🇺 🇨🇳 🇮🇷 🇨🇺 🇹🇷 身处受限地区?OmniRoute 的**三级代理**(全局 / 按提供商 / 按连接)可代理 API 请求、OAuth 流程、连接测试、token 刷新与模型同步。
-- **Protocols:** HTTP/HTTPS, SOCKS5, authenticated proxies
-- **🆓 1proxy marketplace** — hundreds of free validated proxies, quality scores, auto-rotation
-- **Anti-detection** — TLS fingerprint spoofing (`wreq-js`), CLI fingerprint matching, proxy IP preservation
+- **协议:** HTTP/HTTPS、SOCKS5、带认证的代理
+- **🆓 1proxy 市场** — 数百个免费已验证代理、质量评分、自动轮换
+- **反检测** — TLS 指纹伪装(`wreq-js`)、CLI 指纹匹配、代理 IP 保留
📖 [`docs/ops/PROXY_GUIDE.md`](docs/ops/PROXY_GUIDE.md)
-✨ Full feature list — 30+ capabilities (memory, evals, observability)
+✨ 完整功能列表 — 30+ 项能力(memory、evals、observability)
-**Routing:** 17 strategies · task-aware smart routing · thinking budget controls · wildcard routing · system prompt injection.
-**Compatibility:** OpenAI ↔ Claude ↔ Gemini ↔ Responses API · auto OAuth refresh (PKCE, 8 providers) · multi-account round-robin · Batch + Files API · live OpenAPI 3.0.
-**Protocols:** MCP (95 tools, 3 transports, 30 scopes) · A2A (JSON-RPC 2.0, SSE, 6 skills) · ACP · cloud agents (Codex, Cursor, Devin, Jules).
-**Plugins:** custom plugin marketplace (system-configured registry URL with SSRF-guarded fetch) · install / enable / disable · Notion + Obsidian knowledge-base integrations (WebDAV file server, vault search, note CRUD).
-**Embedded services:** one-click install & lifecycle management of local sidecar services (CLIProxy, NineRouter).
-**Quality & Ops:** built-in **Evals** (golden-set: exact/contains/regex/custom) · guardrails (PII, injection, vision) · health dashboard · p50/p95/p99 telemetry · webhooks · compliance audit.
-**AI Agent Skills:** drop-in markdown manifests — point any agent at a `skills/*/SKILL.md` manifest. 43 skills available.
+**路由:** 17 种策略 · 任务感知智能路由 · thinking budget 控制 · 通配符路由 · system prompt 注入。
+**兼容性:** OpenAI ↔ Claude ↔ Gemini ↔ Responses API · 自动 OAuth 刷新(PKCE,8 家提供商)· 多账号轮询 · Batch + Files API · 实时 OpenAPI 3.0。
+**协议:** MCP(95 个工具,3 种传输,30 个 scope)· A2A(JSON-RPC 2.0、SSE、6 项 skill)· ACP · 云端 agent(Codex、Cursor、Devin、Jules)。
+**插件:** 自定义插件市场(系统配置的 registry URL,带 SSRF 防护的 fetch)· 安装 / 启用 / 禁用 · Notion + Obsidian 知识库集成(WebDAV 文件服务器、vault 搜索、笔记 CRUD)。
+**嵌入式服务:** 一键安装与本地 sidecar 服务(CLIProxy、NineRouter)的生命周期管理。
+**质量与运维:** 内置 **Evals**(golden-set:exact/contains/regex/custom)· guardrails(PII、注入、vision)· 健康仪表板 · p50/p95/p99 遥测 · webhooks · 合规审计。
+**AI Agent Skills:** 即插即用的 Markdown manifest — 将任意 agent 指向 `skills/*/SKILL.md` manifest。43 项 skill 可用。
📖 [MCP Server](open-sse/mcp-server/README.md) · [A2A Server](src/lib/a2a/README.md) · [Resilience Guide](docs/architecture/RESILIENCE_GUIDE.md) · [Features Gallery](docs/guides/FEATURES.md)
-📖 Setup, env vars & FAQ
+📖 安装、环境变量与常见问题
-| Env var | Default | Purpose |
+| 环境变量 | 默认值 | 用途 |
| ----------------- | -------------- | -------------------------------- |
-| `PORT` | `20128` | API + dashboard port |
-| `REQUIRE_API_KEY` | `false` | Require API key for all requests |
-| `DATA_DIR` | `~/.omniroute` | Database & config storage |
+| `PORT` | `20128` | API 与仪表板端口 |
+| `REQUIRE_API_KEY` | `false` | 要求所有请求携带 API key |
+| `DATA_DIR` | `~/.omniroute` | 数据库与配置存储 |
-**Will I be charged by OmniRoute?** No — it's free, open-source software on your machine. You only pay paid providers directly. OmniRoute has no billing system.
-**Are FREE providers really unlimited?** Mostly — Qoder, Pollinations, LongCat, and Cloudflare are free with no per-account credit cap. Kiro is free too but capped at ~50 credits/month per account. Stack multiple free providers in a combo and auto-fallback keeps you serving for $0.
-**Will compression hurt quality?** No — it only compresses the **input**; code, URLs, JSON are always protected.
-**Does it work where AI is blocked?** Yes — 3-level proxy + 1proxy marketplace reach all 237 providers.
+**OmniRoute 会向我收费吗?** 不会 — 它是运行在你本机上的免费开源软件。你只需直接向付费提供商付款。OmniRoute 没有计费系统。
+**免费提供商真的无限吗?** 大体如此 — Qoder、Pollinations、LongCat 和 Cloudflare 免费且无单账号 credit 上限。Kiro 也免费,但每个账号约 50 credits/月上限。在组合中堆叠多个免费提供商,自动回退可让你以 $0 持续服务。
+**压缩会降低质量吗?** 不会 — 它仅压缩**输入**;代码、URL、JSON 始终受保护。
+**在 AI 受限地区能用吗?** 可以 — 三级代理 + 1proxy 市场可覆盖全部 237 家提供商。
📖 [User Guide](docs/guides/USER_GUIDE.md) · [API Reference](docs/reference/API_REFERENCE.md) · [Environment Config](docs/reference/ENVIRONMENT.md)
-🐛 Troubleshooting
+🐛 故障排查
-| Problem | Quick fix |
+| 问题 | 快速修复 |
| ----------------------------------------- | ------------------------------------------------------------- |
-| "Language model did not provide messages" | Provider quota exhausted → use a combo fallback |
-| Rate limiting (429) | Add fallback: `cc/claude → glm/glm-4.7 → if/kimi-k2-thinking` |
-| OAuth token expired | Auto-refreshed; if stuck, delete + re-auth in Providers |
-| `unsupported_country_region_territory` | Configure proxy in Settings → Proxy |
-| Docker SQLite locks | Use `--stop-timeout 40` for clean WAL checkpoint |
-| Node runtime errors | Use Node `>=22.0.0 <23` or `>=24.0.0 <27` |
+| "Language model did not provide messages" | 提供商配额耗尽 → 使用组合回退 |
+| Rate limiting (429) | 添加回退:`cc/claude → glm/glm-4.7 → if/kimi-k2-thinking` |
+| OAuth token expired | 自动刷新;若卡住,在 Providers 中删除并重新认证 |
+| `unsupported_country_region_territory` | 在 Settings → Proxy 中配置代理 |
+| Docker SQLite locks | 使用 `--stop-timeout 40` 进行干净的 WAL checkpoint |
+| Node runtime errors | 使用 Node `>=22.0.0 <23` 或 `>=24.0.0 <27` |
-🐛 **Reporting a bug?** Run `npm run system-info` and attach `system-info.txt`. 📖 [`docs/guides/TROUBLESHOOTING.md`](docs/guides/TROUBLESHOOTING.md)
+🐛 **报告 bug?** 运行 `npm run system-info` 并附上 `system-info.txt`。📖 [`docs/guides/TROUBLESHOOTING.md`](docs/guides/TROUBLESHOOTING.md)
-📸 Dashboard screenshots
+📸 仪表板截图
-| Page | Screenshot | Page | Screenshot |
+| 页面 | 截图 | 页面 | 截图 |
| ---------- | ------------------------------------------------- | ---------- | --------------------------------------------- |
| Providers |  | Combos |  |
| Analytics |  | Health |  |
@@ -943,14 +946,14 @@ Compression: aggressive (~50%) → double your free quota · Cost: $0/mo
-# 📧 Support & Community
+# 📧 支持与社区
-> 💬 **Chat with the community** — Discord, Telegram & WhatsApp (🌍 / 🇧🇷) links are at the [top of this README](#-join-the-community).
+> 💬 **与社区交流** — Discord、Telegram 和 WhatsApp(🌍 / 🇧🇷)链接见 [本 README 顶部](#-join-the-community)。
-- 🌍 **Website**: [omniroute.online](https://omniroute.online)
+- 🌍 **网站**: [omniroute.online](https://omniroute.online)
- 🐙 **GitHub**: [github.com/diegosouzapw/OmniRoute](https://github.com/diegosouzapw/OmniRoute)
-- 🐛 **Issues**: [report a bug](https://github.com/diegosouzapw/OmniRoute/issues) (attach `npm run system-info` output)
-- 🤝 **Contributing**: see [CONTRIBUTING.md](CONTRIBUTING.md) or pick a `good first issue`
+- 🐛 **Issues**: [报告 Bug](https://github.com/diegosouzapw/OmniRoute/issues)(请附上 `npm run system-info` 输出)
+- 🤝 **参与贡献**: 参见 [CONTRIBUTING.md](CONTRIBUTING.md),或选择一个 `good first issue`
-# ⭐ Top Contributors
+# ⭐ 顶级贡献者
-> OmniRoute is shaped by a passionate open-source community. These individuals have made exceptional contributions that directly impact the quality, stability, and reach of the project. **Thank you.**
+> OmniRoute 由充满热情的开源社区共同塑造。这些成员做出了卓越贡献,直接影响了项目的质量、稳定性和影响力。**感谢他们。**
-> 🙏 These contributors' features, bug fixes, and infrastructure improvements are a **core part** of what makes OmniRoute reliable and feature-rich. Every pull request, every test case, and every i18n translation file matters. Open source is built by people like them.
+> 🙏 这些贡献者的功能、缺陷修复和基础设施改进,是 OmniRoute 可靠且功能丰富的重要组成部分。每一次 Pull Request、每一个测试用例、每一份 i18n 翻译文件都至关重要。开源是由像他们这样的人共同构建的。