CC Switch v4.0

Stable release (4.0.4): a new interface, the new Aggregation mode, and safer config switching

This is the first stable release of v4.0, and the app will update to it automatically. It includes everything in the 4.0 preview, plus the fixes and additions made during the preview, from 4.0.1 to 4.0.4.

This is the biggest CC Switch release yet. With it, we've rethought the core of the CC Switch experience: how you connect to models, how you switch providers, and how you manage a growing set of AI coding tools.

The interface has been redesigned from the sidebar to the tray, giving apps, config, usage and sessions each a clear place. The new Aggregation mode puts models from several providers into one Claude Code or Codex model picker, so you can switch between them right inside the client. The Usage page has been redesigned too: every request is logged with its token usage, cost and output speed, and choosing the "All" time range shows the past year of daily usage as a heatmap. Session management has been rewritten from scratch: what the AI did in each turn, what it changed and which step failed are all visible at a glance. And the config-writing core has been rebuilt: switching providers now replaces only the key fields instead of rewriting the whole file, which removes a great deal of complexity and puts an end to a whole class of lost-settings problems. MCP servers can now be synced to Pi too, so one MCP config can serve 8 AI coding tools at once.

Upgrading from 3.x? How provider switching works, the database version and a few settings have changed. We suggest reading "Before You Upgrade" below first.


A Redesigned Interface

The new interface uses a sidebar layout and an orange theme. Switching apps, plus global features like MCP, Skills, Prompts, Sessions, Accounts and Usage, are all one click away in the sidebar.

The new interface: sidebar, mode tabs and provider cards

The Apps page: versions, installs and upgrades for every AI coding tool in one place

Upgrading users see a short note on first launch explaining where things have moved. After each update, the first launch also shows a summary of what changed. To see it again, click "Recent updates" in Settings → About.


Aggregation: Many Providers, One Model Picker

Until now, using another provider's model meant going back to CC Switch, switching providers, and returning to your client.

Turn on Aggregation, add a few providers, and their models all show up together in the Claude Code or Codex model picker. Whichever model you pick, the request goes straight to that provider, without ever leaving the client.

Models from several providers listed together in Codex's model picker

Aggregation: one default provider plus six added providers

Aggregation is opt-in and currently supports Claude Code and Codex. Claude Code's aggregated model list needs Claude Code 2.1.243 or later. Aggregation routes each request by the model you pick, and does not offer failover.

ModeHow requests travelBest for
DirectThe client talks to the provider directlyEveryday use
RoutingThrough local routing to one provider, with protocol conversion and failoverIncompatible protocols, or when you need failover
AggregationThrough local routing, dispatched by model to several providersMixing models from several providers in one session

A Tribute to opencodex

Aggregation learned a great deal from opencodex and builds directly on its ideas: prefixing model IDs with the provider so models from many providers can share the Claude Code and Codex pickers; letting Codex compact context on third-party models; and detecting when a background service is still using an old model list, then prompting a restart. All of these came out of opencodex's exploration. Our thanks to its author (@lidge-jun) and contributors for open-sourcing this work, and our deepest respect for their open-source spirit!

If you want a tool dedicated to bringing any model into Codex and Claude Code, we highly recommend giving opencodex a try!


Usage

The Usage page has redesigned metrics, a trend chart, a request log, and four paginated tables for providers, models and pricing. A new "All" time range shows your daily usage as a 53-week heatmap, and wide-range queries no longer freeze the window.

Usage: the 53-week heatmap and request log


Switch Providers, Keep Your Config Intact

This is the most important under-the-hood change in this release. It applies to Claude Code, Codex, Gemini CLI, Grok Build and Claude Desktop.

CC Switch launched in August 2025, when the API ecosystem was far less mature than it is today. API formats often differed widely between official and third-party providers, so the original design rewrote the whole config file on every switch. That choice brought a series of problems and a lot of complexity. Now that the ecosystem has matured, it's time to rebuild.

Before: Switching providers rewrote the entire config file from that provider's saved snapshot. Hooks, plugins and permissions you added to settings.json, or MCP servers you added to config.toml, were either lost on switch or absorbed into one provider's snapshot, disappearing as soon as you switched to another.

Now: Switching replaces only the endpoint, credential, model and protocol, plus the provider's own switches. Everything else stays exactly where it was:

The editor previews what your config file will look like after switching. Global settings you edit there are written to the config file, and before saving CC Switch checks whether another program has changed the file in the meantime.

The new write engine also adds several layers of protection:

Turning routing on or off no longer relies on backing up and restoring your whole config. When Codex switches to a third-party provider, the ChatGPT login it overwrites is stashed locally and restored automatically when you switch back to your official account.


Session Management: See Every AI Coding Session Clearly

AI coding tools keep a complete record of every session on your machine, but the raw logs are thousands of lines of JSON and nearly impossible to read. This release rewrites session management from scratch to make those records as readable as possible, and adds token usage and cost for each session.

The session reader: step summaries, tool call details and the conversation outline

The session reader redesign was led by @Owlbay. Many thanks to Owlbay for the enormous effort.


MCP Sync to Pi

