Claude Code model router
Trae Proxy
爆锤Trae不支持自定义模型接入。通过Trae Proxy,可以支持在trae中接入并切换任意上游中转服务、不在服务列表中的coding plan等等。不影响codex、claude code正常使用。Trae proxy and switch
Install
git clone https://github.com/DASungta/trae-proxy.gitFrom the README
Trae Proxy Trae现在已经支持自定义url地址接入。这个项目已经没太大意义了,仅用作研究。 让 Trae 接入任意 Anthropic 或 OpenAI 兼容的自定义模型端点。 特点: - 单二进制,零依赖,跨平台,一键启动 - 无需 sudo:macOS 通过原生授权对话框完成系统操作,无权限污染 - 交互式向导支持方向键导航、搜索过滤,初始化体验大幅提升 支持的上游类型: - 各类中转站(sub2api、one-api、new-api 等) - 支持 Anthropic Messages API / OpenAI Completions API 的云服务(讯飞星火、京东云、无问心穹、移动云等) - 自建反代、中转(Antigravity 等) 从旧版本升级? 查看 v0.4.0 升级指南 → 想看旧版本文档? 旧版 README (v0.3.x) → 快速开始 macOS / Linux 用户?1 分钟快速开始 → Windows 用户?2 分钟快速开始 → 新版本已经解除限制!~~注意:一定要在 trae-proxy 没有 start 的时候,在 Trae 添加模型、编辑模型,否则会一直提示错误的模型名称!~~ 安装 macOS / Linux(一键安装) v0.4.0 起不再需要 sudo 安装脚本。安装后,init 步骤会在需要时弹出系统授权对话框。 macOS 注意事项 - 支持 Apple Silicon(M 系列)和 Intel,脚本自动检测架构 - init 时 CA 证书和 hosts 修改通过 macOS 原生授权对话框获取权限,不需要 sudo - 如果对话框未弹出,确认二进制路径不在受限目录(如 Downloads) Linux 注意事项 - 目前支持 x86_64(amd64)架构 - Linux 平台 CA 安装和 hosts 修改仍需 sudo - RHEL/CentOS 无 update-ca-certificates:手动将 ~/.config/trae-proxy/ca/root-ca.pem 复制到 /etc/pki/ca-trust/source/anchors/ 并执行 update-ca-trust Windwos (一键安装) 在管理员权限的 PowerShell 中运行: Windows(手动安装) 1. 从 Releases 页面下载 trae-proxy-windows-amd64.exe 2. 重命名为 trae-proxy.exe,放到任意目录(如 C:\tools\) 3. 将该目录添加到系统 PATH 环境变量 所有命令需在管理员身份的 PowerShell 中运行(右键 → 以管理员身份运行)。 Windows 注意事项 - init 时 CA 证书通过 certutil -addstore -f "ROOT" 安装,系统会弹出安全警告,选"是"确认 - Windows Defender 首次运行时可能弹出防火墙提示,需允许 trae-proxy 监听网络 - 不支持 osascript 授权对话框,CA 安装仍需管理员权限 从源码编译(需要 Go 1.21+) 初始化 启动交互式向导,依次完成: 1. 上游服务地址 — 输入中转服务 / API 端点 URL(自动校验格式) 2. 上游协议 — 方向键选择 anthropic 或 openai 3. 模型映射 — 从 Trae 支持的模型列表中搜索选择,并填写上游实际接受的模型名 向导结束后自动: - 生成本地 Root CA 和服务端证书(存放在 ~/.config/trae-proxy/ca/) - 通过系统授权对话框(macOS)将 Root CA 安装到系统信任库 - 将配置写入 ~/.config/trae-proxy/config.toml 跳过向导使用默认配置:trae-proxy init --yes 配置 Trae 1. 打开 Trae → 设置 → 模型 → 添加模型 2. 服务商选择 OpenRouter(默认劫持域名) 3. 选择对应模型(如 Anthropic: Claude Sonnet 4.5) 4. 填入你上游服务的…
Details
- Repository
- DASungta/trae-proxy
- Language
- Go
- Last updated
- 24 April 2026
- Topics
- claude-codecodextrae
FAQ
What is Trae Proxy?
爆锤Trae不支持自定义模型接入。通过Trae Proxy,可以支持在trae中接入并切换任意上游中转服务、不在服务列表中的coding plan等等。不影响codex、claude code正常使用。Trae proxy and switch It is a model router for Claude Code, from DASungta/trae-proxy on GitHub.
How do I install Trae Proxy?
Clone DASungta/trae-proxy from GitHub and follow the setup steps in its README.
Is Trae Proxy popular?
DASungta/trae-proxy has 51 GitHub stars and 12 forks. It was last updated on 24 April 2026.
More model routers & proxies
CC VisionRouter
76Able-rip/cc-VisionRouter
Transparent proxy for Claude Code that auto-routes image-bearing requests to a multimodal model — so a non-multimodal primary model never crashes your long-running sessions.
Wuyun Liuqi Skills
52dhicoc/wuyun-liuqi-skills
五运六气技能路由包 - AI 自动路由 + 确定性推算引擎 + RAG 知识库 + 自进化经验库 | 32 asset / 2124 条医案 / 53 篇文献 | 支持 Claude Code / Cursor / Codex CLI / Cline / OpenClaw | TCM Yunqi Skills Router - AI auto-routing + deterministic calculation engine + RAG knowledge base + self-evolving journal | 32 assets / 2124 cases / 53 texts | Claude Code / Cursor / Codex / Cline / OpenClaw
Claude Code Mlx Proxy
51chand1012/claude-code-mlx-proxy
Run Claude Code with Local MLX powered models
Anymodel
45anton-abyzov/anymodel
Use Claude Code with any AI model — proxy tools for OpenRouter, Ollama, and 200+ models
Opencode Proxy API
53sionex-code/opencode-proxy-api
Use OpenCode / Claude Code For Free
Star Cliproxy
43starhunt/star-cliproxy
OpenAI- & Anthropic-compatible API proxy for AI coding CLIs — expose Claude Code, OpenAI Codex, Google Antigravity, and xAI Grok CLI as local, drop-in API endpoints with no API key and zero usage fees
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.