13 KiB
CC Switch v4.0.20
This release adds support for Oh My Pi, the 13th app managed by CC Switch: several providers can be written into its models.yml at the same time, MCP, Skills and prompts sync to Oh My Pi, sessions can be browsed and resumed, and the "Apps" page can install, upgrade and uninstall Oh My Pi. The "Apps" page is split into "Installed" and "Not installed" groups, and installed apps can be dragged to reorder them, with the sidebar following that order. Cards for official Kimi accounts can now have their models edited and be removed from Kimi Code; managed ChatGPT accounts can sign in through the browser. Other fixes cover DeepSeek showing "Plan expired" once the balance runs out, Kimi Code subagent usage not being counted, Skills updates failing with HTTP 429 every time, quota queries returning 401 when Pi's API Key is written as an environment variable reference, Claude Code session titles showing as <local-command-stdout>, and the header not dragging the window on Linux with app-level window controls enabled. For everything new in 4.0, see the v4.0 release notes.
New
Oh My Pi
Oh My Pi (the command is omp) is now a separate app with its own providers, MCP, Skills, prompts and sessions (#6747, #8308). Its configuration is in ~/.omp/agent, or in ~/.omp/profiles/<name>/agent when you use a named profile; you can also point it to another folder in the settings.
- Providers can be enabled at the same time. As with Pi, cards show "Enable" and "Remove"; several providers are written into
models.ymlat once, and you choose among them in Oh My Pi. Only the entry CC Switch writes is changed, and the rest of the file is left as it is; entries that use YAML anchors, tags or similar syntax are not rewritten, and you are asked to edit them by hand. - Checked against Oh My Pi's rules before writing. If even one provider is invalid, Oh My Pi disables every custom provider, so a value it does not accept is flagged as soon as you save and is not written. When there is only a legacy
models.jsonand nomodels.ymlyet, you are asked to runomponce so it migrates the file itself, rather than CC Switch creating a new file that would push out your existing providers. - Adding providers. The form is shared with Pi, and the presets also come from Pi's catalog; after "Fetch Models", you pick models in a dialog. "Model discovery" (letting Oh My Pi query the endpoint for its models itself) sits in "Advanced Options" together with request headers and compatibility options. The API Key can be an environment variable name; when querying quota, CC Switch resolves the actual value using Oh My Pi's rules.
- MCP, Skills, prompts. MCP is written into
mcp.json, Skills are installed into Oh My Pi's own skills folder, and prompts are written intoAGENTS.md. Oh My Pi also looks for MCP servers and skills in other tools' folders, so it may load more than CC Switch lists; the note on the Oh My Pi column of the MCP and Skills pages explains this. - Sessions. You can browse and resume Oh My Pi sessions, and previews can show images from the project.
- Manage Oh My Pi on the "Apps" page. It is installed with the official install script (using Bun if it is installed, otherwise downloading the official binary), upgraded by running
omp update(installs from Homebrew still go through Homebrew), and can be uninstalled. - Oh My Pi does not go through local routing, and its usage is not tracked yet.
Managed ChatGPT accounts can sign in through the browser
When adding a managed ChatGPT account in Accounts or in the Codex provider form, you can choose "Browser login" under "Login method" (#8288, #8284). Some enterprise workspaces turn off device-code sign-in, so these accounts could not be added before; signing in again can also use the browser. "Device-code login" is still available.
Improvements
The "Apps" page is split into "Installed" and "Not installed" groups. Each group title shows a count, and a group with no apps is hidden; right after opening, while detection is still running, a single table is shown first and split into groups once detection finishes, so rows do not jump one by one. Claude Desktop has no command to check, so it is grouped by whether Desktop is installed, and its row still says whether it is connected to CC Switch.
Installed apps can be dragged to reorder them. Hovering over a row shows a drag handle at its start, the same as sorting provider cards. The sidebar and the app opened by default both follow this order; the order is stored only on this device and is not cloud-synced.
Cards for official Kimi accounts can be edited and removed. Before, official cards could only be managed in Accounts, and their models stayed as they were at sign-in. Now you can edit the card: the connection and sign-in are still managed by Accounts, and here you only change the models; "Fetch Models" reads the official models currently available to that account, with the official context window, capabilities and thinking levels. Official cards can also be removed from Kimi Code with "Remove", like other Kimi providers; the card and the sign-in are kept, and clicking "Add" restores it. To delete one, remove it first, or delete it in Accounts.
Kimi accounts without a Kimi Code plan show "No subscription". Before, the quota column in Accounts and on official cards was empty, which looked like a failed query.
The amount is shown even when the balance is used up. When the balance was zero or in debt, provider cards and the tray used to say only "Balance used up", without showing how much was owed, and the red text was hard to tell apart from "Quota unavailable". Now it always shows "Balance "; at zero or below, the whole line turns red on the card and amber in the tray, as before.
The Chinese text for a failed quota query now reads "额度查询失败" (formerly "额度没查到") on provider cards, in Accounts and in the tray; this only changes the Simplified and Traditional Chinese text, and English is unchanged.
Pi picks fetched models in a dialog. Before, models could only be chosen row by row from a dropdown; now, as with OpenCode, Codex and Kimi Code, a list pops up, each checked model is added as a row with its parameters filled in from presets or models.dev, and unchecking removes the matching row. The per-row dropdown is still there.
Pi's request headers and compatibility options move into "Advanced Options". It is collapsed by default, matching the Claude Code and Codex forms; the explanations of the compatibility options are rewritten in plain language.
When Claude Code or Claude Desktop uses a GitHub Copilot provider, the upstream format shows "Selected automatically by routing" (#8196, #8195). Copilot's upstream format is already chosen automatically per model; before, the form still let you pick one by hand, which had no effect.
All counts on the Usage page's detail tabs are shown at once. Before, the "Models" tab only showed its count after you opened it, and switching apps made the three counts disappear and reappear, shifting the tab bar.
The pricing table adds Kimi K3.1 Pro and K3.1 Pro HighSpeed.
Turkish translation completed (#8616).
Presets: Each vendor's preset models are updated to their current latest models, so they work as soon as you enter a Key.
Fixes
- When a DeepSeek balance was zero or in debt, the card and tray showed "Plan expired" and the balance amount disappeared (#8812). The "available" flag DeepSeek returns only says whether the balance is enough for calls, and it turns false as soon as the balance reaches zero, while the Key itself is still valid. The balance is now shown as usual; when the Key really is invalid, it is still reported as an authentication failure.
- Kimi Code subagent usage was not counted (#8792). Kimi Code writes each subagent's records to a separate file, and only the main agent's file used to be read. Now every subagent is imported and billed per call, without double-counting the main agent's summary.
- Usage from Antigravity subagents and ACP sessions was recorded as an unknown model (#8693). The model is now recovered from agy's local conversation database (read-only, without waiting for agy to finish writing).
- Installing or updating Skills kept failing with HTTP 429 (#8813). GitHub repository archives were downloaded without a User-Agent, and GitHub throttles such requests more strictly, which is easier to hit when many people share one outbound IP. A
CC-Switch/<version>User-Agent is now sent. - Quota and balance queries returned 401 when Pi's API Key was written as an environment variable reference such as
$NAMEor${NAME}(#8822). The reference used to be sent as the Key verbatim; the variable's value is now resolved using Pi's rules, and when the variable is not set, the reference is no longer sent as the Key either. Keys in the!commandform are still never run by CC Switch. The resolved value is used only for that query and is not written back to the configuration. - Claude Code sessions showed
<local-command-stdout>Set model to opus</local-command-stdout>as their title in the session manager (#8799, #8798). The title went wrong when a session started by running a local command such as/modelor/effort, and the last message showed the command output when a session ended with one. These records are now skipped. - On Linux with "Enable app-level window controls" turned on, the header could not drag the window, and the window edges showed no resize cursor (#8092, #8091).
- When Codex went through a Chat upstream, the placeholder text in an orphaned tool result with images said the images were in "the following message", but no such message existed (#8157). It now says the images are attached as images.
Upgrade Notes
The database schema goes from 22 to 23, adding an Oh My Pi toggle for MCP. The database is backed up automatically before the upgrade; if you go back to an older version after upgrading, it reports that the database version is too new and cannot open it.
- Oh My Pi is shown in the sidebar by default; if you don't use it, you can turn off "Show Oh My Pi in the sidebar" on the "Apps" page.
Thanks
Thanks to @JackieJK, @allenxu09 (Oh My Pi support), @Llugaes (ChatGPT account browser login), @dsdbb520 (Antigravity subagent usage), @L4XB (Claude Code session titles), @vianrina (Linux window dragging), @Railgun-wiki (Copilot upstream format), @NeeYoonc (image placeholder for orphaned tool results), @alkank (Turkish translation) for their contributions.
Thanks to @CypressStar, @taylortaurus, @SoraStr, @Lain-in-coding, @TomMao23, @L-Molish, @taki-ohh for reporting issues and providing reproduction details and fix ideas.
Special thanks to the following contributors: your PRs found and fixed real problems, and were closed only because the same problems were later fixed separately on the main branch. @yvzhou1111, @AkimioJR, @KirisameLonnet.
For the full technical details, see the CHANGELOG.