Claude Code model router
Dumate2api
DuMate(百度搭子)/ 千问办公 / TRAE Work / Qoder → OpenAI·Anthropic·Google 三协议网关,供 Codex CLI、Claude Code、cc-switch 使用;无 GUI 拉起搭子后端,自带网页管理端
Install
git clone https://github.com/wearetheone777/dumate2api.gitFrom the README
dumate2api 架构与代码详解见 ARCHITECTURE.md。 四条上游 → 三协议网关。 把百度搭子(DuMate)、千问办公、TRAE Work、Qoder 统一转成 OpenAI / Anthropic / Google 兼容 API,供 Codex CLI、Claude Code、cc-switch 等客户端使用;附带网页控制台,管理账号、签到、积分与请求埋点。完整使用说明见 用户使用手册。 特性 - 三协议 + Responses —— OpenAI / Anthropic / Google 全覆盖,含 Codex CLI 0.155+ 只认的 responses 线格式 - 四通道前缀分流 —— 靠模型名前缀显式路由,未知前缀直接 400,不静默回落 - 零客户端依赖 —— 四条通道凭证均自持;千问与 Qoder 的签名是纯本地算法,不需要官方 wasm 或客户端 - 网关零第三方依赖 —— 只用 Node 内置模块(playwright-core 仅管理端浏览器登录器使用) - 网页控制台 —— 仪表盘、模型管理、积分明细(含按月/按年签到详情)、用量统计、请求日志、聊天测试台 - 签到与积分 —— 签到幂等、可定时;抽奖消耗不可逆,只留手动 快速开始 首次启动管理端会打印随机管理员口令,只显示一次。 本仓库日常开发用 start-dev.bat(网关 9082 + 管理端 9083);9080/9081 留给 stable/ 快照对外服务,两者互不影响。 自检: 默认凭证来源是网页池:网关启动时不探测、也不拉起桌面后端。要跑搭子通道,先在管理端「账号管理」登录一个网页账号(或粘贴 cookie);想用桌面登录态则设 DUMATE_DUMATE_SOURCE=auto。千问 / TRAE / Qoder 在「登录态」页走 OAuth,全部无需官方客户端。 四条通道 千问与 Qoder 共用同一套 COSY 协议和一份本地签名实现(src/cosy.js)。千问做重创作/长任务用 pro(flash 会播报进度就收尾);Qoder 零额度时聊天会挂起,签到是通道可用的前提,且倍率差 14 倍、调试用 0.1 档(gfmodel 等)。细节与实测数据见 CLAUDE.md。 客户端配置 Codex 的 config.toml: 管理端 签到详情:每个账号的当月日历 + 全年各月汇总,切换月份即可回看。搭子 / TRAE / Qoder 共用同一视图,本地账本覆盖起点如实标出。 账号管理页:一键签到 / 单账号签到与抽奖 / 跑任务 / 一键抽奖,后台自动轮询的间隔策略如实展示;任务记录并入积分明细的操作流水。 顶栏切换通道,各页面据此显示对应数据。 四条通道的账各自独立,不能相加:搭子靠上游账单 + 余额游标,千问是三个积分池,TRAE 是每账号独立 credits,Qoder 是订阅 + 赠送两块。 常用环境变量 完整列表见 CLAUDE.md。DUMATE2API_KEY 是历史遗留死变量,真实开关是 DUMATE_REQUIRE_KEY。 测试 更多离线验证脚本见 test/verify-*.js,改完对应模块先跑它们。 数据与凭证 data/ 已在 .gitignore。不要提交,不要放进任何备份镜像——凭证被复制走是直接可用的。 许可证 MIT 免责声明:本项目是独立的第三方开源项目,与百度 / 阿里(千问办公、Qoder)/ 字节(TRAE)及 Anthropic / OpenAI / Google 等主体无隶属、合作或背书关系。它通过协议适配与本地客户端互操作,不破解、不绕过任何付费墙或授权机制,不分发任何上游二进制资产,也不上传任何数据——凭证与日志只存本机。积分自动化可能违反上游服务条款并导致账号受限,后果自负。本项目按「现状」提供,不附带任何担保。
Details
- Repository
- wearetheone777/dumate2api
- Language
- JavaScript
- License
- MIT
- Last updated
- 7 November 2026
- Topics
- anthropic-apiapi-proxybaiduclaude-codecodex-clidumategoogle-geminillm-gatewaynodejsopenai-apiopenai-compatibleqianfan
FAQ
What is Dumate2api?
DuMate(百度搭子)/ 千问办公 / TRAE Work / Qoder → OpenAI·Anthropic·Google 三协议网关,供 Codex CLI、Claude Code、cc-switch 使用;无 GUI 拉起搭子后端,自带网页管理端 It is a model router for Claude Code, from wearetheone777/dumate2api on GitHub.
How do I install Dumate2api?
Clone wearetheone777/dumate2api from GitHub and follow the setup steps in its README.
Is Dumate2api popular?
wearetheone777/dumate2api has 29 GitHub stars and 11 forks. It was last updated on 7 November 2026.
More model routers & proxies
Claudecodex
35karem505/claudecodex
Use Claude Code's UI with OpenAI GPT-5.6 (Sol/Terra/Luna) as the engine — powered by your ChatGPT Plus/Pro subscription via a local Codex proxy. One-line install; plain claude stays untouched.
Css Pro Tips
34PyModel/css-pro-tips
Baseline-aware modern CSS Agent Skill: small SKILL.md router + on-demand references. Claude Code, Codex, Cursor, Copilot, Gemini CLI, OpenCode, Pi, Kiro, Pythinker Code, Aider + 70 more agents.
Claude Code Model Router
35luwill/Claude-Code-Model-Router
A lightweight API gateway that lets you switch to third-party AI models when using Claude Code.
Squeezr
34sergioramosv/squeezr
AI-powered Claude Code proxy that uses Haiku to semantically compress context and save thousands of tokens
Helm API
31EasyMetaAu/helm-api
Self-hosted LLM gateway — route OpenAI/Anthropic/Gemini traffic by config, not code. Fallback, protocol translation, telemetry.
Claude Code Proxy
32daodao97/claude-code-proxy
Claude code proxy, friendly view request log, enhance request stability
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.