mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-10-25 17:22:27 +08:00
docs(release): add v4.0.14 release notes
This commit is contained in:
1 parent
d858ab4cf8
commit
5de6feb4e5
4 files changed
+240
No files matched your search
@@ -0,0 +1,69 @@
|
||||
# CC Switch v4.0.14
|
||||
|
||||
This release adds a large set of customization options to the usage dashboard: the usage page gains a "Settings" tab, amounts can be shown in other currencies such as CNY, EUR and JPY (with an exchange rate you can edit), the sidebar "Today" line can show cost, tokens, requests or cache hit rate, you can choose which columns the request log shows, and four new columns are available: cache write, hit rate, total time and status code. When you open the usage page again, it returns to the tab, time range and chart metrics you last viewed. "Open Terminal" on Claude Code cards now first explains what the folder is for, and remembers recently used folders. It also fixes a 400 on the second round of tool calls when Codex connects to Gemini through routing, Codex's retry count setting not taking effect in Routing mode, Skills repositories larger than 128 MiB failing to install, custom pricing containing uppercase letters not taking effect, Hermes development builds constantly reporting a new version, and reordering the failover queue doing nothing, 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
|
||||
|
||||
**Usage amounts can be shown in other currencies.** The usage page's former "Pricing" tab is now "Settings", with the new "Display" section at the top and the pricing configuration still below it. Under "Currency" you can choose US dollars (the default), Chinese yuan, euros, Japanese yen, New Taiwan dollars or Turkish lira, and the "Exchange rate" comes with a reference value you can edit. Costs are still recorded in US dollars and only converted for display; hover to see the original USD value. Charts convert first and then draw, so axis ticks are still whole numbers. Converted amounts keep at most two decimal places (yen shows two fewer), and larger amounts use thousands separators.
|
||||
|
||||
**Choose what the sidebar "Today" line shows.** The usage line in the sidebar used to always show today's cost; now in Sidebar "Today" you can choose "Cost", "Tokens", "Requests" and "Cache hit rate", up to two items, or none at all to hide it. Names are no longer squeezed by the numbers after them; with two items selected, the line shows just the two numbers and puts the full description in the tooltip.
|
||||
|
||||
**Choose which columns the request log shows.** Check the columns you want in "Request log columns". Four columns are new, all hidden by default:
|
||||
|
||||
- **Cache Write**: the number of tokens written to the cache. Codex, Gemini and Grok don't report this number, so it shows "—" with an explanation on hover.
|
||||
- **Hit Rate**: each request's cache hit rate ([#7298](https://github.com/farion1231/cc-switch/issues/7298)), calculated the same way as the overall hit rate; it is rounded down to one decimal place, so a near-complete hit never shows as 100%.
|
||||
- **Total Time**: the duration of the whole streamed response; values estimated from session logs are prefixed with "≈".
|
||||
- **Status Code**: while this column is shown, the error marker next to the time is no longer displayed.
|
||||
|
||||
When there are many columns the table scrolls horizontally instead of squeezing every column narrower.
|
||||
|
||||
**The usage page remembers your last view.** When you open the usage page again, it returns to the tab, preset time range and trend chart and heatmap metrics you last viewed. A custom date range does not overwrite the remembered preset range, and the app, provider and model filters are not kept.
|
||||
|
||||
**"Open Terminal" explains first, then lets you pick a folder.** Clicking "Open Terminal" on a Claude Code card used to open the system folder picker right away, with no hint of what the folder was for. It now first opens "Open a terminal in which folder?", explaining that a terminal will open in the folder you choose and start Claude Code with this card's settings, usually in your project folder. The folder you last opened successfully is filled in automatically, and "Recent" lists up to five folders that you can pick with one click or remove. When the card has its own address and key, it also explains that this terminal is isolated: switching providers in CC Switch later won't affect it.
|
||||
|
||||
**Pricing:** Added built-in pricing for Gemini 4 Argon ([#8356](https://github.com/farion1231/cc-switch/pull/8356)), an introductory price valid until 2026-11-30; past requests already recorded as 0 are repriced at startup.
|
||||
|
||||
## Improvements
|
||||
|
||||
**Claude Desktop shows 1M models only once.** Desktop used to list every model that declared 1M twice: a normal row plus a "1M context" row. Now only the normal row remains, and selecting it still uses the 1M window. In Routing and Aggregation modes this takes effect the next time CC Switch starts or the mode is switched; in Direct mode, the next time you switch providers or save the card.
|
||||
|
||||
**The direct provider can't be deleted while routing, and the reason is now explained.** In Routing or Aggregation mode, the card the direct pointer points at can't be deleted, because leaving routing returns to it ([#8277](https://github.com/farion1231/cc-switch/issues/8277)). The message used to say "The provider in use can't be deleted", yet the route page didn't mark this card as in use, which left people puzzled. The message now states the reason, and that you should first choose "Back to direct and use" on another provider on the direct page and then delete it.
|
||||
|
||||
**When connecting to the upstream fails, the log states the specific cause.** Previously a failed routed request only logged something vague like "error sending request", with no way to tell whether it was DNS resolution, a refused connection, TLS or a reset connection ([#8416](https://github.com/farion1231/cc-switch/issues/8416)). The log now includes the underlying cause, making it easier to judge whether several providers failing at once share the same network problem; URLs are stripped before logging, so keys in query parameters don't end up in the log.
|
||||
|
||||
**Presets:** SiliconFlow China's Claude Code, Claude Desktop, Hermes and OpenClaw presets now use DeepSeek-V4-Flash (the previous MiniMax-M2.5 has been retired); TokenFactory is shown as "词元工厂" in the Chinese interface; Pi switches to pi.dev's new three-color icon.
|
||||
|
||||
## Fixes
|
||||
|
||||
- **When Codex connected to Gemini through routing, the second round of tool calls failed with a 400 "missing a thought_signature"** ([#8336](https://github.com/farion1231/cc-switch/issues/8336)). Gemini returns a signature with tool calls and requires it to be sent back unchanged in the next round, but CC Switch's format conversion dropped it. It is now saved and sent back; if CC Switch restarts in the middle of a tool-call round and the signature is lost, it fills in a placeholder signature as Gemini's documentation describes, instead of failing. Other upstreams are not affected.
|
||||
- **In Routing mode, the retry count in Codex's config didn't take effect** ([#8265](https://github.com/farion1231/cc-switch/issues/8265)). After entering routing, the provider's `stream_max_retries`, `request_max_retries` and `stream_idle_timeout_ms` settings were dropped, so retries set to 50, for example, fell back to Codex's default of 5. They are now kept.
|
||||
- **Skills repositories larger than 128 MiB failed to install and were misreported as exceeding the extraction limit** ([#8421](https://github.com/farion1231/cc-switch/issues/8421)). The repository archive used to be read entirely into memory with a 128 MiB cap; it is now written to a temporary file as it downloads, the cap is raised to 512 MiB to match the extraction limit, and exceeding the download limit has its own message.
|
||||
- **Custom model pricing containing uppercase letters didn't take effect, so cost stayed at 0** ([#8413](https://github.com/farion1231/cc-switch/issues/8413)). For example `GLM-5.3-Flash-EXL3`, entered as the name shown in the interface. Price lookup is now case-insensitive, covering both new requests and the history backfill after saving.
|
||||
- **Estimated speed was too low for OpenCode session turns with many tool calls** ([#8402](https://github.com/farion1231/cc-switch/issues/8402)). Duration used to run until the tools finished executing; it now ends when the model's output ends.
|
||||
- **Two problems with OpenCode one-click import**: after a successful import, the card's "Added" status didn't update promptly ([#8380](https://github.com/farion1231/cc-switch/issues/8380)); providers with Chinese names couldn't be saved on the edit page after import ([#8379](https://github.com/farion1231/cc-switch/issues/8379)).
|
||||
- **Hermes development builds constantly reported a new version** ([#8394](https://github.com/farion1231/cc-switch/issues/8394)). Development version numbers like `0.22.1+238.g<sha>` used to be compared as the release `0.22.1`, and the notice didn't go away even after `hermes update`. Development builds no longer get the notice.
|
||||
- **Tools installed in WSL that failed when run were shown as "Not installed"** ([#8167](https://github.com/farion1231/cc-switch/pull/8167)). Previously any output containing "not found", such as "module not found", counted as not installed; now only the shell's "command not found" does.
|
||||
- **Sub-agent usage was never counted when a Codex parent session contained a garbled record** ([#8360](https://github.com/farion1231/cc-switch/pull/8360)). That record is now skipped and the rest is counted normally.
|
||||
- **Reordering the failover queue made no change but still reported success** ([#8297](https://github.com/farion1231/cc-switch/issues/8297)). When two providers in the queue had the same sort value, or a newly added provider had none, moving up or down wrote the same value. The adjusted order now always takes effect.
|
||||
- **On Windows, the same project was split into two groups in session management because of drive letter case** ([#8233](https://github.com/farion1231/cc-switch/issues/8233)). For example `D:\projects\demo` and `d:\projects\demo`. They are now merged into one group.
|
||||
- **After editing request headers in OpenClaw's config JSON, the "Send User-Agent" switch didn't follow** ([#8256](https://github.com/farion1231/cc-switch/issues/8256)).
|
||||
|
||||
## Upgrade Notes
|
||||
|
||||
**The database schema is unchanged**, still at 20.
|
||||
|
||||
- The usage page's "Pricing" tab has moved into "Settings"; the currency, sidebar "Today" and request log column settings are stored only on this device and are not synced to the cloud.
|
||||
- In Claude Desktop's Direct mode, the two rows for a 1M model only merge into one after you next switch providers or save the card.
|
||||
- Gemini 4 Argon's built-in price is an introductory price valid until 2026-11-30; the regular price after that will be adjusted in the next pricing update.
|
||||
|
||||
---
|
||||
|
||||
## Thanks
|
||||
|
||||
Thanks to [@Vincebye](https://github.com/Vincebye) (custom pricing with uppercase letters), [@xianshang33](https://github.com/xianshang33) (OpenCode speed estimates), [@HaiYangBG1](https://github.com/HaiYangBG1) (the two OpenCode one-click import problems), [@Tsuki-hash](https://github.com/Tsuki-hash) (false new-version notices for Hermes development builds), [@Adonis0123](https://github.com/Adonis0123) (WSL tool detection), [@Carl723000](https://github.com/Carl723000) (garbled records in Codex parent sessions) and [@Besty0728](https://github.com/Besty0728) (Gemini 4 Argon pricing) for their contributions.
|
||||
|
||||
Thanks to [@maq233](https://github.com/maq233), [@CR547](https://github.com/CR547), [@zqbake](https://github.com/zqbake), [@Hybangbang](https://github.com/Hybangbang), [@zhang3776813](https://github.com/zhang3776813), [@zhangyudi-01](https://github.com/zhangyudi-01), [@zsp1029](https://github.com/zsp1029), [@hulkbig](https://github.com/hulkbig) and [@tarnish233](https://github.com/tarnish233) 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).
|
||||
@@ -0,0 +1,69 @@
|
||||
# CC Switch v4.0.14
|
||||
|
||||
今回のリリースでは、使用量の統計パネルにカスタマイズ項目を数多く追加しました。使用量ページに「設定」タブを追加し、金額を人民元、ユーロ、日本円などの通貨で表示できるようになりました(為替レートは自分で変更できます)。サイドバーの「今日」に金額、トークン、リクエスト数、キャッシュヒット率のどれを表示するかを選べ、リクエストログでは表示する列を選べるようになり、キャッシュ書き込み、ヒット率、合計時間、ステータスコードの 4 列を追加しました。使用量ページを再び開くと、前回見ていたタブ、期間、グラフの指標に戻ります。Claude Code のカードの「ターミナルを開く」は、まずこのフォルダが何に使われるのかを説明し、最近使ったフォルダを記憶するようになりました。ほかにも、Codex がルーティング経由で Gemini に接続したときに 2 回目のツール呼び出しで 400 になる問題、ルーティングモードで Codex のリトライ回数の設定が効かない問題、128 MiB を超える Skills リポジトリをインストールできない問題、大文字を含むカスタム料金が反映されない問題、Hermes の開発版で新しいバージョンがあると表示され続ける問題、フェイルオーバーキューの並べ替えが反映されない問題などを修正しました。4.0 の更新内容の全体は [v4.0 リリースノート](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-ja.md) をご覧ください。
|
||||
|
||||
---
|
||||
|
||||
## 新機能
|
||||
|
||||
**使用量の金額をほかの通貨で表示できるようになりました。** 使用量ページの「料金」タブは「設定」に変わり、上に新しい「表示」セクション、下に従来どおりの料金設定があります。「通貨」では米ドル(デフォルト)、中国人民元、ユーロ、日本円、新台湾ドル、トルコリラを選べ、「為替レート」には参考値が入っていて、自分で変更できます。費用は引き続き米ドルで記録し、表示するときだけ換算するので、ホバーすると米ドルの元の値を確認できます。グラフは換算してから描画し、軸の目盛りは整数のままです。換算後の金額は小数点以下最大 2 桁まで(日本円は 2 桁少なく)で、金額が大きいときは 3 桁ごとに区切ります。
|
||||
|
||||
**サイドバーの「今日」に表示する内容を選べるようになりました。** サイドバーの使用量の行にはこれまで今日の金額が固定で表示されていましたが、現在は「サイドバーの「今日」」で金額、トークン、リクエスト数、キャッシュヒット率から最大 2 つまで選べ、何も選ばずに非表示にすることもできます。名前が後ろの数字に押されて狭くなることはなくなりました。2 つ選んだ場合、この行には数字が 2 つだけ表示され、詳しい説明はホバー時のツールチップに表示されます。
|
||||
|
||||
**リクエストログに表示する列を選べるようになりました。** 「リクエストログの列」で表示する列にチェックを入れます。新しい列を 4 つ追加し、いずれもデフォルトでは非表示です:
|
||||
|
||||
- **キャッシュ書き込み**:キャッシュに書き込んだトークン数です。Codex、Gemini、Grok はこの数を報告しないため、「—」と表示し、ホバー時に説明します。
|
||||
- **ヒット率**:リクエストごとのキャッシュヒット率です([#7298](https://github.com/farion1231/cc-switch/issues/7298))。計算方法は全体のヒット率と同じです。小数点以下 1 桁に切り捨てるので、ほぼすべてヒットしていても 100% とは表示されません。
|
||||
- **合計時間**:ストリーミング応答全体の時間です。セッションログから推定した値には前に「≈」が付きます。
|
||||
- **ステータスコード**:この列を表示している間は、時刻の横のエラーマークは表示されません。
|
||||
|
||||
列が多いときは表を左右にスクロールでき、各列が狭く押しつぶされることはなくなりました。
|
||||
|
||||
**使用量ページが前回の表示を記憶するようになりました。** 使用量ページを再び開くと、前回見ていたタブ、プリセットの期間、推移グラフとヒートマップの指標に戻ります。カスタムの日付範囲は記憶したプリセットの期間を上書きせず、アプリ、プロバイダー、モデルの絞り込みは保持しません。
|
||||
|
||||
**「ターミナルを開く」は、フォルダを選ぶ前に説明するようになりました。** これまで Claude Code のカードの「ターミナルを開く」を押すと、すぐにシステムのフォルダ選択ウィンドウが開き、このフォルダが何に使われるのかわかりませんでした。現在はまず「どのフォルダでターミナルを開きますか?」を表示し、選んだフォルダでターミナルを開き、このカードの設定で Claude Code を起動することを説明します。通常はプロジェクトのフォルダを選びます。前回開けたフォルダが自動で入力され、「最近使ったフォルダ」には最大 5 つのフォルダが並び、クリックすると選べるほか、一覧から削除することもできます。カードに独自のアドレスと Key がある場合は、このターミナルが分離されていること、つまり後で CC Switch でプロバイダーを切り替えても影響しないことも説明します。
|
||||
|
||||
**料金:** Gemini 4 Argon の組み込み価格を追加しました([#8356](https://github.com/farion1231/cc-switch/pull/8356))。2026-11-30 までの導入価格です。すでに 0 と記録されていた過去のリクエストは、起動時に再計算されます。
|
||||
|
||||
## 改善
|
||||
|
||||
**Claude Desktop の 1M モデルが 1 行だけ表示されるようになりました。** Desktop はこれまで、1M を宣言したモデルをそれぞれ 2 回並べていました。通常の行と、「1M コンテキスト」の行です。現在は通常の行だけを残し、選んだ後も引き続き 1M ウィンドウで使われます。ルーティングと集約モードでは、次に CC Switch を起動したときかモードを切り替えた後に反映されます。直接接続モードでは、次にプロバイダーを切り替えるか、このカードを保存した後に反映されます。
|
||||
|
||||
**ルーティング中に直接接続側のプロバイダーを削除できない理由を説明するようになりました。** ルーティングまたは集約モードでは、直接接続が指しているカードは削除できません。ルーティングを終了するとそこに戻るためです([#8277](https://github.com/farion1231/cc-switch/issues/8277))。これまでのメッセージは「使用中のプロバイダーは削除できません」でしたが、ルーティングのページではこのカードは使用中と表示されていないため、わかりにくいものでした。現在はメッセージに理由と、先に直接接続ページでほかのプロバイダーの「直接接続に戻して使う」を押してから削除する手順を明記します。
|
||||
|
||||
**アップストリームへの接続に失敗したとき、ログに具体的な原因を記録するようになりました。** これまでルーティングの転送に失敗すると「error sending request」のような大まかな内容しか記録されず、DNS 解決、接続拒否、TLS、接続リセットのどれなのか区別できませんでした([#8416](https://github.com/farion1231/cc-switch/issues/8416))。現在はログに下層の原因も含めるので、複数のプロバイダーが同時に失敗したときに同じネットワーク経路の問題かどうかを判断しやすくなりました。記録する前に URL を取り除くため、クエリパラメーターに含まれる Key がログに残ることはありません。
|
||||
|
||||
**プリセット:** SiliconFlow(硅基流动)の中国国内サイトの Claude Code、Claude Desktop、Hermes、OpenClaw プリセットを DeepSeek-V4-Flash に変更しました(以前の MiniMax-M2.5 は提供終了)。TokenFactory は中国語の画面では「词元工厂」と表示されるようになりました。Pi は pi.dev の新しい 3 色のアイコンに変わりました。
|
||||
|
||||
## 修正
|
||||
|
||||
- **Codex がルーティング経由で Gemini に接続したとき、2 回目のツール呼び出しで 400「missing a thought_signature」になっていた問題**([#8336](https://github.com/farion1231/cc-switch/issues/8336))。Gemini はツール呼び出しに署名を付けて返し、次のターンでそのまま送り返すよう求めますが、CC Switch の形式変換がこれを落としていました。現在は保存して送り返します。ツール呼び出しの途中で CC Switch が再起動して署名が失われた場合は、Gemini のドキュメントのやり方に従ってプレースホルダーの署名を補うので、エラーになりません。ほかのアップストリームには影響しません。
|
||||
- **ルーティングモードで、Codex の設定のリトライ回数が効かなかった問題**([#8265](https://github.com/farion1231/cc-switch/issues/8265))。ルーティングに入ると、プロバイダーで設定した `stream_max_retries`、`request_max_retries`、`stream_idle_timeout_ms` が失われ、たとえば 50 回に設定したリトライが Codex デフォルトの 5 回に戻っていました。現在は保持します。
|
||||
- **128 MiB を超える Skills リポジトリをインストールできず、展開サイズの上限超過と誤って表示されていた問題**([#8421](https://github.com/farion1231/cc-switch/issues/8421))。リポジトリのアーカイブはこれまで丸ごとメモリに読み込んでおり、上限は 128 MiB でした。現在はダウンロードしながら一時ファイルに書き込み、上限を展開と同じ 512 MiB に引き上げました。ダウンロードが上限を超えた場合は別のメッセージで知らせます。
|
||||
- **大文字を含むカスタムモデル料金が反映されず、コストがずっと 0 だった問題**([#8413](https://github.com/farion1231/cc-switch/issues/8413))。たとえば画面の表示名どおりに入力した `GLM-5.3-Flash-EXL3` です。現在は料金の照合で大文字と小文字を区別しないため、新しいリクエストにも、保存後の過去分の再計算にも反映されます。
|
||||
- **OpenCode のセッションで、ツール呼び出しの多いターンの推定速度が低く出ていた問題**([#8402](https://github.com/farion1231/cc-switch/issues/8402))。所要時間はこれまでツールの実行が終わるまでを数えていましたが、現在はモデルの出力が終わるまでを数えます。
|
||||
- **OpenCode のワンクリックインポートの 2 つの問題**:インポートに成功した後、カードの「追加済み」状態がすぐに更新されなかった問題([#8380](https://github.com/farion1231/cc-switch/issues/8380))と、名前が中国語のプロバイダーをインポートした後に編集ページで保存できなかった問題([#8379](https://github.com/farion1231/cc-switch/issues/8379))。
|
||||
- **Hermes の開発版で、新しいバージョンがあると表示され続けていた問題**([#8394](https://github.com/farion1231/cc-switch/issues/8394))。`0.22.1+238.g<sha>` のような開発版のバージョン番号はこれまで正式版の `0.22.1` として比較されており、`hermes update` の後も表示が消えませんでした。現在は開発版では表示しません。
|
||||
- **WSL にインストールされているのに実行時にエラーになるツールが「未インストール」と表示されていた問題**([#8167](https://github.com/farion1231/cc-switch/pull/8167))。これまでは出力に「not found」が含まれているだけで未インストールと判定しており、「module not found」なども該当していました。現在はシェルの「コマンドが見つからない」だけを認識します。
|
||||
- **Codex の親セッションに文字化けしたレコードが 1 件あると、サブエージェントの使用量がいつまでも計上されなかった問題**([#8360](https://github.com/farion1231/cc-switch/pull/8360))。現在はそのレコードを飛ばし、残りは通常どおり集計します。
|
||||
- **フェイルオーバーキューの並べ替えをしても変わらないのに、成功と表示されていた問題**([#8297](https://github.com/farion1231/cc-switch/issues/8297))。キューに並び順の値が同じプロバイダーが 2 つある場合や、新しく追加したプロバイダーに並び順の値がない場合、上へ・下へ移動すると同じ値が書き込まれていました。現在は並べ替えた順序が必ず反映されます。
|
||||
- **Windows で同じプロジェクトが、ドライブ文字の大文字・小文字の違いによってセッション管理で 2 つのグループに分かれていた問題**([#8233](https://github.com/farion1231/cc-switch/issues/8233))。たとえば `D:\projects\demo` と `d:\projects\demo` です。現在は 1 つのグループにまとめます。
|
||||
- **OpenClaw で設定 JSON のリクエストヘッダーを変更しても、「User-Agent を送信」スイッチが連動しなかった問題**([#8256](https://github.com/farion1231/cc-switch/issues/8256))。
|
||||
|
||||
## アップグレードに関する注意
|
||||
|
||||
**データベースの構造は変わっていません。** バージョンは 20 のままです。
|
||||
|
||||
- 使用量ページの「料金」タブは「設定」の中に移りました。通貨、サイドバーの「今日」、リクエストログの列の設定はこのマシンにだけ保存され、クラウド同期されません。
|
||||
- Claude Desktop の直接接続モードでは、1M モデルの 2 行は、次にプロバイダーを切り替えるか、このカードを保存するまで 1 行にまとまりません。
|
||||
- Gemini 4 Argon の組み込み価格は 2026-11-30 までの導入価格で、その後の正式価格は次回の価格更新で調整します。
|
||||
|
||||
---
|
||||
|
||||
## 謝辞
|
||||
|
||||
[@Vincebye](https://github.com/Vincebye)(大文字を含むカスタム料金)、[@xianshang33](https://github.com/xianshang33)(OpenCode の速度推定)、[@HaiYangBG1](https://github.com/HaiYangBG1)(OpenCode のワンクリックインポートの 2 つの問題)、[@Tsuki-hash](https://github.com/Tsuki-hash)(Hermes の開発版での新バージョンの誤表示)、[@Adonis0123](https://github.com/Adonis0123)(WSL のツール検出)、[@Carl723000](https://github.com/Carl723000)(Codex の親セッションの文字化けしたレコード)、[@Besty0728](https://github.com/Besty0728)(Gemini 4 Argon の料金)の貢献に感謝します。
|
||||
|
||||
問題の報告、再現情報や修正のアイデアの提供に協力してくださった [@maq233](https://github.com/maq233)、[@CR547](https://github.com/CR547)、[@zqbake](https://github.com/zqbake)、[@Hybangbang](https://github.com/Hybangbang)、[@zhang3776813](https://github.com/zhang3776813)、[@zhangyudi-01](https://github.com/zhangyudi-01)、[@zsp1029](https://github.com/zsp1029)、[@hulkbig](https://github.com/hulkbig)、[@tarnish233](https://github.com/tarnish233) に感謝します。
|
||||
|
||||
技術的な詳細は [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md) をご覧ください。
|
||||
@@ -0,0 +1,69 @@
|
||||
# CC Switch v4.0.14
|
||||
|
||||
本版本为用量统计面板增加了大量自定义选项:用量页新增「设置」页签,金额可以换成人民币、欧元、日元等币种显示(汇率可以自己改),侧栏「今日」可以选显示金额、Token、请求数或缓存命中率,请求日志可以选显示哪些列,并新增缓存写入、命中率、总耗时和状态码四列;再打开用量页时,会回到上次看的页签、时间范围和图表指标。Claude Code 卡片上的「打开终端」会先说明这个目录是做什么用的,并记住最近用过的目录。还修复了 Codex 经路由连接 Gemini 时第二轮工具调用报 400、路由模式下 Codex 的重试次数设置失效、超过 128 MiB 的 Skills 仓库装不上、含大写字母的自定义定价不生效、Hermes 开发版一直提示有新版本、故障转移队列调整顺序没反应等问题。4.0 完整的更新内容请见 [v4.0 发布说明](https://github.com/farion1231/cc-switch/blob/main/docs/release-notes/v4.0.4-zh.md)。
|
||||
|
||||
---
|
||||
|
||||
## 新增
|
||||
|
||||
**用量金额可以换成其他币种显示。** 用量页原来的「定价」页签改为「设置」,上面是新的「显示」区,下面仍是定价配置。在「币种」里可以选美元(默认)、人民币、欧元、日元、新台币、土耳其里拉,「汇率」预填了参考值,可以自己改。费用仍按美元记录,只在显示时换算,悬停可以看到美元原值;图表先换算再画,坐标轴刻度仍是整数。换算后的金额最多保留两位小数(日元少两位),金额较大时按千分位分隔。
|
||||
|
||||
**侧栏「今日」可以选显示什么。** 侧栏用量那一行原来固定显示今日金额,现在可以在「侧栏「今日」」里选金额、Token、请求数、缓存命中率,最多选两项,也可以都不选、不显示。名字不再被后面的数字挤窄;选了两项时,这一行只显示两个数字,完整说明放在悬停提示里。
|
||||
|
||||
**请求日志可以选显示哪些列。** 在「请求日志的列」里勾选要显示的列,新增四列,默认都不显示:
|
||||
|
||||
- **缓存写入**:写进缓存的 Token 数。Codex、Gemini、Grok 不报告这个数,显示「—」并在悬停时说明。
|
||||
- **命中率**:每条请求的缓存命中率([#7298](https://github.com/farion1231/cc-switch/issues/7298)),算法和总命中率相同;向下取到一位小数,接近全中也不会显示成 100%。
|
||||
- **总耗时**:整个流式响应的时长;从会话日志估算的值前面带「≈」。
|
||||
- **状态码**:显示这一列时,时间旁边的错误标记就不再显示。
|
||||
|
||||
列多时表格可以左右滚动,不再把每一列挤窄。
|
||||
|
||||
**用量页记住上次的视图。** 再打开用量页时,会回到上次看的页签、预设时间范围和趋势图、热力图的指标。自定义的日期范围不会覆盖记住的预设范围,应用、供应商、模型筛选不保留。
|
||||
|
||||
**「打开终端」先说明再选目录。** 以前点 Claude Code 卡片上的「打开终端」会直接弹出系统的选目录窗口,看不出这个目录是做什么的。现在先弹出「在哪个目录打开终端?」,说明会在你选的目录里打开终端,并用这张卡的配置启动 Claude Code,一般选项目文件夹。上次成功打开的目录会自动填上,「最近用过」里最多列出五个目录,点一下就能选,也可以移除。卡片有自己的地址和 Key 时,还会说明这个终端是隔离的:之后在 CC Switch 里切换供应商不会影响它。
|
||||
|
||||
**定价:** 新增 Gemini 4 Argon 的内置价格([#8356](https://github.com/farion1231/cc-switch/pull/8356)),是 2026-11-30 前的介绍价;已经记成 0 的历史请求会在启动时重新计价。
|
||||
|
||||
## 改进
|
||||
|
||||
**Claude Desktop 的 1M 模型只显示一行。** Desktop 以前会把每个声明了 1M 的模型列两次:普通的一行,加一行「1M 上下文」。现在只留普通的一行,选中后仍按 1M 窗口用。路由和聚合模式下,下次启动 CC Switch 或切换模式后生效;直连模式下,下次切换供应商或保存这张卡后生效。
|
||||
|
||||
**路由时不能删除直连那家,现在会说明原因。** 路由或聚合模式下,直连指向的那张卡不能删除,因为退出路由后要回到它([#8277](https://github.com/farion1231/cc-switch/issues/8277))。以前提示写的是「正在用的这家不能删除」,而路由页上这张卡并没有标成正在使用,让人摸不着头脑。现在提示会写明原因,以及先在直连页对别家点「回到直连并使用」再删除。
|
||||
|
||||
**连接上游失败时,日志写明具体原因。** 以前路由转发失败只记「error sending request」这类笼统的话,分不出是域名解析、连接被拒、TLS 还是连接被重置([#8416](https://github.com/farion1231/cc-switch/issues/8416))。现在日志会带上底层原因,方便判断多家同时失败是不是同一条网络出了问题;记录前会先去掉 URL,查询参数里的 Key 不会进日志。
|
||||
|
||||
**预设:** 硅基流动国内站的 Claude Code、Claude Desktop、Hermes、OpenClaw 预设改用 DeepSeek-V4-Flash(原来的 MiniMax-M2.5 已下线);TokenFactory 在中文界面显示为「词元工厂」;Pi 换成 pi.dev 新的三色图标。
|
||||
|
||||
## 修复
|
||||
|
||||
- **Codex 经路由连接 Gemini 时,第二轮工具调用报 400「missing a thought_signature」**([#8336](https://github.com/farion1231/cc-switch/issues/8336))。Gemini 会在工具调用里返回一个签名,并要求下一轮原样带回,CC Switch 的格式转换把它丢了。现在会保存并带回;CC Switch 在一轮工具调用中途重启、签名丢失时,按 Gemini 文档的做法补一个占位签名,不再报错。其他上游不受影响。
|
||||
- **路由模式下,Codex 配置里的重试次数不生效**([#8265](https://github.com/farion1231/cc-switch/issues/8265))。进入路由后,供应商设置的 `stream_max_retries`、`request_max_retries`、`stream_idle_timeout_ms` 会被丢掉,比如设成 50 次的重试又回到 Codex 默认的 5 次。现在会保留。
|
||||
- **超过 128 MiB 的 Skills 仓库装不上,还被误报成解压超限**([#8421](https://github.com/farion1231/cc-switch/issues/8421))。仓库压缩包以前整个读进内存,上限 128 MiB;现在边下载边写进临时文件,上限提高到和解压一致的 512 MiB,下载超限时单独提示。
|
||||
- **含大写字母的自定义模型定价不生效,成本一直是 0**([#8413](https://github.com/farion1231/cc-switch/issues/8413))。例如按界面显示名填的 `GLM-5.3-Flash-EXL3`。现在查价不区分大小写,新请求和保存后的历史回填都能算上。
|
||||
- **OpenCode 会话中工具调用多的轮次,估算速度偏低**([#8402](https://github.com/farion1231/cc-switch/issues/8402))。耗时以前算到工具执行完,现在算到模型输出结束。
|
||||
- **OpenCode 一键导入的两个问题**:导入成功后卡片的「已添加」状态不及时更新([#8380](https://github.com/farion1231/cc-switch/issues/8380));名字是中文的供应商导入后在编辑页保存不了([#8379](https://github.com/farion1231/cc-switch/issues/8379))。
|
||||
- **Hermes 开发版一直提示有新版本**([#8394](https://github.com/farion1231/cc-switch/issues/8394))。`0.22.1+238.g<sha>` 这类开发版版本号以前被当成正式版 `0.22.1` 去比较,`hermes update` 之后提示也不消失。现在开发版不再提示。
|
||||
- **WSL 里装了但运行报错的工具,被显示成「未安装」**([#8167](https://github.com/farion1231/cc-switch/pull/8167))。以前输出里只要有「not found」就判为未安装,例如「module not found」;现在只认 shell 的「找不到命令」。
|
||||
- **Codex 父会话里有一条乱码记录时,子代理用量一直统计不上**([#8360](https://github.com/farion1231/cc-switch/pull/8360))。现在跳过这条记录,其余正常统计。
|
||||
- **故障转移队列调整顺序后没变化,却提示成功**([#8297](https://github.com/farion1231/cc-switch/issues/8297))。队列里有两家排序值相同,或者新加的供应商没有排序值时,上移下移会写成相同的值。现在调整后的顺序一定会生效。
|
||||
- **Windows 上同一个项目因为盘符大小写不同,在会话管理里被拆成两组**([#8233](https://github.com/farion1231/cc-switch/issues/8233))。例如 `D:\projects\demo` 和 `d:\projects\demo`。现在会合成一组。
|
||||
- **OpenClaw 在配置 JSON 里改了请求头后,「发送 User-Agent」开关不跟着变**([#8256](https://github.com/farion1231/cc-switch/issues/8256))。
|
||||
|
||||
## 升级说明
|
||||
|
||||
**数据库结构没有变化**,仍然是 20。
|
||||
|
||||
- 用量页的「定价」页签移到了「设置」里;币种、侧栏「今日」和请求日志列的设置只保存在本机,不随云同步。
|
||||
- Claude Desktop 直连模式下,1M 模型的两行要等下次切换供应商或保存这张卡后才合成一行。
|
||||
- Gemini 4 Argon 的内置价格是 2026-11-30 前的介绍价,之后的正式价会在下一次价格更新里调整。
|
||||
|
||||
---
|
||||
|
||||
## 致谢
|
||||
|
||||
感谢 [@Vincebye](https://github.com/Vincebye)(含大写字母的自定义定价)、[@xianshang33](https://github.com/xianshang33)(OpenCode 速度估算)、[@HaiYangBG1](https://github.com/HaiYangBG1)(OpenCode 一键导入的两个问题)、[@Tsuki-hash](https://github.com/Tsuki-hash)(Hermes 开发版误报新版本)、[@Adonis0123](https://github.com/Adonis0123)(WSL 工具检测)、[@Carl723000](https://github.com/Carl723000)(Codex 父会话乱码记录)、[@Besty0728](https://github.com/Besty0728)(Gemini 4 Argon 定价)的贡献。
|
||||
|
||||
感谢 [@maq233](https://github.com/maq233)、[@CR547](https://github.com/CR547)、[@zqbake](https://github.com/zqbake)、[@Hybangbang](https://github.com/Hybangbang)、[@zhang3776813](https://github.com/zhang3776813)、[@zhangyudi-01](https://github.com/zhangyudi-01)、[@zsp1029](https://github.com/zsp1029)、[@hulkbig](https://github.com/hulkbig)、[@tarnish233](https://github.com/tarnish233) 报告问题、提供复现信息和修复思路。
|
||||
|
||||
完整的技术细节请见 [CHANGELOG](https://github.com/farion1231/cc-switch/blob/main/CHANGELOG.md)。
|
||||
Reference in new issue
Block a user