Files
cc-switch/docs/release-notes/v4.0.15-en.md
T

64 lines
13 KiB
Markdown

# CC Switch v4.0.15
This release is mostly fixes. On Windows, settings such as hidden apps and config directory overrides no longer reset to defaults after an update; when updating Codex, a slow `--version` response no longer uninstalls a working Codex; the macOS app icon now has a white rounded-square background, so macOS 26 no longer puts it in a grey tile. Requests through routing recognize Claude Code's sessions again, which restores the cache key when going through Codex OAuth and signature replay when Claude Desktop connects to Gemini; a single broken tool call in Codex history no longer causes an error on every turn, and DeepSeek no longer rejects replayed tool history. It also fixes slow WebDAV/S3 transfers being cut off at 300 seconds, "Open Terminal" on Windows not finding `claude`, Hermes sessions in WSL not being readable, routed switches always asking for a restart, and other issues. New: a bar / area toggle for the usage trend chart, per-model image input for Hermes, and the Claude Desktop form can now fetch the model list for providers with managed login such as Copilot. For everything new in 4.0, see the [v4.0 release notes](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-en.md).
---
## New
**The usage trend chart can be a bar chart or an area chart** ([#8406](https://github.com/farion1231/cc-switch/issues/8406)). In the "Display" section of the usage page's "Settings" tab, "Trend chart" lets you choose "Bar" (the default) or "Area"; both styles share the same metrics, axes, tooltips and currency conversion. The settings in the "Display" section are also rearranged into two aligned columns, with the exchange rate on its own row below the currency.
**Hermes models can declare image input support** ([#8464](https://github.com/farion1231/cc-switch/issues/8464)). Hermes decides whether a model can see images from each model's `supports_vision`; unknown models without it are treated as text-only and images get flattened into text. Previously the form had nowhere to set it, and a hand-written value was wiped out on save. Now the expanded model details have a "Supports image input" switch: on writes `supports_vision: true`, off removes the key and leaves the decision to Hermes. It turns on automatically when you pick a model from the model list that is known to support images.
**Claude Desktop can fetch the model list for providers with managed login** ([#8426](https://github.com/farion1231/cc-switch/issues/8426)). Providers such as GitHub Copilot, Codex OAuth and xAI OAuth used to have no "Fetch Models" button in the Desktop form; now they do, and it fetches models for the logged-in account; if you aren't logged in yet, it asks you to log in first. When the provider type or account changes, the list is cleared and fetched again, so models from another account never get mixed in.
## Improvements
**Switching providers while routing now tells you what actually happened** ([#8347](https://github.com/farion1231/cc-switch/issues/8347)). Previously, switching in Routing mode always asked Codex, Gemini CLI and Grok Build users to restart the client. The message now says whether the provider was remembered, the route target changed, the route was switched, or the Aggregation default provider changed; it asks for a restart only when the client's config files actually changed.
**The sidebar "Today" line no longer adds a "Today" prefix.** With a single item selected it now shows only the value, as with two items; the full description is in the tooltip.
**Claude Code usage import is faster** ([#8224](https://github.com/farion1231/cc-switch/issues/8224)). Within one import, model prices that have already been looked up are reused instead of being looked up again for every record; if you change a price, the next import picks it up.
**Turkish**: New strings for uninstalling and plan quotas are now translated ([#8291](https://github.com/farion1231/cc-switch/pull/8291)).
**Presets:** Added EveryAPI and AllTokens.
## Fixes
- **On Windows, every update reset settings such as hidden apps and config directory overrides to defaults** ([#8429](https://github.com/farion1231/cc-switch/issues/8429)). `settings.json` used to be overwritten in place; in some environments, when the new content was shorter, the tail of the old content wasn't truncated, and the whole file failed to parse on the next launch. A failed read then silently fell back to defaults, and as soon as the What's New dialog shown after the update saved, those defaults were written back. Saves now write a temporary file first and then replace the original; reads strip a BOM, read only the first JSON value when there is a trailing tail, and drop only the fields that can't be parsed while keeping the rest. A file that wasn't fully read is first backed up as `settings.json.broken-<time>.bak`, and nothing is saved until that backup succeeds.
- **When updating Codex, a slow `--version` response could uninstall a working Codex.** Previously, if the pre-update check found that `--version` timed out or failed to start, Codex was uninstalled and then reinstalled; if the reinstall failed, Codex showed as not installed. This repair now happens only when `--version` actually runs and reports an error; in every other case the normal upgrade runs.
- **macOS 26 put the app icon in a grey tile and shrank it** ([#8401](https://github.com/farion1231/cc-switch/issues/8401)). The macOS app icon now has its own white rounded-square background and looks the same on macOS 26 and 15; Windows and Linux icons are unchanged.
- **Requests through routing didn't recognize Claude Code's sessions** ([#8235](https://github.com/farion1231/cc-switch/issues/8235), [#8234](https://github.com/farion1231/cc-switch/issues/8234), [#8418](https://github.com/farion1231/cc-switch/issues/8418)). Newer Claude Code versions put the session ID as JSON in `metadata.user_id`, which routing couldn't parse, so every request in the same conversation was treated as a new session; Claude Desktop requests also didn't read the session headers. As a result, there was no stable cache key when going through Codex OAuth, and tool calls failed when Claude Desktop connected to Gemini through routing. Both formats are now recognized, and Claude Desktop reads the session headers too.
- **When Codex history contained one tool call with broken arguments, Chat upstreams rejected every turn after it** ([#5197](https://github.com/farion1231/cc-switch/issues/5197)). For example, when the output was truncated and the arguments aren't complete JSON. The conversion now rewrites that call as plain text; well-formed history stays byte-for-byte unchanged.
- **Codex connecting to DeepSeek through routing often failed with a 400** ([#8331](https://github.com/farion1231/cc-switch/issues/8331)). When tool history was replayed, empty messages, progress text or reasoning between a tool call and its results were split into separate messages, which DeepSeek doesn't accept. For DeepSeek models only, they are now merged back into the tool-call message; other upstreams are not affected.
- **Codex Aggregation mode removed the `x-codex-beta-features` request header** ([#8435](https://github.com/farion1231/cc-switch/issues/8435)). Some native Responses gateways need this header. It is now kept for native Responses upstreams; identity-related headers are still removed.
- **Setting up a model mapping for a native Claude Desktop provider was stuck in a loop** ([#8441](https://github.com/farion1231/cc-switch/issues/8441)). Saving the mapping required routing to be on, and turning on routing required a mapping. A native provider without a model list can now enter routing first and then save the mapping on the same card.
- **Slow WebDAV / S3 sync transfers were cut off at 300 seconds** ([#8428](https://github.com/farion1231/cc-switch/issues/8428)). On slow networks, large Skills packages whose transfer took longer than 300 seconds failed. The overall timeout now grows with the file size, and downloads get a separate 120-second no-data timeout, so a connection that is really stuck still fails promptly.
- **On Windows, "Open Terminal" on a card reported "'claude' is not recognized as an internal or external command"** ([#8446](https://github.com/farion1231/cc-switch/issues/8446)). After the automatic restart following an in-app update, or when CC Switch was opened before the CLI was installed, its process was missing the user-level PATH, and the terminal inherited it. Terminals it opens now get the full user and system PATH.
- **On Windows, Hermes sessions in WSL couldn't be read** ([#8205](https://github.com/farion1231/cc-switch/issues/8205)). When Hermes data lives in WSL, the database is now read read-only inside the corresponding distribution; this needs `python3` (3.7 or later) in the distribution. Other paths are not affected.
- **After a failover, the "Routing" marker stayed on the previous provider** ([#7998](https://github.com/farion1231/cc-switch/issues/7998)).
- **Pi sub-agent usage wasn't counted, or was recorded as unknown** ([#8298](https://github.com/farion1231/cc-switch/issues/8298)). It is now imported from each sub-agent's own session file, with the real model and provider; counting starts from the first import after upgrading, and earlier usage is not backfilled.
- **Provider cards stretched and overlapped each other while being dragged to reorder** ([#8283](https://github.com/farion1231/cc-switch/issues/8283)).
- **When a Skills download failed, the real cause was hidden behind "Repository or branch not found, please check URL".** Previously, after the configured branch failed, main and master were tried in turn, and the error reported was master's 404. Now the branch is switched only on a 404; timeouts, oversized archives and extraction failures are reported as what they are.
- **"Balance used up" was shown when one DeepSeek currency wallet still had funds and another was at 0** ([#8170](https://github.com/farion1231/cc-switch/issues/8170)). Now, as long as any wallet still has funds, empty wallets are no longer listed, and the card no longer expands the quota panel on every launch.
- **In short windows, the bottom of the thinking level popover in the Codex model list was cut off** ([#8094](https://github.com/farion1231/cc-switch/issues/8094)). The popover now stays inside the window; when it doesn't fit, the list scrolls inside the popover, and "Default level" stays visible.
## Upgrade Notes
**The database schema is unchanged**, still at 20.
- On Windows, a `settings.json` that already has a trailing tail is recovered on first launch, and the original file is kept as `settings.json.broken-<time>.bak`; settings already reset by earlier updates can't be recovered.
- Pi sub-agent usage is counted from the first import after upgrading; earlier records stay as they were.
- Reading WSL Hermes sessions on Windows requires `python3` (3.7 or later) installed in the distribution.
---
## Thanks
Thanks to [@Foodie05](https://github.com/Foodie05) (Claude Code session recognition), [@MonsterXia](https://github.com/MonsterXia) (broken tool calls in Codex history), [@funkpopo](https://github.com/funkpopo) (DeepSeek tool history, trend chart style, drag sorting), [@JfanLiu](https://github.com/JfanLiu) (the beta request header in Aggregation mode), [@ix-prism](https://github.com/ix-prism) (the Claude Desktop mapping loop), [@Dante-dan](https://github.com/Dante-dan) (Hermes sessions in WSL), [@SmileMachine](https://github.com/SmileMachine) (routed switch messages), [@Chaoqi31](https://github.com/Chaoqi31) (Pi sub-agent usage), [@Carl723000](https://github.com/Carl723000) (faster usage import), [@alkank](https://github.com/alkank) (Turkish) and [@NestorRay](https://github.com/NestorRay) (panel transition cleanup) for their contributions.
Thanks to [@wangding0610](https://github.com/wangding0610), [@DiYi1999](https://github.com/DiYi1999), [@CaiSre](https://github.com/CaiSre), [@vincerise](https://github.com/vincerise), [@qiangyidian](https://github.com/qiangyidian), [@zhouys0725](https://github.com/zhouys0725), [@qianlongwuyong-zxl](https://github.com/qianlongwuyong-zxl), [@ElijahHong](https://github.com/ElijahHong), [@wx2cyj](https://github.com/wx2cyj), [@rvwmng9rvk-crypto](https://github.com/rvwmng9rvk-crypto), [@luckday888](https://github.com/luckday888), [@ramonmi](https://github.com/ramonmi), [@quntaoli](https://github.com/quntaoli), [@LwTen2019](https://github.com/LwTen2019), [@CYRickyArAr](https://github.com/CYRickyArAr), [@edwardchenchen](https://github.com/edwardchenchen) and [@ximigoo](https://github.com/ximigoo) for reporting issues, providing reproduction details and suggesting fixes.
For the full technical details, see the [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md).