docs(release): add v4.0.13 release notes

This commit is contained in:
Jason committed 2026-10-15 22:12:24 +08:00
1 parent 894cce82cc
commit 4ec75e7135
4 files changed
+222

No files matched your search

+63
View File
@@ -0,0 +1,63 @@
# CC Switch v4.0.13
This release lets Claude Desktop, like Claude Code and Codex, choose among three modes at the top of the page: Direct, Routing and Aggregation. In Routing mode the model list follows the routed provider, and in Aggregation mode models from several providers can sit in Desktop's model list at the same time. Codex adds an "Auto Review model" setting, so third-party providers with automatic approval (Approve for me) turned on no longer fail with a 404 by requesting a model most relays don't have; in Aggregation mode you can also choose a separate model and reasoning effort for sub-agents. Switching back to Direct now asks for confirmation first, stating which provider the client will connect to and which file will change. Context windows for GPT-series models are now capped at 272K, so a window set too large no longer keeps the client from compacting until the upstream finally rejects the request. The update button in the Windows portable build now downloads the matching zip directly. It also fixes Codex reporting "duplicate key" when saving its config, Codex remote compaction not working in Routing mode, mode switching hanging for several minutes with many fnm versions installed, and the window freezing on Windows 11, among other issues. 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
**Claude Desktop: choose Direct, Routing or Aggregation.** Previously each Claude Desktop card decided on its own whether to connect directly or go through model mapping, and starting the mapping service was a separate switch. Desktop now uses the same mode panel as Claude Code, Codex, Gemini CLI and Grok Build, chosen at the top of the page:
- **Direct**: writes the provider's address and key straight into Desktop's config, and requests don't go through CC Switch. Cards that need model mapping can't connect directly; you'll be prompted to "Start routing" first.
- **Routing**: Desktop's requests are forwarded by CC Switch on your machine to the routed provider, and the model list is replaced with the models in that provider's mapping table. After that, when you switch the routed provider, Desktop's config file is rewritten only if the model list changes.
- **Aggregation**: the default provider's models come first, and models from the other providers in the aggregation appear alongside them in Desktop's model list, named "provider / model"; whichever one you pick, the request goes to that provider, up to 200 models in total.
Desktop only reads its config at startup, so every time you change the mode, the routed provider or the aggregation members, you need to restart Desktop for it to take effect, and the interface reminds you each time. Desktop's routing has no failover; when you quit CC Switch, Desktop's config stays as it is, so to keep using Routing or Aggregation, CC Switch needs to keep running. If you used a model mapping card before, you are moved into Routing mode automatically after upgrading; see the upgrade notes at the end.
**Codex: automatic approval can use a different model.** With automatic approval (Approve for me) on, Codex hands every sandbox escalation to an approval model to decide whether it may go ahead, and sends it to the same provider as the main conversation. Third-party cards used to have no way to choose this model: without a model list, Codex requested the official `codex-auto-review` from the provider, which most relays don't recognize, so it failed with a 404; with a model list, the main model did the approving itself ([#8015](https://github.com/farion1231/cc-switch/issues/8015), [#5903](https://github.com/farion1231/cc-switch/issues/5903), [#3855](https://github.com/farion1231/cc-switch/issues/3855)).
- Direct and Routing: Codex cards gain an "Auto Review model" setting, where you can pick one from the card's model list. Official cards don't show it; when a card has no model list, it can't be selected and the reason is explained.
- Aggregation: choose it in "Aggregation settings" on the Aggregation tab, where you can pick another provider's aggregated model so approvals go to a different provider.
- Restart Codex after changing it.
**Codex Aggregation mode: sub-agents can use their own model.** Aggregation mode used to strip the sub-agent model from `[agents]`, so sub-agents could only follow the main model ([#8286](https://github.com/farion1231/cc-switch/issues/8286)). Now both the "Use Aggregation for Codex?" confirmation dialog and the new "Aggregation settings" let you choose the "Sub-agent model" and "Sub-agent reasoning effort". No Codex restart is needed; it takes effect in new conversations. If the chosen model is no longer in the aggregation (the member was removed, or that provider became the default), sub-agents temporarily follow the main model and switch back automatically once it is added again.
**Windows portable build: the update button downloads the zip directly.** The portable build already checked for updates at startup, but clicking "Update to vX" only opened the release page, leaving you to find the right zip among dozens of files ([#8300](https://github.com/farion1231/cc-switch/issues/8300)). It now directly downloads the portable zip matching your architecture (x64 / ARM64); extract it and replace your existing `cc-switch.exe`. Settings and data live in `.cc-switch` under your user folder and are not lost when you replace the file. To avoid being blocked by antivirus software, CC Switch does not replace its own program files itself.
## Improvements
**Confirmation before switching back to Direct.** Entering Routing or Aggregation already had a confirmation dialog, but switching back to Direct took effect the moment you clicked, with only an easy-to-miss "Undo" in the notice. Now the "Back to direct" button, "Back to direct and use" on cards, and the notice shown when the routing service stops all open a confirmation dialog first, stating which provider the client will connect to directly and in which file the address and key will be changed back; when leaving Routing it explains that the routing target, failover queue and settings are kept, and when leaving Aggregation it explains which models will disappear from `/model`. Errors are shown right in the dialog, and "Undo" is gone.
**Codex: "Classic sub-agent tools in aggregation" is on by default.** When the main agent and a sub-agent are on different providers, Codex's new sub-agent tools encrypt the task so that only the main agent's provider can read it, and the sub-agent never receives it ([#8253](https://github.com/farion1231/cc-switch/issues/8253)). This switch moves from the Settings page into "Aggregation settings" and is now on by default.
**GPT model context windows are capped at 272K.** models.dev lists the GPT-5.6 and GPT-6 series with the OpenAI API's 1.05M window, but many relays forward through ChatGPT subscriptions, which are limited to 272K, and CC Switch can't tell from the address which kind it is. With the window set too large, the client never compacts until the upstream rejects the request and that turn fails outright; set too small, it merely compacts a little earlier. GPT windows auto-filled when adding a provider are now never larger than 272K, and the GPT windows in the Hermes, OpenClaw, OpenCode, Pi and Codex presets are lowered as well; the Claude Code "Codex" preset that uses a ChatGPT subscription goes from 372K to 272K. Windows smaller than 272K are unchanged.
## Fixes
- **Codex reported "duplicate key custom in table model_providers" when saving its config** ([#8271](https://github.com/farion1231/cc-switch/issues/8271)). When the provider table header in `config.toml` was quoted (`[model_providers."custom"]`), it wasn't recognized, and saving added another table with the same name. Double-quoted, single-quoted and spaced forms are now all recognized.
- **Codex remote compaction stopped working in Routing or Aggregation mode** ([#8338](https://github.com/farion1231/cc-switch/issues/8338)). After entering Routing or Aggregation, saving the current provider or restarting CC Switch, the remote compaction setting the provider had turned on was lost, Codex fell back to local summary compaction, and sessions with search history could report `response protection is unavailable`. The routed provider's compaction setting is now kept.
- **When routing to an OpenAI Chat upstream with conversion, an error could still arrive after the reply had finished** ([#8281](https://github.com/farion1231/cc-switch/pull/8281)). If the upstream closed the connection after sending `[DONE]`, CC Switch would add an error after the normal end, or keep forwarding whatever came afterwards. It now ends as soon as `[DONE]` arrives.
- **OpenCode session duration was always 0 and the speed column was empty** ([#6326](https://github.com/farion1231/cc-switch/issues/6326)). Duration is now calculated from each message's start and completion times, so an estimated speed can be shown.
- **Usage from later pages of Codex branched conversations was never recorded** ([#8161](https://github.com/farion1231/cc-switch/issues/8161)). The continuation files written when a branched conversation moves to a new page were treated as newly spawned sub-sessions, waiting forever for the parent session to reach that point. They are now recognized as the branched conversation's own continuation.
- **Mode switching hung for several minutes with many Node versions installed through fnm** ([#8313](https://github.com/farion1231/cc-switch/issues/8313)). Deduplication while looking up command-line tools grew with the square of the number of paths, so it became very slow once fnm's multishell directory filled up; it now takes only tens of milliseconds even with many paths.
- **On Windows 11 the window froze, with the main thread stuck at high usage** ([#8321](https://github.com/farion1231/cc-switch/issues/8321), [#8324](https://github.com/farion1231/cc-switch/issues/8324)). The problem came from WebView2's handling of native drag regions. Windows no longer uses native drag regions; dragging and double-clicking to maximize are handled by the app itself, and the title bar works the same as before.
- **When changing the default provider in Codex Aggregation mode, the preview counted the old default provider as 0 models.** The default provider doesn't publish aggregated models itself, but once it is replaced as the default, all of its models join the aggregation; the preview now shows the count after the change.
## Upgrade Notes
**The database schema is unchanged**, still at 20.
- If Claude Desktop is currently using a model mapping card, the first launch automatically switches it to Routing mode, routed to that card, and the Direct side is set to the official provider. Restart Claude Desktop for it to take effect.
- Codex's "Classic sub-agent tools in aggregation" is now on by default, and a previous off setting is not kept; if you need it off, turn it off again in "Aggregation settings".
- The GPT window cap only affects newly added providers and newly auto-filled model parameters; cards you have already added keep their original window.
- Restart Codex after changing the Auto Review model.
---
## Thanks
Thanks to [@HEOJUNFO](https://github.com/HEOJUNFO) (quoted provider table headers in Codex), [@zqtqzy](https://github.com/zqtqzy) (Codex remote compaction in Routing mode), [@xue-ding-e](https://github.com/xue-ding-e) (ending Chat streams at `[DONE]`), [@zhengkaics](https://github.com/zhengkaics) and [@SailingLoong](https://github.com/SailingLoong) (OpenCode session duration), [@Lingbou](https://github.com/Lingbou) (usage from paged Codex branched conversations), [@hulkbig](https://github.com/hulkbig) (fnm path deduplication) and [@funkpopo](https://github.com/funkpopo) (Windows window freeze) for their contributions.
Thanks to [@zhangchuanqiang-cloud](https://github.com/zhangchuanqiang-cloud), [@SRQuan](https://github.com/SRQuan), [@vvvss7992](https://github.com/vvvss7992), [@obsidian0215](https://github.com/obsidian0215), [@wangding0610](https://github.com/wangding0610), [@XinwangTao](https://github.com/XinwangTao), [@RRRRSH](https://github.com/RRRRSH), [@YwaQ96](https://github.com/YwaQ96), [@Tison6](https://github.com/Tison6), [@haveqqq](https://github.com/haveqqq), [@cc10143](https://github.com/cc10143) and [@KDB-Wind](https://github.com/KDB-Wind) 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.13
今回のリリースでは、Claude Desktop でも Claude Code や Codex と同じように、ページ上部で直接接続、ルーティング、集約の 3 つのモードを選べるようになりました。ルーティングモードではモデル一覧がルーティング先に合わせて変わり、集約モードでは複数のプロバイダーのモデルを同時に Desktop のモデル一覧に入れられます。Codex には「自動承認モデル」を追加しました。自動承認(Approve for me)をオンにしたサードパーティのプロバイダーで、ほとんどの中継にはないモデルをリクエストして 404 になることはなくなりました。集約モードでは、サブエージェントが使うモデルと推論強度を個別に指定することもできます。直接接続に戻す前には確認ダイアログを表示し、どのプロバイダーに接続するか、どのファイルを変更するかを明記するようになりました。GPT 系モデルのコンテキストウィンドウは一律 272K を上限とし、ウィンドウを大きく書きすぎたせいでなかなか圧縮されず、最後にアップストリームに拒否されることはなくなりました。Windows ポータブル版の更新ボタンは、対応するアーカイブを直接ダウンロードするようになりました。ほかにも、Codex の設定を保存するときに「duplicate key」と表示される問題、ルーティングモードで Codex のリモート圧縮が効かなくなる問題、fnm で多くのバージョンをインストールしているとモードの切り替えが数分間止まる問題、Windows 11 でウィンドウがフリーズする問題などを修正しました。4.0 の更新内容の全体は [v4.0 リリースノート](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-ja.md) をご覧ください。
---
## 新機能
**Claude Desktop:直接接続、ルーティング、集約から選べるようになりました。** これまで Claude Desktop では、直接接続にするかモデルマッピングを使うかをカードごとに決めており、マッピングのサービスを起動するかどうかも別のスイッチでした。現在は Claude Code、Codex、Gemini CLI、Grok Build と同じモードパネルを使い、ページ上部で選びます:
- **直接接続**:プロバイダーのアドレスと Key を Desktop の設定に直接書き込み、リクエストは CC Switch を経由しません。モデルマッピングが必要なカードは直接接続できず、先に「ルーティングを開始」するよう案内します。
- **ルーティング**:Desktop のリクエストはこのマシンの CC Switch を経由してルーティング先に転送され、モデル一覧はルーティング先のマッピング表にあるモデルに置き換わります。その後ルーティング先を切り替えたときは、モデル一覧が変わる場合にだけ Desktop の設定ファイルを書き換えます。
- **集約**:デフォルトのプロバイダーのモデルが先頭に並び、集約に加えたほかのプロバイダーのモデルが「プロバイダー / モデル」という名前で一緒に Desktop のモデル一覧に表示されます。選んだモデルはそのプロバイダーに送られ、最大 200 個までです。
Desktop は起動時にしか設定を読み込まないため、モードやルーティング先を変えたり、集約のメンバーを増減したりした後は、そのたびに Desktop を再起動しないと反映されません。画面でそれぞれ案内します。Desktop のルーティングにはフェイルオーバーはありません。CC Switch を終了しても Desktop の設定はそのまま残るので、ルーティングや集約を使い続けるには CC Switch を起動したままにしておく必要があります。これまでモデルマッピングのカードを使っていた場合は、アップグレード後に自動でルーティングモードになります。詳しくは末尾のアップグレードに関する注意をご覧ください。
**Codex:自動承認に別のモデルを使えるようになりました。** Codex で自動承認(Approve for me)をオンにすると、サンドボックスの権限昇格のたびに承認モデルが許可するかどうかを判断し、そのリクエストはメインの会話と同じプロバイダーに送られます。サードパーティのカードではこれまでこのモデルを選べませんでした。モデル一覧がないと、Codex はプロバイダーに公式の `codex-auto-review` をリクエストしますが、ほとんどの中継はこれを受け付けず、そのまま 404 になります。モデル一覧がある場合はメインモデル自身が承認していました([#8015](https://github.com/farion1231/cc-switch/issues/8015)、[#5903](https://github.com/farion1231/cc-switch/issues/5903)、[#3855](https://github.com/farion1231/cc-switch/issues/3855))。
- 直接接続とルーティング:Codex のカードに「自動承認モデル」を追加し、そのカードのモデル一覧から 1 つ選べるようにしました。公式のカードにはこの項目は表示されません。カードにモデル一覧がない場合は選択できず、その理由を表示します。
- 集約:集約タブの「集約設定」で選びます。集約内のほかのプロバイダーのモデルも選べるので、承認を別のプロバイダーに送れます。
- 変更後は Codex を再起動する必要があります。
**Codex の集約モード:サブエージェントに別のモデルを使えるようになりました。** これまで集約モードでは `[agents]` のサブエージェントのモデルを取り除いていたため、サブエージェントはメインモデルに従うしかありませんでした([#8286](https://github.com/farion1231/cc-switch/issues/8286))。現在は「Codex で集約を使いますか?」の確認ダイアログと、新しい「集約設定」のどちらでも「サブエージェントのモデル」と「サブエージェントの推論強度」を選べます。Codex を再起動しなくても、新しく開いた会話から反映されます。選んだモデルが集約に含まれなくなった場合(メンバーが削除された、またはそのプロバイダーがデフォルトになった場合)、サブエージェントは一時的にメインモデルに従い、再び追加すると自動で戻ります。
**Windows ポータブル版:更新ボタンでアーカイブを直接ダウンロードします。** ポータブル版はもともと起動時に更新を確認していましたが、「vX に更新」を押してもリリースページが開くだけで、数十個のファイルの中から対応するアーカイブを自分で探す必要がありました([#8300](https://github.com/farion1231/cc-switch/issues/8300))。現在は、使っているアーキテクチャ(x64 / ARM64)に対応するポータブル版のアーカイブを直接ダウンロードします。展開して元の `cc-switch.exe` を上書きするだけで済みます。設定とデータはユーザーディレクトリの `.cc-switch` に保存されているので、上書きしても失われません。ウイルス対策ソフトにブロックされるのを避けるため、CC Switch が自分で自分のプログラムファイルを置き換えることはしません。
## 改善
**直接接続に戻す前に確認するようになりました。** ルーティングや集約に入るときはもともと確認ダイアログがありましたが、直接接続に戻すときはクリックするとすぐに反映され、見落としやすい「元に戻す」が通知に出るだけでした。現在は「直接接続に戻す」ボタン、カードの「直接接続に戻して使う」、ルーティングのサービスが停止したときの通知のいずれからも、まず確認ダイアログを表示し、クライアントがどのプロバイダーに直接接続するか、どのファイルのアドレスとキーが元に戻されるかを明記します。ルーティングから戻すときはルーティング先、フェイルオーバーのキューと設定がすべて保持されることを、集約から戻すときはどのモデルが `/model` から消えるかを説明します。エラーは確認ダイアログの中に直接表示し、「元に戻す」はなくしました。
**Codex:「集約モードでサブエージェントにクラシックツールを使う」がデフォルトでオンになりました。** メインエージェントとサブエージェントが別のプロバイダーにあると、Codex の新しいサブエージェントツールはタスクを暗号化し、メインエージェント側のプロバイダーしか復号できないため、サブエージェントにタスクが届きません([#8253](https://github.com/farion1231/cc-switch/issues/8253))。このスイッチを設定ページから「集約設定」に移し、デフォルトでオンにしました。
**GPT モデルのコンテキストウィンドウの上限を 272K にしました。** models.dev では GPT-5.6、GPT-6 系列のウィンドウは OpenAI API の 105 万と書かれていますが、多くの中継は ChatGPT のサブスクリプションを使って転送しており、サブスクリプションの上限は 272K です。CC Switch はアドレスからどちらなのかを見分けられません。ウィンドウを大きく書きすぎると、クライアントはアップストリームがリクエストを拒否するまでずっと圧縮せず、そのターンはそのまま失敗します。小さく書いた場合は少し早めに圧縮されるだけです。現在は、プロバイダーを追加するときに自動補完する GPT のウィンドウは一律 272K を超えず、Hermes、OpenClaw、OpenCode、Pi、Codex のプリセットにある GPT のウィンドウもあわせて引き下げました。Claude Code で ChatGPT のサブスクリプションを使う「Codex」プリセットは 372K から 272K に変更しました。272K より小さいウィンドウは変わりません。
## 修正
- **Codex の設定を保存するときに「duplicate key custom in table model_providers」と表示されていた問題**([#8271](https://github.com/farion1231/cc-switch/issues/8271))。`config.toml` のプロバイダーのテーブルヘッダーに引用符が付いている(`[model_providers."custom"]`)と認識できず、保存時に同じ名前のテーブルをもう 1 つ追加していました。現在は二重引用符、単一引用符、空白を含む書き方のいずれも認識できます。
- **ルーティングまたは集約モードで、Codex のリモート圧縮が効かなくなっていた問題**([#8338](https://github.com/farion1231/cc-switch/issues/8338))。ルーティングや集約に入ったとき、現在のプロバイダーを保存したとき、または CC Switch を再起動した後に、プロバイダーで有効にしていたリモート圧縮の設定が失われ、Codex がローカルの要約による圧縮を使うようになり、検索履歴を含むセッションで `response protection is unavailable` が出ることがありました。現在はルーティング先の圧縮設定を保持します。
- **ルーティングで OpenAI Chat のアップストリームに変換しているとき、応答の終了後にさらにエラーを受け取ることがあった問題**([#8281](https://github.com/farion1231/cc-switch/pull/8281))。アップストリームが `[DONE]` を送り終えてから接続を切ると、CC Switch は正常に終了した後にさらにエラーを送るか、その後の内容を転送し続けていました。現在は `[DONE]` を受け取った時点で終了します。
- **OpenCode のセッションの所要時間が常に 0 で、速度の列が空だった問題**([#6326](https://github.com/farion1231/cc-switch/issues/6326))。現在は各メッセージの開始時刻と完了時刻から所要時間を計算し、推定速度を表示できます。
- **Codex の分岐した会話で、ページ送り後の使用量がいつまでも計上されなかった問題**([#8161](https://github.com/farion1231/cc-switch/issues/8161))。分岐した会話のページ送りで生成される続きのファイルが、新しく派生したサブセッションとして扱われ、親セッションがその時点まで書き込むのをずっと待っていました。現在はそれが分岐した会話自身の続きであることを認識します。
- **fnm で多くの Node バージョンをインストールしていると、モードの切り替えが数分間止まっていた問題**([#8313](https://github.com/farion1231/cc-switch/issues/8313))。コマンドラインツールを探すときの重複除去の処理がパス数の 2 乗に比例して重くなり、fnm の multishell ディレクトリが増えるととても遅くなっていました。現在はパスが多くても数十ミリ秒で済みます。
- **Windows 11 でウィンドウがフリーズし、メインスレッドが高負荷のままになっていた問題**([#8321](https://github.com/farion1231/cc-switch/issues/8321)、[#8324](https://github.com/farion1231/cc-switch/issues/8324))。原因は WebView2 がネイティブのドラッグ領域を処理するところにありました。Windows ではネイティブのドラッグ領域を使わないようにし、ドラッグとダブルクリックでの最大化はアプリ自身の処理に切り替えました。タイトルバーの使い方は変わりません。
- **Codex の集約モードでデフォルトのプロバイダーを変更するとき、プレビューで元のデフォルトのプロバイダーのモデルが 0 個と数えられていた問題**。デフォルトのプロバイダー自体は集約モデルを公開しませんが、デフォルトから外れるとそのモデルはすべて集約に加わります。現在のプレビューでは、外れた後の数を表示します。
## アップグレードに関する注意
**データベースの構造は変わっていません。** バージョンは 20 のままです。
- 現在モデルマッピングのカードを使っている Claude Desktop は、初回起動時に自動でルーティングモードに切り替わってそのカードにルーティングし、直接接続側のプロバイダーは公式に変わります。Claude Desktop を再起動すると反映されます。
- Codex の「集約モードでサブエージェントにクラシックツールを使う」はデフォルトでオンになり、以前オフにしていた設定は引き継がれません。オフにしたい場合は「集約設定」でもう一度オフにしてください。
- GPT のウィンドウの上限は、新しく追加するプロバイダーと新しく補完するモデルのパラメーターにだけ影響します。追加済みのカードは元のウィンドウのままです。
- 自動承認モデルを変更した後は Codex を再起動してください。
---
## 謝辞
[@HEOJUNFO](https://github.com/HEOJUNFO)(Codex の引用符付きのプロバイダーのテーブルヘッダー)、[@zqtqzy](https://github.com/zqtqzy)(ルーティングモードでの Codex のリモート圧縮)、[@xue-ding-e](https://github.com/xue-ding-e)(Chat ストリームを `[DONE]` で終了)、[@zhengkaics](https://github.com/zhengkaics) と [@SailingLoong](https://github.com/SailingLoong)(OpenCode のセッションの所要時間)、[@Lingbou](https://github.com/Lingbou)(Codex の分岐した会話のページ送りの使用量)、[@hulkbig](https://github.com/hulkbig)(fnm のパスの重複除去)、[@funkpopo](https://github.com/funkpopo)(Windows のウィンドウのフリーズ)の貢献に感謝します。
問題の報告、再現情報や修正のアイデアの提供に協力してくださった [@zhangchuanqiang-cloud](https://github.com/zhangchuanqiang-cloud)、[@SRQuan](https://github.com/SRQuan)、[@vvvss7992](https://github.com/vvvss7992)、[@obsidian0215](https://github.com/obsidian0215)、[@wangding0610](https://github.com/wangding0610)、[@XinwangTao](https://github.com/XinwangTao)、[@RRRRSH](https://github.com/RRRRSH)、[@YwaQ96](https://github.com/YwaQ96)、[@Tison6](https://github.com/Tison6)、[@haveqqq](https://github.com/haveqqq)、[@cc10143](https://github.com/cc10143)、[@KDB-Wind](https://github.com/KDB-Wind) に感謝します。
技術的な詳細は [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md) をご覧ください。
+63
View File
@@ -0,0 +1,63 @@
# CC Switch v4.0.13
本版本让 Claude Desktop 和 Claude Code、Codex 一样,可以在页面顶部选择直连、路由、聚合三种模式:路由模式下模型列表跟着路由那家走,聚合模式下可以把多家供应商的模型同时放进 Desktop 的模型列表。Codex 新增「自动审批模型」,开了自动审批(Approve for me)的第三方供应商不再请求一个大多数中转都没有的模型而报 404;聚合模式下还可以单独指定子代理用哪个模型和推理强度。切回直连前改为先弹确认框,写明会连到哪家、改哪个文件。GPT 系列模型的上下文窗口统一封顶 272K,不再因为窗口写大了而迟迟不压缩、最后被上游拒绝。Windows 便携版的更新按钮现在直接下载对应的压缩包。还修复了 Codex 保存配置时报「duplicate key」、路由模式下 Codex 远程压缩失效、装了很多 fnm 版本时切换模式卡住几分钟、Windows 11 上窗口卡死等问题。4.0 完整的更新内容请见 [v4.0 发布说明](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-zh.md)。
---
## 新增
**Claude Desktop:直连、路由、聚合三选一。** 以前 Claude Desktop 由每张卡片自己决定是直连还是走模型映射,要不要启动映射服务也是单独的开关。现在它和 Claude Code、Codex、Gemini CLI、Grok Build 用同一套模式面板,在页面顶部选择:
- **直连**:把供应商的地址和 Key 直接写进 Desktop 的配置,请求不经过 CC Switch。需要模型映射的卡片不能直连,会提示先开始路由。
- **路由**:Desktop 的请求经本机 CC Switch 转发给路由那家,模型列表换成路由那家映射表里的模型。之后切换路由那家时,只有模型列表变了才会改写 Desktop 的配置文件。
- **聚合**:默认那家的模型排在前面,其他加入聚合的供应商的模型以「供应商 / 模型」的名字一起出现在 Desktop 的模型列表里,选哪个就发给哪家,最多 200 个。
Desktop 只在启动时读配置,所以每次换模式、换路由那家或增减聚合成员之后,都要重启 Desktop 才生效,界面会逐一提示。Desktop 的路由没有故障转移;退出 CC Switch 时 Desktop 的配置保持不变,要继续用路由或聚合,CC Switch 需要保持运行。以前用模型映射卡的,升级后会自动进入路由模式,见文末升级说明。
**Codex:自动审批可以换一个模型。** Codex 开了自动审批(Approve for me)后,每次沙箱提权都会交给一个审批模型判断能不能放行,而且发给主对话的同一家。第三方卡片以前没法选这个模型:没有模型列表时,Codex 会向供应商请求官方的 `codex-auto-review`,大多数中转都不认,直接报 404;有模型列表时则由主模型自己审批([#8015](https://github.com/farion1231/cc-switch/issues/8015)、[#5903](https://github.com/farion1231/cc-switch/issues/5903)、[#3855](https://github.com/farion1231/cc-switch/issues/3855))。
- 直连和路由:Codex 卡片新增「自动审批模型」,可以从这张卡的模型列表里选一个。官方卡片不显示这一项;卡片没有模型列表时这一项不可选,并说明原因。
- 聚合:在聚合页签的「聚合设置」里选,可以选聚合里别家的模型,让审批发给另一家供应商。
- 改完需要重启 Codex。
**Codex 聚合模式:子代理可以用单独的模型。** 聚合模式以前会去掉 `[agents]` 里的子代理模型,子代理只能跟随主模型([#8286](https://github.com/farion1231/cc-switch/issues/8286))。现在「让 Codex 使用聚合模式?」确认框和新的「聚合设置」里都可以选子代理模型和子代理推理强度。不用重启 Codex,新开的对话就会生效。选的模型如果已经不在聚合里(成员被移除,或者那家成了默认),子代理会暂时跟随主模型,加回来后自动恢复。
**Windows 便携版:更新按钮直接下载压缩包。** 便携版启动时本来就会检查更新,但点「更新到 vX」只是打开发布页,要在几十个文件里自己找对应的压缩包([#8300](https://github.com/farion1231/cc-switch/issues/8300))。现在会直接下载与当前架构(x64 / ARM64)对应的便携版压缩包,解压后覆盖原来的 `cc-switch.exe` 即可;配置和数据保存在用户目录下的 `.cc-switch`,不会因覆盖而丢失。为了避免被杀毒软件拦截,CC Switch 不会自己替换自己的程序文件。
## 改进
**切回直连前先确认。** 进入路由或聚合时本来就有确认框,切回直连却是点了立即生效,只在提示里给一个容易错过的「撤销」。现在「回到直连」按钮、卡片上的「回到直连并使用」,以及路由服务停止时的提示,都会先弹确认框,写明客户端会直接连接哪家、哪个文件里的地址和密钥会被改回去;从路由切回时说明路由目标、故障转移队列和设置都会保留,从聚合切回时说明哪些模型会从 `/model` 里消失。出错直接显示在确认框里,「撤销」去掉了。
**Codex:「聚合模式下子 agent 用经典工具」默认打开。** 主代理和子代理不在同一家时,Codex 新版的子 agent 工具会把任务加密,只有主代理那家解得开,子代理收不到任务([#8253](https://github.com/farion1231/cc-switch/issues/8253))。这个开关从设置页挪进「聚合设置」,改为默认打开。
**GPT 模型的上下文窗口封顶 272K。** models.dev 上 GPT-5.6、GPT-6 系列写的是 OpenAI API 的 105 万窗口,但很多中转是用 ChatGPT 订阅转发的,订阅的上限是 272K,而 CC Switch 从地址上分不出是哪一种。窗口写大了,客户端会一直不压缩,直到上游拒绝请求、这一轮直接失败;写小了只是早一点压缩。现在添加供应商时自动补全的 GPT 窗口一律不超过 272K,Hermes、OpenClaw、OpenCode、Pi、Codex 预设里的 GPT 窗口也一起下调;Claude Code 里用 ChatGPT 订阅的「Codex」预设从 372K 改为 272K。比 272K 小的窗口不变。
## 修复
- **Codex 保存配置时报「duplicate key custom in table model_providers」**([#8271](https://github.com/farion1231/cc-switch/issues/8271))。`config.toml` 里供应商表头带引号(`[model_providers."custom"]`)时认不出来,保存时又加了一张同名的表。现在双引号、单引号、带空格的写法都能认出来。
- **路由或聚合模式下,Codex 的远程压缩失效**([#8338](https://github.com/farion1231/cc-switch/issues/8338))。进入路由或聚合、保存当前供应商或重启 CC Switch 后,供应商开的远程压缩设置会丢掉,Codex 改用本地摘要压缩,带搜索记录的会话可能报 `response protection is unavailable`。现在会保留路由那家的压缩设置。
- **经路由转换 OpenAI Chat 上游时,回复结束后还可能再收到一条错误**([#8281](https://github.com/farion1231/cc-switch/pull/8281))。上游发完 `[DONE]` 后断开连接,CC Switch 会在正常结束之后再补一个错误,或者把之后的内容继续转发出去。现在收到 `[DONE]` 就结束。
- **OpenCode 会话的耗时一直是 0、速度列为空**([#6326](https://github.com/farion1231/cc-switch/issues/6326))。现在按每条消息的开始和完成时间计算耗时,能显示估算速度。
- **Codex 分支对话翻页后的用量一直不入账**([#8161](https://github.com/farion1231/cc-switch/issues/8161))。分支对话翻页生成的续写文件被当成新派生的子会话,一直等不到父会话写到那个时刻。现在能认出这是分支对话自己的续写。
- **用 fnm 装了很多 Node 版本时,切换模式卡住几分钟**([#8313](https://github.com/farion1231/cc-switch/issues/8313))。查找命令行工具时去重的写法随路径数平方增长,fnm 的 multishell 目录一多就很慢;现在路径很多时也只要几十毫秒。
- **Windows 11 上窗口卡死、主线程持续高占用**([#8321](https://github.com/farion1231/cc-switch/issues/8321)、[#8324](https://github.com/farion1231/cc-switch/issues/8324))。问题出在 WebView2 处理原生拖拽区域时。Windows 上不再使用原生拖拽区域,拖动和双击最大化改用应用自己的处理,标题栏的用法不变。
- **Codex 聚合模式换默认供应商时,预览把原来的默认那家算成 0 个模型**。默认那家本身不发布聚合模型,但换走之后它的模型会全部加进聚合;现在预览显示的是换走之后的数量。
## 升级说明
**数据库结构没有变化**,仍然是 20。
- Claude Desktop 当前用的是模型映射卡的,首次启动会自动切到路由模式、路由到这张卡,直连那边改为官方。重启 Claude Desktop 后生效。
- Codex 的「聚合模式下子 agent 用经典工具」改为默认打开,以前关掉的不会保留;需要关闭的话在「聚合设置」里重新关掉。
- GPT 窗口封顶只影响新添加的供应商和新补全的模型参数,已添加的卡片保持原来的窗口。
- 改了自动审批模型后要重启 Codex。
---
## 致谢
感谢 [@HEOJUNFO](https://github.com/HEOJUNFO)(Codex 带引号的供应商表头)、[@zqtqzy](https://github.com/zqtqzy)(路由模式下的 Codex 远程压缩)、[@xue-ding-e](https://github.com/xue-ding-e)(Chat 流在 `[DONE]` 处结束)、[@zhengkaics](https://github.com/zhengkaics) 和 [@SailingLoong](https://github.com/SailingLoong)(OpenCode 会话耗时)、[@Lingbou](https://github.com/Lingbou)(Codex 分支对话翻页用量)、[@hulkbig](https://github.com/hulkbig)(fnm 路径去重)、[@funkpopo](https://github.com/funkpopo)(Windows 窗口卡死)的贡献。
感谢 [@zhangchuanqiang-cloud](https://github.com/zhangchuanqiang-cloud)、[@SRQuan](https://github.com/SRQuan)、[@vvvss7992](https://github.com/vvvss7992)、[@obsidian0215](https://github.com/obsidian0215)、[@wangding0610](https://github.com/wangding0610)、[@XinwangTao](https://github.com/XinwangTao)、[@RRRRSH](https://github.com/RRRRSH)、[@YwaQ96](https://github.com/YwaQ96)、[@Tison6](https://github.com/Tison6)、[@haveqqq](https://github.com/haveqqq)、[@cc10143](https://github.com/cc10143)、[@KDB-Wind](https://github.com/KDB-Wind) 报告问题、提供复现信息和修复思路。
完整的技术细节请见 [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md)。
+33
View File
@@ -0,0 +1,33 @@
{
"version": "4.0.13",
"items": [
{
"type": "new",
"zh": "Claude Desktop 可选直连、路由、聚合三种模式",
"zh-TW": "Claude Desktop 可選直連、路由、聚合三種模式",
"en": "Claude Desktop can now use direct, routing or aggregation mode",
"ja": "Claude Desktop で直接接続・ルーティング・集約の3モードを選択可能に"
},
{
"type": "new",
"zh": "Codex 可选自动审批模型,聚合模式可单独指定子代理模型",
"zh-TW": "Codex 可選自動審批模型,聚合模式可單獨指定子代理模型",
"en": "Codex can pick an Auto Review model, and aggregation can set its own sub-agent model",
"ja": "Codex で自動承認モデルを選択可能に、集約モードではサブエージェントのモデルも指定可能に"
},
{
"type": "improve",
"zh": "切回直连前先确认;GPT 上下文窗口封顶 272K",
"zh-TW": "切回直連前先確認;GPT 上下文視窗上限 272K",
"en": "Going back to direct now asks first, and GPT context windows are capped at 272K",
"ja": "直接接続に戻す前に確認するように、GPT のコンテキストウィンドウは 272K が上限に"
},
{
"type": "improve",
"zh": "Windows 便携版点更新直接下载对应的压缩包",
"zh-TW": "Windows 可攜版點更新直接下載對應的壓縮檔",
"en": "Windows portable builds download the matching zip straight from the update button",
"ja": "Windows ポータブル版は更新ボタンから対応する zip を直接ダウンロード"
}
]
}