docs(release): add v4.0.15 release notes

This commit is contained in:
Jason committed 2026-10-17 23:20:46 +08:00
1 parent 8e42cb75d1
commit 79e754ab1b
4 files changed
+222

No files matched your search

+63
View File
@@ -0,0 +1,63 @@
# 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).
+63
View File
@@ -0,0 +1,63 @@
# CC Switch v4.0.15
今回のリリースは修正が中心です。Windows でアップデートのたびに、非表示にしたアプリや設定ディレクトリの上書きなどの設定がデフォルトに戻ってしまう問題を修正しました。Codex を更新するとき、`--version` の応答が遅いだけで正常な Codex がアンインストールされることはなくなりました。macOS のアプリアイコンは白い角丸の四角になり、macOS 26 で灰色の背景タイルに入れられることはなくなりました。ルーティング経由のリクエストで Claude Code のセッションを再び認識できるようになり、Codex OAuth 経由のキャッシュキーと、Claude Desktop が Gemini に接続するときの署名の送り返しが正常に戻りました。Codex の履歴に壊れたツール呼び出しが 1 件あっても毎ターンエラーになることはなくなり、DeepSeek が送り返したツール履歴を拒否することもなくなりました。ほかにも、WebDAV/S3 の低速な転送が 300 秒で打ち切られる問題、Windows で「ターミナルを開く」が `claude` を見つけられない問題、WSL 内の Hermes のセッションを読み込めない問題、ルーティング中の切り替えで毎回再起動を求められる問題などを修正しました。新機能として、使用量の推移グラフを棒グラフと面グラフで切り替えられるようになり、Hermes ではモデルごとに画像入力への対応を宣言できるようになりました。Claude Desktop のフォームでも、Copilot などのマネージドログインのプロバイダーのモデル一覧を取得できます。4.0 の更新内容の全体は [v4.0 リリースノート](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-ja.md) をご覧ください。
---
## 新機能
**使用量の推移グラフを棒グラフと面グラフから選べるようになりました**([#8406](https://github.com/farion1231/cc-switch/issues/8406))。使用量ページの「設定」タブの「表示」セクションにある「トレンドグラフの種類」で、棒グラフ(デフォルト)か面グラフを選べます。どちらの種類でも、指標、軸、ホバー時のツールチップ、通貨の換算は同じです。「表示」セクションの各設定も揃った 2 列に並べ直し、為替レートは通貨の下に独立した行として置きました。
**Hermes でモデルごとに画像入力への対応を宣言できるようになりました**([#8464](https://github.com/farion1231/cc-switch/issues/8464))。Hermes はモデルごとの `supports_vision` で画像を扱えるかどうかを判断し、これが書かれていない未知のモデルはテキスト専用として扱われ、画像はテキストに変換されてしまいます。これまではフォームに設定する場所がなく、手で書いた値も保存すると消えていました。現在はモデルの詳細を展開すると「画像入力に対応」スイッチがあります。オンにすると `supports_vision: true` を書き込み、オフにするとこのキーを削除して Hermes 自身の判断に任せます。モデル一覧から画像に対応していることがわかっているモデルを選ぶと、自動でオンになります。
**Claude Desktop でマネージドログインのプロバイダーのモデル一覧を取得できるようになりました**([#8426](https://github.com/farion1231/cc-switch/issues/8426))。GitHub Copilot、Codex OAuth、xAI OAuth のようなプロバイダーには、これまで Desktop のフォームに「モデル一覧を取得」ボタンがありませんでしたが、現在は表示され、ログインしているアカウントに応じて取得します。まだログインしていない場合は、先にログインを促します。プロバイダーの種類やアカウントを変えると一覧をクリアして取得し直すので、別のアカウントのモデルが混ざることはありません。
## 改善
**ルーティング中にプロバイダーを切り替えたとき、実際に何をしたかをメッセージで伝えるようになりました**([#8347](https://github.com/farion1231/cc-switch/issues/8347))。これまでルーティングモードで切り替えると、Codex、Gemini CLI、Grok Build では必ずクライアントの再起動を求められていました。現在はプロバイダーを記憶しただけなのか、ルーティング先を変えたのか、ルーティングを切り替えたのか、集約のデフォルトプロバイダーを変えたのかを説明し、クライアントの設定ファイルを実際に書き換えた場合にだけ再起動を求めます。
**サイドバーの「今日」に「今日」の接頭辞が付かなくなりました。** 1 つだけ選んでいる場合も 2 つ選んだときと同じく値だけを表示し、詳しい説明はホバー時のツールチップに表示されます。
**Claude Code の使用量のインポートが速くなりました**([#8224](https://github.com/farion1231/cc-switch/issues/8224))。1 回のインポートの中では、一度調べたモデルの料金を使い回し、レコードごとに毎回調べ直すことはなくなりました。料金を変更した場合は、次回のインポートから反映されます。
**トルコ語**:アンインストールとプランの利用枠に関する新しい文言を翻訳しました([#8291](https://github.com/farion1231/cc-switch/pull/8291))。
**プリセット:** EveryAPI、AllTokens を追加しました。
## 修正
- **Windows でアップデートのたびに、非表示にしたアプリや設定ディレクトリの上書きなどの設定がデフォルトに戻っていた問題**([#8429](https://github.com/farion1231/cc-switch/issues/8429))。これまでは `settings.json` を直接上書きしていたため、一部の環境では新しい内容が短くなったときに古い内容の末尾が切り捨てられずに残り、次回起動時にファイル全体の解析に失敗していました。さらに読み込みに失敗すると黙ってデフォルト値を使い、アップデート後に表示される更新内容のダイアログが保存した時点で、そのデフォルト値が書き戻されていました。現在は一時ファイルに書き込んでから置き換えます。読み込み時には BOM を取り除き、末尾に余分なデータがある場合は最初の JSON だけを読み、解析できないフィールドだけを捨てて残りはそのまま保持します。完全に読み込めなかったファイルは先に `settings.json.broken-<time>.bak` としてバックアップし、バックアップが成功するまでは保存しません。
- **Codex を更新するとき、`--version` の応答が遅いだけで正常な Codex がアンインストールされていた問題。** これまでは更新前のチェックで `--version` がタイムアウトしたり起動に失敗したりすると、いったんアンインストールしてから再インストールしており、再インストールに失敗すると Codex が未インストールと表示されていました。現在はこの修復を行うのは `--version` が実際に実行されてエラーを返した場合だけで、それ以外は通常どおりアップグレードします。
- **macOS 26 でアプリアイコンが灰色の背景タイルに入れられ、小さく表示されていた問題**([#8401](https://github.com/farion1231/cc-switch/issues/8401))。macOS のアプリアイコンは白い角丸の四角を含むようになり、macOS 26 と 15 で同じ見た目になりました。Windows と Linux のアイコンは変わりません。
- **ルーティング経由のリクエストで Claude Code のセッションを認識できなかった問題**([#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))。新しい Claude Code はセッション ID を JSON にして `metadata.user_id` に入れていますが、ルーティングはこれを解析できず、同じ会話のリクエストが毎回新しいセッションとして扱われていました。Claude Desktop のリクエストではセッションのヘッダーも読んでいませんでした。その結果、Codex OAuth 経由では安定したキャッシュキーが得られず、Claude Desktop がルーティング経由で Gemini に接続するとツール呼び出しでエラーになっていました。現在は両方の形式を認識し、Claude Desktop でもセッションのヘッダーを読みます。
- **Codex の履歴に引数が壊れたツール呼び出しが 1 件あると、それ以降のターンが毎回 Chat のアップストリームに拒否されていた問題**([#5197](https://github.com/farion1231/cc-switch/issues/5197))。たとえば出力が途中で切れて、引数が完全な JSON になっていない場合です。現在は変換時にこの呼び出しを通常のテキストに書き換え、正常な履歴は 1 バイトも変えません。
- **Codex がルーティング経由で DeepSeek に接続すると、たびたび 400 になっていた問題**([#8331](https://github.com/farion1231/cc-switch/issues/8331))。ツール履歴を送り返すとき、ツール呼び出しとその結果の間にある空のメッセージ、進捗のテキスト、思考の内容が独立したメッセージに分かれてしまい、DeepSeek はこれを受け付けませんでした。現在は DeepSeek のモデルに限って、これらをツール呼び出しのメッセージにまとめ直します。ほかのアップストリームには影響しません。
- **Codex の集約モードで `x-codex-beta-features` リクエストヘッダーが取り除かれていた問題**([#8435](https://github.com/farion1231/cc-switch/issues/8435))。一部のネイティブ Responses のゲートウェイはこのヘッダーを必要とします。現在はネイティブ Responses のアップストリームに送るときはこのヘッダーを残し、ID に関わるリクエストヘッダーは引き続き取り除きます。
- **Claude Desktop のネイティブプロバイダーでモデルマッピングを設定しようとすると、堂々巡りになっていた問題**([#8441](https://github.com/farion1231/cc-switch/issues/8441))。マッピングを保存するには先にルーティングを有効にする必要があり、ルーティングを有効にするにはマッピングが必要でした。現在はモデル一覧を入力していないネイティブプロバイダーでも先にルーティングに入れるので、同じカードでマッピングを保存できます。
- **WebDAV / S3 の同期で、低速な転送が 300 秒で打ち切られていた問題**([#8428](https://github.com/farion1231/cc-switch/issues/8428))。低速なネットワークでは、転送に 300 秒以上かかる大きな Skills のアーカイブが失敗していました。現在は全体のタイムアウトをファイルサイズに応じて延ばし、ダウンロードには別に 120 秒のデータ無受信タイムアウトを設けたので、接続が本当に止まった場合は引き続き速やかにエラーになります。
- **Windows でカードの「ターミナルを開く」を押すと「'claude' は、内部コマンドまたは外部コマンド、操作可能なプログラムまたはバッチ ファイルとして認識されていません」になっていた問題**([#8446](https://github.com/farion1231/cc-switch/issues/8446))。アプリ内アップデートで自動的に再起動した後や、CC Switch を起動した後に CLI をインストールした場合は、プロセスにユーザーレベルの PATH が欠けており、ターミナルがそれを引き継いでいました。現在は開くターミナルにユーザーとシステムの完全な PATH を渡します。
- **Windows で WSL 内の Hermes のセッションを読み込めなかった問題**([#8205](https://github.com/farion1231/cc-switch/issues/8205))。Hermes のデータが WSL 内にある場合は、該当するディストリビューションの中でデータベースを読み取り専用で読むようにしました。ディストリビューションに `python3`(3.7 以降)が必要です。ほかのパスには影響しません。
- **フェイルオーバーの後も、「転送中」の表示が元のプロバイダーに残っていた問題**([#7998](https://github.com/farion1231/cc-switch/issues/7998))。
- **Pi のサブエージェントの使用量が計上されない、または unknown として記録されていた問題**([#8298](https://github.com/farion1231/cc-switch/issues/8298))。現在はサブエージェントごとのセッションファイルからインポートし、実際のモデルとプロバイダーを記録します。このバージョンへのアップグレード後、最初のインポートから集計し、それ以前の分はさかのぼって計算しません。
- **プロバイダーをドラッグして並べ替えるとき、カードが引き伸ばされたり互いに重なったりしていた問題**([#8283](https://github.com/farion1231/cc-switch/issues/8283))。
- **Skills のダウンロードに失敗したとき、本当の原因が「リポジトリまたはブランチが見つかりません。URL を確認してください」に隠れていた問題。** これまでは設定したブランチで失敗すると main、master の順に試し、最後に master の 404 が報告されていました。現在は 404 の場合にだけブランチを切り替え、タイムアウト、アーカイブのサイズ超過、展開の失敗はそれぞれの原因でエラーを報告します。
- **DeepSeek で、ある通貨のウォレットに残高があるのに、別の通貨のウォレットが 0 だと「残高なし」と表示されていた問題**([#8170](https://github.com/farion1231/cc-switch/issues/8170))。現在は残高のあるウォレットが 1 つでもあれば空のウォレットは表示せず、起動のたびにカードの利用枠パネルが自動で開くこともなくなりました。
- **ウィンドウの高さが低いとき、Codex のモデル一覧の思考レベルのポップアップの下半分が切れていた問題**([#8094](https://github.com/farion1231/cc-switch/issues/8094))。現在はポップアップがウィンドウからはみ出さず、収まらない場合は一覧がポップアップ内でスクロールし、「デフォルトレベル」は常に表示されます。
## アップグレードに関する注意
**データベースの構造は変わっていません。** バージョンは 20 のままです。
- Windows で、すでに末尾に余分なデータが付いている `settings.json` は初回起動時に復元され、元のファイルは `settings.json.broken-<time>.bak` として残ります。以前のアップデートですでにリセットされてしまった設定は元に戻せません。
- Pi のサブエージェントの使用量は、アップグレード後の最初のインポートから集計し、それ以前の記録はそのまま残ります。
- Windows で WSL 内の Hermes のセッションを読み込むには、ディストリビューションに `python3`(3.7 以降)がインストールされている必要があります。
---
## 謝辞
[@Foodie05](https://github.com/Foodie05)(Claude Code のセッション認識)、[@MonsterXia](https://github.com/MonsterXia)(Codex の壊れたツール呼び出しの履歴)、[@funkpopo](https://github.com/funkpopo)(DeepSeek のツール履歴、推移グラフの種類、ドラッグでの並べ替え)、[@JfanLiu](https://github.com/JfanLiu)(集約モードの beta リクエストヘッダー)、[@ix-prism](https://github.com/ix-prism)(Claude Desktop のマッピングの堂々巡り)、[@Dante-dan](https://github.com/Dante-dan)(WSL 内の Hermes のセッション)、[@SmileMachine](https://github.com/SmileMachine)(ルーティング中の切り替えメッセージ)、[@Chaoqi31](https://github.com/Chaoqi31)(Pi のサブエージェントの使用量)、[@Carl723000](https://github.com/Carl723000)(使用量インポートの高速化)、[@alkank](https://github.com/alkank)(トルコ語)、[@NestorRay](https://github.com/NestorRay)(パネルの遷移の後片付け)の貢献に感謝します。
問題の報告、再現情報や修正のアイデアの提供に協力してくださった [@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)、[@ximigoo](https://github.com/ximigoo) に感謝します。
技術的な詳細は [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md) をご覧ください。
+63
View File
@@ -0,0 +1,63 @@
# CC Switch v4.0.15
本版本以修复为主:Windows 上更新后隐藏的应用、配置目录覆盖等设置会被重置为默认值的问题已修复;更新 Codex 时,`--version` 响应慢不会再把好好的 Codex 卸掉;macOS 应用图标改为白色圆角方块,macOS 26 不再把它塞进灰色底板。经路由的请求重新认得出 Claude Code 的会话,走 Codex OAuth 时的缓存键和 Claude Desktop 连 Gemini 时的签名回放都恢复正常;Codex 历史里有一条坏掉的工具调用时不再每轮都报错,DeepSeek 也不再拒收回放的工具历史。另外修复了 WebDAV/S3 慢速传输 300 秒被掐断、Windows 上「打开终端」找不到 `claude`、WSL 里的 Hermes 会话读不出、路由切换总是提示重启等问题。新增用量趋势图的柱形图 / 曲线面积图切换、Hermes 按模型声明图片输入,Claude Desktop 表单也能为 Copilot 等托管登录的供应商获取模型列表。4.0 完整的更新内容请见 [v4.0 发布说明](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-zh.md)。
---
## 新增
**用量趋势图可以选柱形图或曲线面积图**([#8406](https://github.com/farion1231/cc-switch/issues/8406))。在用量页「设置」页签的「显示」区,「趋势图样式」可以选柱形图(默认)或曲线面积图,两种样式的指标、坐标轴、悬停提示和币种换算都一样。「显示」区的几项设置也重新排成了对齐的两列,汇率单独一行,放在币种下面。
**Hermes 可以按模型声明支持图片输入**([#8464](https://github.com/farion1231/cc-switch/issues/8464))。Hermes 按每个模型的 `supports_vision` 判断能不能看图,没写的未知模型会被当成纯文本、图片被压成文字;以前表单里没有地方设置,手写的值保存后也会被冲掉。现在展开模型详情后有「支持图片输入」开关:打开写 `supports_vision: true`,关掉则删除这个键,交给 Hermes 自己判断。从模型列表选到已知支持图片的模型时会自动打开。
**Claude Desktop 可以为托管登录的供应商获取模型列表**([#8426](https://github.com/farion1231/cc-switch/issues/8426))。GitHub Copilot、Codex OAuth、xAI OAuth 这类供应商以前在 Desktop 表单里没有「获取模型列表」按钮,现在有了,会按登录的账号拉取;还没登录时先提示登录。换了供应商类型或账号后,列表会清空重拉,不会混进别的账号的模型。
## 改进
**路由下切换供应商,提示写明实际做了什么**([#8347](https://github.com/farion1231/cc-switch/issues/8347))。以前路由模式下切换,Codex、Gemini CLI、Grok Build 总会提示重启客户端。现在提示会说明是记住了供应商、改了路由目标、切换了路由,还是改了聚合默认供应商;只有客户端配置文件确实改了,才提示重启。
**侧栏「今日」不再带「今日」前缀。** 只选一项时也和选两项时一样只显示数值,完整说明在悬停提示里。
**Claude Code 用量导入更快**([#8224](https://github.com/farion1231/cc-switch/issues/8224))。同一次导入里,查过的模型价格会复用,不再每条记录都查一遍;改了价格,下一次导入就会用上。
**土耳其语**:补齐了卸载和套餐额度相关的新文案([#8291](https://github.com/farion1231/cc-switch/pull/8291))。
**预设:** 新增 EveryAPI、AllTokens。
## 修复
- **Windows 上每次更新后,隐藏的应用、配置目录覆盖等设置被重置为默认值**([#8429](https://github.com/farion1231/cc-switch/issues/8429))。以前直接覆盖写 `settings.json`,个别环境下新内容变短时,旧内容的尾巴没被截掉,下次启动整份解析失败;读取失败时又悄悄用了默认值,更新后弹出的更新摘要一保存,就把默认值写了回去。现在先写临时文件再替换;读取时会去掉 BOM,有尾巴时只读第一段 JSON,解析不了的字段单独丢掉、其余照常保留。没有完整读出的文件会先备份成 `settings.json.broken-<时间>.bak`,备份成功之前不会保存。
- **更新 Codex 时,`--version` 响应慢会把好好的 Codex 卸掉。** 以前更新前检测到 `--version` 超时或启动失败,就会先卸载再重装,重装一失败,Codex 就显示成未安装。现在只有 `--version` 真的运行并报错时才这样修复,其余情况照常升级。
- **macOS 26 把应用图标放进灰色底板并缩小**([#8401](https://github.com/farion1231/cc-switch/issues/8401))。macOS 应用图标现在自带白色圆角方块,macOS 26 和 15 显示一致;Windows 和 Linux 图标不变。
- **经路由的请求认不出 Claude Code 的会话**([#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))。新版 Claude Code 把会话 ID 写成 JSON 放在 `metadata.user_id` 里,路由以前解析不了,同一个对话的每个请求都被当成新会话;Claude Desktop 的请求也没有读会话头。结果是走 Codex OAuth 时没有稳定的缓存键,Claude Desktop 经路由连 Gemini 时工具调用报错。现在两种格式都认得,Claude Desktop 也读会话头。
- **Codex 历史里有一条参数坏掉的工具调用时,之后每轮都被 Chat 上游拒收**([#5197](https://github.com/farion1231/cc-switch/issues/5197))。例如输出被截断、参数不是完整的 JSON。现在转换时把这条调用改写成普通文字,正常的历史一个字节都不改。
- **Codex 经路由连 DeepSeek 经常报 400**([#8331](https://github.com/farion1231/cc-switch/issues/8331))。回放工具历史时,工具调用和结果之间夹着的空消息、进度文字或思考内容会被拆成单独的消息,DeepSeek 不接受。现在只对 DeepSeek 模型把它们并回工具调用那条消息,其他上游不受影响。
- **Codex 聚合模式去掉了 `x-codex-beta-features` 请求头**([#8435](https://github.com/farion1231/cc-switch/issues/8435))。部分原生 Responses 网关需要这个头。现在发往原生 Responses 上游时保留它,身份相关的请求头仍然去掉。
- **Claude Desktop 原生供应商配模型映射时卡在死循环**([#8441](https://github.com/farion1231/cc-switch/issues/8441))。保存映射要求先开路由,开路由又要求已有映射。现在没填模型列表的原生供应商可以先进入路由,再在同一张卡上保存映射。
- **WebDAV / S3 同步慢速传输到 300 秒就被掐断**([#8428](https://github.com/farion1231/cc-switch/issues/8428))。慢速网络下,传输超过 300 秒的大 Skills 包会失败。现在总超时随文件大小放宽,下载另设 120 秒无数据超时,连接真卡住时仍会及时报错。
- **Windows 上卡片的「打开终端」报「'claude' 不是内部或外部命令」**([#8446](https://github.com/farion1231/cc-switch/issues/8446))。应用内更新自动重启后,或先打开 CC Switch 再安装 CLI 时,进程里缺少用户级 PATH,终端沿用了它。现在打开的终端会带上完整的用户和系统 PATH。
- **Windows 上读不出 WSL 里 Hermes 的会话**([#8205](https://github.com/farion1231/cc-switch/issues/8205))。Hermes 数据在 WSL 里时,改为在对应的发行版内只读读取数据库;需要发行版里有 `python3`(3.7 及以上)。其他路径不受影响。
- **故障转移后,「路由中」标记还停在原来那家**([#7998](https://github.com/farion1231/cc-switch/issues/7998))。
- **Pi 子代理的用量统计不上,或记成 unknown**([#8298](https://github.com/farion1231/cc-switch/issues/8298))。现在从每个子代理自己的会话文件导入,带上真实的模型和供应商;从升级后第一次导入起统计,之前的不补算。
- **拖动排序供应商时卡片被拉伸、互相遮挡**([#8283](https://github.com/farion1231/cc-switch/issues/8283))。
- **Skills 下载失败时,真正的原因被「仓库或分支不存在,请检查地址」盖掉。** 以前配置的分支失败后会依次试 main、master,最后报的是 master 的 404。现在只有 404 才换分支,超时、压缩包过大、解压失败都按原因报错。
- **DeepSeek 一个币种的钱包还有余额,另一个为 0 时显示「余额已用完」**([#8170](https://github.com/farion1231/cc-switch/issues/8170))。现在只要有钱包还有余额,就不再列出空钱包,卡片也不会每次启动都自动展开额度面板。
- **窗口较矮时,Codex 模型列表的思考等级弹窗下半截被截掉**([#8094](https://github.com/farion1231/cc-switch/issues/8094))。现在弹窗不超出窗口,放不下时列表在弹窗里滚动,「默认等级」一直可见。
## 升级说明
**数据库结构没有变化**,仍然是 20。
- Windows 上已经带尾巴的 `settings.json` 会在首次启动时恢复,原文件保留为 `settings.json.broken-<时间>.bak`;之前更新时已经被重置的设置无法找回。
- Pi 子代理用量从升级后第一次导入开始统计,之前的记录保持原样。
- 在 Windows 上读取 WSL 里的 Hermes 会话,需要发行版里装有 `python3`(3.7 及以上)。
---
## 致谢
感谢 [@Foodie05](https://github.com/Foodie05)(Claude Code 会话识别)、[@MonsterXia](https://github.com/MonsterXia)(Codex 坏工具调用历史)、[@funkpopo](https://github.com/funkpopo)(DeepSeek 工具历史、趋势图样式、拖动排序)、[@JfanLiu](https://github.com/JfanLiu)(聚合模式 beta 请求头)、[@ix-prism](https://github.com/ix-prism)(Claude Desktop 映射循环)、[@Dante-dan](https://github.com/Dante-dan)(WSL 里的 Hermes 会话)、[@SmileMachine](https://github.com/SmileMachine)(路由切换提示)、[@Chaoqi31](https://github.com/Chaoqi31)(Pi 子代理用量)、[@Carl723000](https://github.com/Carl723000)(用量导入提速)、[@alkank](https://github.com/alkank)(土耳其语)、[@NestorRay](https://github.com/NestorRay)(面板过渡清理)的贡献。
感谢 [@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)、[@ximigoo](https://github.com/ximigoo) 报告问题、提供复现信息和修复思路。
完整的技术细节请见 [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md)。
+33
View File
@@ -0,0 +1,33 @@
{
"version": "4.0.15",
"items": [
{
"type": "fix",
"zh": "修复 Windows 更新后设置被重置、更新 Codex 时误卸载",
"zh-TW": "修正 Windows 更新後設定被重設、更新 Codex 時誤解除安裝",
"en": "Fixed settings resetting after updates on Windows, and Codex updates removing a working install",
"ja": "Windows で更新後に設定が初期化される問題と、Codex 更新時の誤アンインストールを修正"
},
{
"type": "fix",
"zh": "路由重新认出 Claude Code 会话,修复 DeepSeek 报 400",
"zh-TW": "路由重新認出 Claude Code 工作階段,修正 DeepSeek 400",
"en": "Routing recognizes Claude Code sessions again; fixed 400 errors from DeepSeek",
"ja": "Claude Code のセッションを再び認識、Codex→DeepSeek の 400 を修正"
},
{
"type": "fix",
"zh": "macOS 26 的应用图标不再显示在灰色底板里",
"zh-TW": "macOS 26 的應用程式圖示不再顯示在灰色底板裡",
"en": "The app icon no longer sits in a grey tile on macOS 26",
"ja": "macOS 26 でアプリアイコンがグレーの背景に入らなくなりました"
},
{
"type": "new",
"zh": "用量趋势图可选柱形图或曲线面积图,Hermes 可声明模型支持图片",
"zh-TW": "使用趨勢圖可選長條圖或曲線面積圖,Hermes 可宣告模型支援圖片",
"en": "Usage trend chart can switch between bar and area; Hermes models can declare image input",
"ja": "利用推移グラフを棒/面グラフで切替、Hermes でモデルの画像入力を宣言可能に"
}
]
}