OmniRoute

开源免费的 AI 网关,用一个本地端点把 200 多家 AI 供应商接到 Claude Code、Cursor 等编码工具,自动回退、压缩省 token

In-depth Report

  • OmniRoute is an open source and free AI gateway that connects more than 20 programming tools such as Claude Code, Codex, Cursor, Cline, and Copilot to an OpenAI-compatible local endpoint, which then intelligently routes requests to more than 200 AI suppliers. It focuses on two things: one is to use the automatic fallback combination (Combo) that "automatically switches to the next model when the subscription quota is exhausted", so that the encoding process is almost uninterrupted; the other is to use the self-developed RTK + Caveman stack compression to reduce token consumption by 15% to 95%. The project is led by diegosouzapw and adopts the MIT protocol. Currently, it has about 6,400 stars and more than 1,100 forks on GitHub, and iterations are very active.

  • The author of OmniRoute is Diego Rodrigues de Sa e Souza, a developer active on GitHub as diegosouzapw. The warehouse is located at github.com/diegosouzapw/OmniRoute, and the official website is omniroute.online. Judging from the project acknowledgments and architecture description, it was originally a fork of 9router. At the same time, the Go language project CLIProxyAPI was rewritten in TypeScript, and it drew on LiteLLM's public pricing data set for cost tracking. In other words, it stands on the shoulders of several open source gateway projects, but makes a complete product that is fully TypeScript, multi-modal, with desktop and PWA. On the technology stack, OmniRoute is written in TypeScript/JavaScript (Node.js), the front-end dashboard is based on Next.js and React, the desktop is encapsulated with Electron, the back-end service routing is using Hono, and local data is stored with better-sqlite3. Deployment forms cover Docker, Podman, Termux, as well as pure Web and PWA. You can install it locally through npm install -g omniroute. The submissions in recent versions have been very intensive, with fixes and features being merged almost every day. The version number has been advanced to the v3.8.x series, which shows that the team has a high level of investment and a fast pace.

  • At its core, OmniRoute is a local endpoint: http://localhost:20128/v1 (API) and http://localhost:20128 (dashboard). Users only need to point the Base URL of the coding tool here, copy the API Key from the dashboard, and fill in auto for the model, and more than 20 tools such as Claude Code, Codex, Cursor, Copilot, Continue, OpenCode, and Kilo Code can share a set of configurations. It will translate different protocols such as OpenAI, Anthropic, Responses, and ChatCompletions into each other behind the scenes, so one endpoint can take in multiple models such as Claude, GPT, and Gemini. What really makes it stand up is the routing layer. It provides 17 to 18 routing strategies (priority, weighted, cost-optimized, round-robin, least-used, fusion, etc.), and has an Auto-Combo engine: when a certain subscription quota is exhausted, a supplier fails, or the cost suddenly soars, the request will silently slide to the next model in the combination, with zero downtime in the entire process. There's also Quota-Share (split a subscription to share among teams), multi-account polling, MCP server (90+ tools built-in), A2A proxy protocol, hybrid vector and keyword memory, and optional MITM/TPROXY decryption to catch CLI traffic that doesn't read proxy environment variables. Compression is another drawcard. RTK + Caveman is a pluggable asynchronous compression pipeline that works with engines such as LLMLingua-2, Ultra, and delegated Anthropic context editing, claiming to save 15% to 95% of tokens. For long context encoding scenarios, these savings are real.

  • OmniRoute itself is open source and free, under the MIT license. The author clearly states that OmniRoute never charges you. Its value does not lie in charging users, but in aggregating the free quotas of each company. The README gives a set of figures: approximately 1.6 billion free tokens per month in a stable state, and the maximum number in the first month after registration is approximately 2.1 billion. There are 11 "forever free" providers in the free tier, such as Kiro (Claude Sonnet 4.5 with 50 credits per month), Qoder (unlimited free), Pollinations (no key required), Cerebras (1 million tokens per day), etc. Combining these free providers into a combo creates what the author calls the $0 Free Stack - the monthly cost is zero, but coding rarely stops due to throttling. OmniRoute's monetization path is more like a community-driven open source project: it relies on word-of-mouth and star growth, and contributors' PR iterations; the official website omniroute.online provides the cloud endpoint cloud.omniroute.online/v1 as an optional convenience, but the request path runs 100% on the user's own hardware by default. This is attractive to those who value data sovereignty.

  • Judging from the feedback from GitHub discussions and community mirror repositories, what users like the most is the “never-ending coding” experience: stacking multiple subscriptions, API keys, and free subscriptions together, and automatically switching when the quota is exhausted, which indeed solves the pain point of “being kicked out in the middle of writing due to current limitations.” The token savings brought about by compression have also been mentioned repeatedly. For users who have been running Claude Code for a long time, it is equivalent to saving dozens of dollars in monthly API fees in disguise. Negative feedback is mainly focused on the cognitive burden caused by the rapid changes in the project: routing strategies, compression engines, and combination syntax are added almost every week, and it takes time for novices to fully understand it; the configuration threshold for some advanced functions (such as MITM decryption, TLS fingerprint masquerading) is not low, and although there are many documents, they are scattered in various subdirectories of docs/. In addition, the quality and stability of the free providers themselves are uneven, and key workflows are completely placed on the free tier. Occasionally, slow responses or occasional failures will occur, and automatic rollback is required to cover the situation.

  • In the small track of open source AI gateway, OmniRoute is often compared with LiteLLM, OpenRouter, and Portkey. Its differentiation is clear: the most complete supplier directory (the README says there are 250 and more than 90 with free tiers, while similar routers usually only have 20 to 100), the most free suppliers, the richest routing strategies, and unique compression capabilities. Aggregation sites such as awesome-repositories classify it as a "unified LLM API gateway", emphasizing that it uses standardized APIs to shield differences among various protocols, and uses circuit breakers to isolate supplier failures. However, it is also often pointed out that it is a project that "stands on the shoulders of giants": its roots are a fork of 9router, a rewrite of CLIProxyAPI, and the cost data leverages LiteLLM's public pricing. This "integration" route is very common in the open source circle. The advantages are fast iterations and a full stack of functions. The risks are high project complexity, wide maintenance coverage, and strong reliance on a single core maintainer.

  • The first is supply chain and maintenance risks. The project relies heavily on a long list of free third-party providers, and these providers may adjust quotas, limit traffic, or even shut down at any time. Therefore, OmniRoute's $0 experience is not completely under your control. The second is the security boundary. Although it claims that API Key and OAuth are stored encrypted with AES-256-GCM, with zero telemetry by default, and local priority, capabilities such as MITM/TPROXY decryption and TLS fingerprint disguise are themselves double-edged swords. If used incorrectly, they may step on the red line of compliance or platform terms. The third is that the project pace is too fast, versions and parameters change frequently, and old tutorials are prone to invalidation, which is not friendly to teams pursuing stability.

  • OmniRoute is most suitable for two types of people: one is individual developers who heavily use coding assistants such as Claude Code / Cursor and do not want to pay dozens of dollars for multiple APIs every month; the other is small teams who want to use a set of endpoints to manage multiple models in a unified manner and require automatic failover and cost telemetry. It does a very thorough job of assembling the free tier into a production-grade version. Not suitable for: enterprise production environments with strong SLA requirements for stability; and users who want to use it out of the box and are unwilling to fiddle with routing strategies and compression configurations - these people may be more worry-free with managed gateways such as OpenRouter. As an alternative, if you are looking for simplicity, look to OpenRouter, if you are looking for enterprise-level observability and governance, look to Portkey, and if you are looking for lightweight self-hosting, look to LiteLLM.

  • OmniRoute is currently the open source AI gateway that does the best of the four things of "supplier coverage + free quota aggregation + automatic rollback + token compression". It is an almost zero-cost "uninterruptible power supply" solution for individual coding players; the price is high engineering complexity and rapid iteration, which requires you to be willing to spend some time to understand it thoroughly.