Pi 1.0 has built-in MCP with the same config format as Claude Code. Turn on sync for Pi on the MCP page, and your existing MCP servers work in Pi right away. Together with Claude Code, Codex, Gemini CLI, Grok Build, OpenCode, Hermes and MiniMax Code, one MCP config can now manage 8 AI coding tools.

MCP sync for Pi was built by @Owlbay and @LystranG.


More Improvements


Before You Upgrade

Where settings live has changed. Shared settings now stay in the client's own config file, and the "common config snippet" feature has been removed. A model or reasoning effort you pick temporarily in the client goes back to the provider's value when you switch away and back. To keep it, save it in the provider editor.

Some fixes take effect after one switch. The Codex model catalog and session history fixes apply the next time CC Switch writes the Codex config, so just switch providers once after upgrading. Re-sync your existing MCP config once to clear the old type field.

Restart when prompted after switching. Codex, Gemini CLI and Grok Build need a restart after switching models, and Codex also needs a restart after its Aggregation list changes. Changes to Claude Code's aggregated models need no restart.

The database schema is now at 20. The database is backed up automatically before the upgrade, under ~/.cc-switch/backups/ (files starting with db_backup_). Going back to 3.x afterwards shows "Database version is too new".

Existing cards stay as they are. Preset updates only apply to newly created providers. For example, existing Claude providers do not get "Disable Auto Mode Server Checks" checked automatically; check it in the editor if you need it. New pricing only backfills requests previously recorded at $0; other historical costs are not recalculated.

Claude Code's Aggregation mode needs 2.1.243 or later. Claude Code added a modelPicker setting in that version, and aggregated models are listed in /model through it. Earlier versions ignore it, so /model shows none of the aggregated models. Run claude --version to check your version and claude update to upgrade.

A few settings have been removed. Per-provider cost multipliers (relay prices already include their multiplier, so applying another one only skews the numbers); the connectivity-check advanced settings (built-in defaults are used now); and Claude's "Teammates Mode" and "Max Effort Thinking" quick toggles (every Claude Code session now has team features built in, and max effort locked every session to the most expensive level; use /effort max in a session when you need it). Variables already written in your config are not removed.


Fixes


Changes Since the 4.0.0 Preview

If you already installed a preview from 4.0.0 to 4.0.3, this section lists what changed during the preview. The notes above already include all of it.

New: Claude Code's "Disable Auto Mode Server Checks" quick toggle and an explanation for every toggle; MCP sync to Pi 1.0; full-page editing for MCP servers and prompts, with a reminder to save before leaving; the "Other Backups" overview; Codex Credits balance; OpenCode 2.0's new provider config and thinking variants; Success Rate and Speed columns in the Usage model table; OpenCode Zen and MoArk presets; select-all for installed Skills; switch logging; an update summary after each update.

Fixes: ChatGPT account conversations failing with a 400; reasoning at full effort with thinking off; four rows of the same model at the top of /model in Claude Code's Aggregation mode; apps checked when importing a Skill not getting it; model mapping and aggregated models not working after another tool changed Codex's model catalog setting; Gemini CLI sessions not showing up; Codex under WSL slowing down scans; upstream errors reported as an output limit; Claude Desktop with OpenCode Go failing with a 400; tool calls lost in streaming; usage tables leaving out cache tokens; usage writes slowing down routing; the time MCP preset exiting at startup; Codex usage sync possibly hanging; plus UI details such as the sidebar animation, the divider, rows stretched by picking many reasoning levels, the time range picker border and icons filling their box.

Polish: Changing Claude Code's aggregated models no longer needs a restart; the provider form follows the tab you are on, and models fetched in the full Codex form can be picked straight into the model mapping table; Claude's "Teammates Mode" and "Max Effort Thinking" quick toggles are removed.

New in 4.0.4:


Thanks

Thanks to everyone who contributed to this release:

@Owlbay (session reader redesign, usage heatmap and performance, full-page editing and the unsaved-changes reminder, MCP sync for Pi, the time MCP preset, the MiMo presets), @qyinter (extensive UI/UX polish), @allenxu09, @parkavenue9639, @ggbdpq, @SailingLoong, @DEAN-Cherry, @LystranG, @lcgash, @Chris-Xie369, @fisHarly0, @minc-nice-100, @funkpopo, @ISuuuu, @tingfeng347, @Hexc01, @zhengkaics, @7ten7, @2doright, @RemindZ, @M3chD09, @Richard-Zhang1019, @YuxuZhou-CN, @Eureka0w0v0, @Ne1ther, @h6rime, @bigben446, @szupzj18, @AnxForever

Thanks also to @PnutCN, @Aaron-WealthTech, @RuriLothlorien, @Ming-Sir-69, @juntaosun, @killServer0, @shangchaovo, @gsmchen, @winter-maple, @guangzh3n, @AltCtrlFn, @R-Tsubasa, @Lingbou, @Enough1122, @IAld010 for detailed bug reports, investigation and suggestions that helped us pin down the problems.

Special thanks to the opencodex project; much of Aggregation's design benefits from its open-source exploration.

And thanks to everyone who filed an issue or helped reproduce a bug. For the full technical details, see the CHANGELOG.