Files

7.1 KiB

CC Switch v4.0.2

The second fix release for the 4.0 preview

This release fixes Claude Code conversations on a ChatGPT account breaking with a 400 error and Codex aggregated models not showing up, among other issues. In Claude Code's Aggregation mode, /model now lists just the aggregated models, and changing them no longer needs a Claude Code restart. MCP servers can also be synced to Pi 1.0. Starting with this release, the first launch after an update shows a short summary of what changed. For everything new in 4.0, see the v4.0 release notes.

Preview builds do not update automatically. In-app updates follow stable releases only. If you installed 4.0.0 or 4.0.1, download 4.0.2 from this page and install it manually.


New

MCP servers can be synced to Pi 1.0. Pi 1.0 has built-in MCP with the same config format as Claude Code, so the MCP page can now turn on sync for Pi. CC Switch writes only the connection fields and leaves Pi's own settings, such as timeouts, tool exposure and OAuth, as they are. Turning sync off does not delete the entry; it is marked disabled in Pi, and those settings are still there when you turn it back on. Configurations Pi does not support (the SSE transport, special characters in the name) are flagged right away and never written to the file.

A short summary after updating. The first time you open CC Switch after an upgrade, a window lists the main changes of every version since you last opened it, a few lines each; click "Details" for the full notes. To see it again later, click "Recent updates" in Settings → About.

Fixes

  • In Claude Code's Aggregation mode, /model opened with four rows of the same model. After turning on Aggregation mode, the top of Claude Code's model list showed four identical rows (one for each of the Opus, Sonnet, Haiku and Fable tiers) before the aggregated models. Now the list holds only "Default" and the aggregated models, each row showing the model name and its context window. Leaving Aggregation mode removes this list, and Claude Code goes back to its own default list. If you wrote a modelPicker into settings.json by hand, switching providers or modes replaces it. This needs Claude Code 2.1.243 or later; see the upgrade notes below.
  • Claude Code conversations on a ChatGPT account broke with a 400 error. Since October 3, the official Codex backend adds a field to its reasoning records and then rejects that same field on the next request, so when Claude Code ran on a ChatGPT account (Codex OAuth), the next turn of every conversation failed with 400 Unknown parameter: 'input[N].status'. Reasoning records are now replayed with only the fields that are needed, and conversations that already failed recover on their own, with nothing for you to do.
  • After another tool changed Codex's model catalog setting, CC Switch's model mapping and aggregated models stopped working. Similar tools (and older versions of CC Switch) write a model_catalog_json into config.toml that points Codex at their own model catalog. CC Switch used to leave that entry alone, so the catalog it generated never took effect, without even a warning in Direct mode. Now every switch rewrites the entry, whoever wrote it before: it points at CC Switch's generated catalog when model mapping or Aggregation mode needs one, and is removed otherwise. If you do want a provider to use its own model catalog, put the entry in that provider's config. Older versions could also save this entry into a provider's own config by mistake; in that case, the Aggregation mode notice offers a "Use CC Switch's model catalog" button that clears it in one click.
  • The time MCP preset exited right after it started. The npm package the preset used does not actually exist; it now runs the officially published uvx mcp-server-time. Servers you already added from this preset are not updated automatically: change the command to uvx and the argument to mcp-server-time by hand.
  • Picking many reasoning levels stretched a row of the Codex model catalog. Rows now always line up with the header. Consecutive levels are shortened to something like "low → max", and hovering shows the full list and the default level.
  • Usage time range picker: the selected start and end fields no longer show an extra gray border, and they sit a little further below the presets.

Polish

  • No more restarts after changing Claude Code's aggregated models. Adding or removing aggregated providers or models, changing the default model and editing context windows all take effect in a running Claude Code right away, and the "restart Claude Code" hints are gone. Codex reads its model catalog only at startup, so it still needs a restart.
  • The provider form follows the tab you are on. Adding or editing a provider from the "Aggregation" tab uses the simple form; opening it from the "Direct" or "Routing" tab uses the full form. The link for switching between the two forms is gone, and while the simple form is in use, its title reads "(Aggregation mode)".
  • Fetched models can be picked straight into the model mapping table of the full Codex form. After "Fetch Models", the model mapping section shows the same searchable list as the Aggregation form; each model you check becomes a new row, with its context window and reasoning levels filled in. The add button next to it is now called "Add manually", for models the list does not have.
  • Provider icons with their own background fill the icon box. Icons that come with a background color, such as 88API and Qiniu, used to shrink to a small square inside the border; they now fill the whole box. Icons on a transparent background are a little larger, and a few with too much empty space around them are cropped.

Upgrade Notes

Claude Code's Aggregation mode needs Claude Code 2.1.243 or later. Aggregated models are now listed in /model through the modelPicker setting, which Claude Code added in 2.1.243. Earlier versions ignore this setting, so /model shows none of the aggregated models: you can only use the default model, or pick another one by hand with /model <model ID>. Run claude --version in a terminal to check your version and claude update to upgrade.

The database version is now 20, with a new column for Pi's sync switch; upgrading writes nothing to Pi. Once 4.0.2 has opened the database, going back to 4.0.1, 4.0.0 or 3.x shows "Database version is too new". The database is backed up automatically before the upgrade, under ~/.cc-switch/backups/ (files starting with db_backup_).


Thanks

Thanks to @parkavenue9639 and @ggbdpq (the ChatGPT account 400 fix), @Owlbay and @LystranG (MCP sync for Pi, plus Owlbay's fix for the time MCP preset) and @allenxu09 (the usage time range picker) for their contributions, and to @killServer0 for reporting the time MCP preset issue.

For the full technical details, see the CHANGELOG.