User Reviews

  • 头像
    0bkg6e7fz9
    试了下 OmniRoute 的 RTK 压缩,给 git diff 跑了两次,第一次 140k token 压到 21k,第二次 78k 压到 5.3k,省了 93%。这数字不是吹的,但普通对话场景也就省 20% 出头,别期待太高。

  • 头像
    LAlvarezIII
    装了一晚上,折腾半天终于把 OmniRoute 跑起来了。自动回退确实牛,Claude Code 额度用完直接切到免费提供商,完全没断过。但配置确实复杂,光路由策略就有 18 种,新手得花点时间啃文档。

  • 头像
    Samuel.Lewis_9982
    OmniRoute 的 Combo 路由是杀手级功能。我配了一条链:订阅额度 → API 付费 → 便宜模型 → 免费池,四层防护,写代码再也没弹过 rate limit。以前用 Cursor 到月底必卡,现在完全无缝。

  • 头像
    萧晨君
    白嫖党福音!原来每个月花两百多刀在 API 上,自从上了 OmniRoute,靠着免费池子硬是省了 80% 的费用。尤其那 11 个永久免费不用绑卡的提供商,真香。

  • 头像
    VHernandez_2022
    安全方面有点劝退。TLS 指纹伪装和 MITM 代理这种操作,读着就觉得灰色地带。GitHub 上看了一圈 issue,有人提了 Socket.dev 的扫描结果说不乐观。个人用用还行,公司环境谁敢上?

  • 头像
    David_Ward_8806
    太强了

  • 头像
    安然_5
    跟着文档装了一遍,docker pull 就跑起来了,前后也就十分钟。指向 localhost:20128/v1 之后 Cursor 和 Claude Code 都能直接用,确实省事。

  • 头像
    RPowell_2020
    卡成PPT了,不知道是不是我配置的问题,开压缩之后响应慢得一批。有没有大手子分享下最佳实践配置?

  • 头像
    Deborah_Sanders_Max4
    压缩延迟是个问题。我测了下每次请求多了 100-150ms,写代码还好,但用聊天界面的时候明显感觉响应变慢了。追求低延迟的还是关掉压缩吧。

  • 头像
    JThomasX
    和 LiteLLM 对比了一下,OmniRoute 的提供商数量确实碾压,但 LiteLLM 的文档和社区成熟度高了不止一个档次。如果只是做简单路由,LiteLLM 更稳。要白嫖免费模型的话选 OmniRoute。

  • 头像
    MasonMoralesII
    Fusion 路由策略绝了,同时发请求给三个模型然后用 judge 模型汇总最佳答案。写复杂逻辑的时候准确率高了不少,就是 token 消耗也上去了,适合不差钱的时候用。

  • 头像
    ebejc1an
    看到 20k stars 一夜之间冒出来就觉得不对劲。去翻了下 commit 历史,7 个 commit 加了 20 万行代码?这怎么看怎么可疑啊。虽然功能确实好用,但 repo 的水分让人不太放心。

  • 头像
    SRodriguezZ
    更新太频繁了,上周才装好 3.8.44,这周又到 3.8.49 了。配置格式说变就变,生产环境根本不敢随便升级。建议 pin 版本用,别追新。

  • 头像
    Catherine.Reyes_Max
    项目方向确实好,免费额度聚合加智能回退加 token 压缩,三个痛点全打中了。而且开源 MIT 协议,数据完全本地化,不存在隐私问题。就是迭代速度太快,稳定性有待观察。

  • 头像
    Grace.BaileyIII9
    MCP 支持不错,暴露了 95 个 tool,能直接当 MCP server 用。我让 Agent 自己通过 OmniRoute 管理路由和配额,真·套娃。

  • 头像
    Jason_HendersonIII
    免费模型的智商确实比不上付费版,Poolinations 的生成质量跟 GPT-4o 完全没法比。但写写简单脚本、跑跑测试用例够用了。一分钱一分货,不寒碜。

  • 头像
    Gary_Hicks_8818
    Dashboard 做得很漂亮,实时看到还剩多少免费额度、压缩率多少、各个 provider 的健康状态。对喜欢可视化的人来说体验很好。

  • 头像
    DRlar
    有没有人遇到内存泄漏的?跑了两天发现 RSS 涨到 2GB 了,重启才好。看 GitHub issues 好像不是个例,希望尽快修。

  • 头像
    KaylaWatson
    迭代太快了,跟不动。

  • 头像
    Charles_Ramirez_88
    免费的,真香。

  • 头像
    史哲婷
    试了下它的 Quota-Share 功能,一个 Codex Pro 账号分给三个人用,配了权重策略,硬限制+软限制都有。团队协作场景确实实用,不用人手一个订阅了。

  • 头像
    JerryKingK
    实话实说,免费提供商挂了的情况我遇到过两次,好在 OmniRoute 的断路器秒切到下一个了。但延迟确实比直连高,大概多了 50-80ms。个人开发者省钱神器,生产环境还是算了。

  • 头像
    C_hristina258
    用了两周,API 账单直接归零。我把 Kiro、Qoder、Pollinations 几个免费的拼成一个 combo,日常写代码改 bug 完全够用,不用绑卡不用信用卡。

  • 头像
    GregorySullivanQ845
    yyds,白嫖快乐。

  • 头像
    Larry_Miller
    回不去了,本地网关真香。

  • 头像
    WolfWallet570
    刚装上,把 Cursor 和 Claude Code 都指到 localhost:20128,确实一个端点全搞定,配置省心多了。

  • 头像
    Larry_Long0070
    踩了个坑分享下:第一次进 Dashboard 看到两百多个供应商直接选择困难。后来照攻略先连 Kiro、Qoder、Pollinations、Cloudflare AI 四个免费的,跑顺了再慢慢加。别贪多,先用起来最重要。

  • 头像
    David_Roberts_2023
    Node 版本坑到了,低于 18 一堆报错,先 node -v 看一眼再装。

  • 头像
    戴素磊
    请求路径 100% 跑自己硬件,不想被云厂商卡脖子的可以上。

  • 头像
    biglion331
    auto 模式偶尔翻车,选到慢供应商等得怀疑人生,写代码还是用 auto/coding 稳。