v4.0.20
farion1231/cc-switchv4.0.20Oct 24, 2026by github-actions[bot]
Upgrading?
Release notes summary
CC Switch v4.0.20 adds support for Oh My Pi as the 13th managed application, with full provider, MCP, Skills, prompt, and session integration plus install/upgrade/uninstall from the Apps page. It also introduces browser-based login for managed ChatGPT accounts, editable Kimi official account cards, and a reorganized Apps page with drag-to-reorder installed apps. A batch of fixes addresses DeepSeek balance display, Kimi Code subagent usage tracking, Skills HTTP 429 errors, Pi environment-variable API keys, Claude Code session titles, and Linux window dragging.
Key Highlights
- Oh My Pi (omp) becomes the 13th supported app: multiple providers written simultaneously to models.yml, MCP in mcp.json, Skills in its own directory, prompts in AGENTS.md, session browsing/restore, and lifecycle management from the Apps page
- Managed ChatGPT accounts can now be added and re-authenticated via browser login, useful for enterprise workspaces that disable device-code login
- Apps page split into 'Installed' and 'Not installed' groups with counts, and installed apps can be drag-reordered with the sidebar following that order
- Kimi official account cards are now editable (model list fetched from the account) and can be removed from Kimi Code while keeping the login
- Numerous fixes: DeepSeek zero-balance shown as 'plan expired', Kimi Code subagent usage not counted, Skills updates failing with HTTP 429, Pi $VAR API keys returning 401, Claude Code session titles showing local-command output, and Linux header dragging when app-level window buttons are enabled
Breaking Changes
- Database schema upgraded from version 22 to 23 (adds an Oh My Pi toggle for MCP); a database backup is taken automatically before upgrading, and downgrading to an older CC Switch version will fail because the database version is too new
New Features
- Oh My Pi support as a standalone app with its own providers, MCP, Skills, prompts, and sessions, configurable at ~/.omp/agent or per-profile directories
- Concurrent provider enablement for Oh My Pi, writing multiple providers into models.yml while preserving unrelated file content and warning on YAML anchors/tags
- Pre-write validation against Oh My Pi's rules, plus guidance to run omp once when only a legacy models.json exists
- Oh My Pi provider form sharing presets with Pi, including model list selection dialog, advanced options for auto-discovery, headers, and compatibility settings
- Session browsing and restore for Oh My Pi, including image previews from the project
- Install, upgrade (omp update or Homebrew), and uninstall of Oh My Pi from the Apps page
- Browser login option for managed ChatGPT accounts in the auth center and Codex provider form
- Apps page grouping into Installed/Not installed with counts and drag-to-reorder for installed apps, persisted locally only
- Editable Kimi official account cards with model list fetching and removal from Kimi Code without deleting the login
- 'Not subscribed' indicator for Kimi accounts without a Kimi Code plan
- Balance display always shows the amount, with red/orange styling for zero or negative balances
- Pi model list selection dialog with checkbox-based model addition and removal
- Pi request headers and compatibility options moved into a collapsed Advanced Options section
- GitHub Copilot providers for Claude Code and Claude Desktop now show upstream format as automatically selected per model
- Usage page tab counts displayed immediately without layout shift
- Price table additions for Kimi K3.1 Pro and K3.1 Pro HighSpeed
- Completed Turkish translation
- Updated provider presets to the latest model versions
Full Release Notes
# CC Switch v4.0.20
本版本新增对 Oh My Pi 的支持,它是 CC Switch 管理的第 13 个应用:多个供应商可以同时写进它的 `models.yml`,MCP、Skills、提示词同步给 Oh My Pi,会话可以浏览和恢复,「应用」页可以安装、升级、卸载 Oh My Pi。「应用」页分成「已安装」「未安装」两组,已安装的应用可以拖动排序,侧栏跟着这个顺序。Kimi 官方账号的卡片现在可以编辑模型、从 Kimi Code 里移除;托管的 ChatGPT 账号可以用浏览器登录。另外修复了 DeepSeek 余额用完后显示成「套餐已过期」、Kimi Code 子代理的用量没有统计、Skills 更新一直报 HTTP 429、Pi 的 API Key 写成环境变量引用时额度查询 401、Claude Code 会话标题显示成 `<local-command-stdout>`、Linux 上开启应用级窗口按钮后页头拖不动等问题。4.0 完整的更新内容请见 [v4.0 发布说明](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-zh.md)。
**[English →](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.20-en.md) | [日本語版 →](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.20-ja.md)**
---
## 新增
### Oh My Pi
Oh My Pi(命令是 `omp`)现在是一个独立的应用,有自己的供应商、MCP、Skills、提示词和会话([#6747](https://github.com/farion1231/cc-switch/pull/6747)、[#8308](https://github.com/farion1231/cc-switch/pull/8308))。配置在 `~/.omp/agent`,用了命名 profile 时在 `~/.omp/profiles/<名称>/agent`;也可以在设置里改成别的目录。
- **供应商可以同时启用。** 和 Pi 一样,卡片上是「启用」「移除」,多个供应商同时写进 `models.yml`,在 Oh My Pi 里选用。只改 CC Switch 写的那一条,文件里其他内容原样保留;用了 YAML 锚点、标签这类写法的条目不会被重写,会提示你手动修改。
- **写入前按 Oh My Pi 的规则检查。** Oh My Pi 只要有一条供应商不合规,就会停用所有自定义供应商,所以填了它不接受的值,保存时会直接提示,不会写进去。只有旧版的 `models.json`、还没有 `models.yml` 时,会提示你先运行一次 `omp`,让它自己迁移,不会新建文件挤掉你原来的供应商。
- **添加供应商。** 表单和 Pi 共用,预设也来自 Pi 的目录;「获取模型列表」后在弹窗里勾选模型。「模型自动发现」(让 Oh My Pi 自己去接口查有哪些模型)和请求头、兼容选项一起放在「高级选项」里。API Key 可以写环境变量名,查询额度时 CC Switch 会按 Oh My Pi 的规则取出实际的值。
- **MCP、Skills、提示词。** MCP 写进 `mcp.json`,Skills 装进 Oh My Pi 自己的技能目录,提示词写进 `AGENTS.md`。Oh My Pi 还会从其他工具的目录里找 MCP 和技能,实际加载的可能比 CC Switch 里列出的多,MCP 和 Skills 页 Oh My Pi 一列的说明里有解释。
- **会话。** 可以浏览和恢复 Oh My Pi 的会话,预览里能显示项目里的图片。
- **「应用」页管理 Oh My Pi。** 用官方安装脚本安装(装了 Bun 就用 Bun,没装就下载官方的二进制),升级运行 `omp update`(用 Homebrew 装的仍然走 Homebrew),可以卸载。
- Oh My Pi 不经过本地路由,也暂不统计用量。
### 托管 ChatGPT 账号可以用浏览器登录
在授权中心或 Codex 的供应商表单里添加托管 ChatGPT 账号时,可以在「登录方式」里选「浏览器登录」([#8288](https://github.com/farion1231/cc-switch/pull/8288)、[#8284](https://github.com/farion1231/cc-switch/issues/8284))。有些企业工作区关掉了设备代码登录,这些账号以前加不进来;重新登录也可以用浏览器。「设备代码登录」仍然可选。
## 改进
**「应用」页分成「已安装」「未安装」两组。** 每组标题带数量,没有应用的组不显示;刚打开、还在检测时先显示一整张表,检测完再分组,行不会一个个跳。Claude Desktop 没有命令可查,按是否装了 Desktop 来分组,行里照旧写是否已接入 CC Switch。
**已安装的应用可以拖动排序。** 鼠标移到某一行上,行首会出现拖动手柄,和供应商卡片排序一样。侧栏和默认打开的应用都跟着这个顺序;顺序只存在本机,不随云同步。
**Kimi 官方账号的卡片可以编辑和移除。** 以前官方卡片只能在授权中心管理,模型停在登录时的那一份。现在可以编辑卡片:连接和登录仍由授权中心管,这里只改模型,「获取模型列表」读取这个账号当前可用的官方模型,带上官方的上下文窗口、能力和思考档位。官方卡片也可以像其他 Kimi 供应商一样从 Kimi Code 里「移除」,卡片和登录都保留,再点「添加」就恢复;要删除,先移除,或者到授权中心删。
**没有 Kimi Code 套餐的 Kimi 账号显示「未订阅」。** 以前授权中心和官方卡片的额度一栏是空的,看起来像查询失败。
**余额用完也显示金额。** 余额为零或欠费时,供应商卡片和托盘以前只写「余额已用完」,看不出欠了多少,红字也和「额度查询失败」分不清。现在一律显示「余额 <金额>」,为零或负数时卡片上整行变红、托盘里变成橙色,和以前一样。
**额度查询失败的中文提示改成「额度查询失败」**(以前是「额度没查到」),供应商卡片、授权中心和托盘一起改。
**Pi 获取模型列表后在弹窗里勾选。** 以前只能逐行从下拉框里选,现在和 OpenCode、Codex、Kimi Code 一样弹出列表,勾选的模型自动加成一行,从预设或 models.dev 补上参数;取消勾选会删掉对应的行。逐行的下拉框还在。
**Pi 的请求头和兼容选项收进「高级选项」。** 默认收起,和 Claude Code、Codex 的表单一致;兼容选项的说明改成了白话。
**Claude Code、Claude Desktop 选 GitHub Copilot 供应商时,上游格式显示为「由路由按模型自动选择」**([#8196](https://github.com/farion1231/cc-switch/pull/8196)、[#8195](https://github.com/farion1231/cc-switch/issues/8195))。Copilot 的上游格式本来就按模型自动选,以前表单里还能手选,选了也不生效。
**用量页明细页签的数量一次全显示。** 以前「模型」页签要点开才有数量,切换应用时三个数量会消失再出现,页签栏跟着跳。
**价格表新增 Kimi K3.1 Pro 和 K3.1 Pro HighSpeed。**
**土耳其语翻译补全**([#8616](https://github.com/farion1231/cc-switch/pull/8616))。
**预设:** 各家预设的模型更新到当前的最新型号,填上 Key 就能用。
## 修复
- **DeepSeek 余额为零或欠费时,卡片和托盘显示「套餐已过期」,余额数字不见了**([#8812](https://github.com/farion1231/cc-switch/issues/8812))。DeepSeek 返回的「是否可用」只表示余额够不够调用,余额一到零就变成否,Key 本身仍然有效。现在照常显示余额;Key 真的失效时,仍按认证失败提示。
- **Kimi Code 子代理的用量没有统计进来**([#8792](https://github.com/farion1231/cc-switch/issues/8792))。Kimi Code 把每个子代理的记录写在单独的文件里,以前只读了主代理的那份。现在每个子代理都会导入,按每次调用记账,不会和主代理的汇总重复计算。
- **Antigravity 子代理和 ACP 会话的用量记成未知模型**([#8693](https://github.com/farion1231/cc-switch/pull/8693))。现在从 agy 本地的对话数据库里找回模型(只读,不会等 agy 写完)。
- **Skills 安装或更新一直报 HTTP 429**([#8813](https://github.com/farion1231/cc-switch/issues/8813))。下载 GitHub 仓库压缩包时没带 User-Agent,GitHub 对这类请求限流更严,多人共用一个出口 IP 时更容易碰到。现在会带上 `CC-Switch/<version>`。
- **Pi 的 API Key 写成 `$NAME`、`${NAME}` 这类环境变量引用时,额度和余额查询报 401**([#8822](https://github.com/farion1231/cc-switch/issues/8822))。以前把引用原样当成 Key 发出去,现在按 Pi 的规则取出变量的值;变量没设置时,也不会再把引用当成 Key 发出去。`!command` 形式的 Key,CC Switch 仍然不会执行。取出的值只用于这次查询,不写回配置。
- **Claude Code 会话在会话管理里的标题显示成 `<local-command-stdout>Set model to opus</local-command-stdout>`**([#8799](https://github.com/farion1231/cc-switch/pull/8799)、[#8798](https://github.com/farion1231/cc-switch/issues/8798))。会话一开头运行了 `/model`、`/effort` 这类本地命令时,标题会这样;最后运行了本地命令时,列表里显示的最后一条消息也是命令输出。现在会跳过这些记录。
- **Linux 上开启「启用应用级窗口按钮」后,页头拖不动窗口,窗口边缘也没有缩放光标**([#8092](https://github.com/farion1231/cc-switch/pull/8092)、[#8091](https://github.com/farion1231/cc-switch/issues/8091))。
- **Codex 经 Chat 上游时,带图片的孤立工具结果里,占位文字说图片在「下一条消息」里,实际并没有这条消息**([#8157](https://github.com/farion1231/cc-switch/pull/8157))。现在改成说图片已经作为图片附上。
## 升级说明
**数据库版本从 22 升到 23**,为 MCP 增加 Oh My Pi 的开关。升级前会自动备份数据库;升级后再退回旧版本,旧版本会提示数据库版本过新,打不开。
- Oh My Pi 默认显示在侧栏,不用的话可以在「应用」页关掉「在侧栏显示 Oh My Pi」。
---
## 致谢
感谢 @JackieJK、@allenxu09(Oh My Pi 支持)、@Llugaes(ChatGPT 账号浏览器登录)、@dsdbb520(Antigravity 子代理用量)、@L4XB(Claude Code 会话标题)、@vianrina(Linux 窗口拖动)、@Railgun-wiki(Copilot 上游格式)、@NeeYoonc(孤立工具结果的图片占位)、@alkank(土耳其语翻译)的贡献。
感谢 @CypressStar、@taylortaurus、@SoraStr、@Lain-in-coding、@TomMao23、@L-Molish、@taki-ohh 报告问题、提供复现信息和修复思路。
特别感谢以下贡献者:你们的 PR 发现并修复了真实的问题,只是同样的问题后来在主线上另行修好,PR 因此关闭。@yvzhou1111、@AkimioJR、@KirisameLonnet。
完整的技术细节请见 [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md)。
Related Repositories
An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.
Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.