docs(release): add v3.19.2 release notes

This commit is contained in:
Jason
2026-08-06 12:21:00 +08:00
parent 425e932b7f
commit 43eaf07355
3 changed files with 915 additions and 0 deletions
+305
View File
@@ -0,0 +1,305 @@
# CC Switch v3.19.2
> The through-line of this release is **getting the numbers right and pinning down the boundaries**: Codex usage accounting fixes a defect that could count an interleaved-counter file several times over — new data is correct immediately after upgrading, and inflated history can be corrected with a one-time manual rebuild (see "Upgrade Notes"); a six-part security hardening pass caps every unbounded read across usage scripts, session logs, catalog files, and buffered proxy response bodies. The everyday conveniences are filled in too: the MCP / prompt / Skills panels can be searched, and MCP and Skills gain one-click per-app bulk toggles; the Auth Center shows each ChatGPT account's subscription usage; OMO users get a working integration back. With two write paths batched, backup imports, automatic sync, and usage re-imports no longer stall at every turn on large databases. This release has **no database migration**.
**[中文版 →](v3.19.2-zh.md) | [日本語版 →](v3.19.2-ja.md)**
---
## Highlights: What You Can Do Now
- **Get correct Codex usage numbers**: real-world logs contain files with interleaved counters — the same snapshot replayed by a gateway under changing rate-limit buckets, or two cumulative counters alternating — and the old algorithm treated both as new increments; files from the field measured six to eight times their true usage. The fix is validated by replaying nearly 1,900 real session files, landing within 0.001% of an independently recomputed ideal. Historical data is not rewritten automatically — see [Upgrade Notes](#inflated-historical-codex-usage-needs-a-one-time-manual-rebuild) for how to correct it.
- **Search directly inside the MCP, prompt, and Skills panels**: all three panels now have a search box; the per-app badges on the MCP and Skills lists also become three-state toggles that enable or disable an app across the whole list in one click ([#5954](https://github.com/farion1231/cc-switch/issues/5954) and [#5935](https://github.com/farion1231/cc-switch/issues/5935) both came straight from user requests).
- **Let current Claude Code releases enter a Copilot-takeover session directly**: current Claude Code shows a confirmation dialog for an unrecognized API key, with "No (recommended)" preselected — and the placeholder takeover used to write ran straight into it, leaving users looking at a signed-out session. Takeover now writes the `ANTHROPIC_AUTH_TOKEN` placeholder instead and enters with no dialog at all.
- **Keep managing OMO with CC Switch**: since OMO 4.19.3, configuration is unified into `~/.omo/omo.jsonc` and the legacy file is no longer read, so provider switches used to look successful while landing nowhere. CC Switch now detects the unified file (`omo.jsonc` or `omo.json`) and writes into its `"[opencode]"` section. The OMO form's model pickers also merge in the runtime models `opencode models` actually reports.
- **See each ChatGPT account's subscription usage in the Auth Center**: no more switching accounts one by one to check.
- **Stop hitting stalls on large databases**: backup exports move to batched INSERTs and sync restores to a single transaction — the per-row fsync was exactly what made automatic sync stall periodically; a full Codex usage re-import on a real corpus drops from 36.3 to 11.1 seconds (macOS), with a larger win on Windows.
- **See the tool calls a gateway swallowed instead of being silently left hanging**: when a third-party Chat gateway returned tool calls with missing function names, the transform layer used to drop them and still report the turn complete, so Codex quietly ended its loop. That case now fails loudly, and every drop site carries structured logging — problems like [#4341](https://github.com/farion1231/cc-switch/issues/4341) can finally be diagnosed from real traffic.
- **Make Hermes prompts actually take effect**: they are written to `~/.hermes/SOUL.md`, the file Hermes actually loads, instead of the `AGENTS.md` it never reads there.
- **Install Skills that used to fail**: repositories like ast-grep's, with a same-name wrapper directory, now install; skills.sh nested Skills no longer get 404 README links (existing records need a one-time reinstall, see [Upgrade Notes](#existing-nested-skill-records-need-a-one-time-reinstall)).
---
## Usage Guides
The changes in this release center on usage statistics and the extension-management panels. The following docs are worth reading alongside it:
- **[Usage Statistics](../user-manual/en/4-proxy/4.4-usage.md)**: the usage dashboard's data sources and how the statistics are counted — useful for understanding how the interleaved-counter over-count happened and when a manual rebuild is needed.
- **[MCP Management](../user-manual/en/3-extensions/3.1-mcp.md)** and **[Skills Management](../user-manual/en/3-extensions/3.3-skills.md)**: the two panels that gained search and bulk toggles.
---
> [!WARNING]
>
> ## Only Official Channels (Please Read)
>
> CC Switch is a **fully free and open-source** desktop app, and we **do not charge users any fees**. Please only obtain the software through the official channels listed below:
>
> | Channel | Only Official |
> | ------------------ | ------------------------------------------------------------------------------ |
> | Website | **[ccswitch.io](https://ccswitch.io)** |
> | Source | **[github.com/farion1231/cc-switch](https://github.com/farion1231/cc-switch)** |
> | Downloads | **[GitHub Releases](https://github.com/farion1231/cc-switch/releases)** |
> | Author | **[@farion1231](https://github.com/farion1231)** |
> | Report an Imposter | **[GitHub Issues](https://github.com/farion1231/cc-switch/issues)** |
>
> **Any "CC Switch" website or client that asks you for payment, top-ups, or login credentials is fake.** If you have been tricked into paying, stop the transaction immediately and file a report through GitHub Issues.
---
## Overview
CC Switch v3.19.2 is a correctness-focused maintenance release along three lines. The first is getting the numbers right: the Codex session importer could over-count usage several times over on files with interleaved counters ([#3011](https://github.com/farion1231/cc-switch/issues/3011)); this release switches to an algorithm that prefers each turn's explicit delta and recognizes replays by their full signature, closed out by replaying nearly 1,900 real session files; the backup and usage-import write paths are batched at the same time, markedly easing import stalls on large databases ([#2100](https://github.com/farion1231/cc-switch/issues/2100) will likely benefit).
The second is pinning down the boundaries: an externally contributed security hardening pass caps every unbounded read across the usage-script runtime, Grok session logs, Codex catalog files, and buffered proxy response bodies, and the deep-link import confirmation gains two credential fields it used to collect without displaying. The third is filling in the everyday conveniences: search across the MCP / prompt / Skills panels, bulk per-app toggles for MCP and Skills, per-account subscription usage in the Auth Center, and two OMO adaptations — the unified config and runtime models. On top of that come seven specific fixes covering Copilot sign-in, Hermes prompts, Skill installs, and more. This release has **no database schema migration** (the version stays at v16), so upgrading is light.
**Release date**: 2026-08-06
**Change size**: 24 commits | 109 files changed | +12,340 / -1,897 lines
---
## Added
### Management Panels: Search and Bulk Per-App Toggles
The MCP, prompt, and Skills panels share a new search box — Esc clears it, and it only intercepts the global back shortcut while it has content, so your usual habits are unaffected. The per-app count badges atop the MCP and Skills lists become three-state toggle buttons: one click enables or disables an app across the whole list — the days of flipping switches row by row are over ([#5954](https://github.com/farion1231/cc-switch/issues/5954), [#5935](https://github.com/farion1231/cc-switch/issues/5935)).
Bulk operations deliberately run **serially** rather than concurrently — each app's live config is a single file, and concurrent writes would overwrite each other; failed entries are collected and reported in one go. A bulk toggle acts on the **whole list**, not the search-filtered subset, avoiding the ambiguity of "thought I only toggled the filtered results, actual state unclear".
Two long-standing data-layer problems get fixed along the way: MCP toggles move from read-whole-row / modify in memory / write-whole-row to a single-column atomic UPDATE, so two apps toggled at nearly the same time no longer lose each other's updates; Skill updates re-confirm before writing that the record still exists with its install generation unchanged, so a slow update task can no longer resurrect a Skill that was just uninstalled. The search index is an explicit whitelist — environment variables and request headers **never** enter the searchable text.
### Auth Center: Per-Account Subscription Usage
Settings → Auth Center now shows each ChatGPT (Codex OAuth) account's subscription usage inline, reusing the query the provider card footer already runs — deduplicated by account, cached for five minutes, fetched once on mount with no polling. Multi-account users no longer have to switch around to check their quota. ([#4887](https://github.com/farion1231/cc-switch/pull/4887))
### OMO Model Pickers Merge In Runtime Models
The OMO form's model pickers used to offer only a static list; they now also run `opencode models` and merge in the models the locally installed OpenCode actually reports. The helper process is deliberately sandboxed: project-level config discovery is disabled and the working directory is pinned to the OpenCode config directory — opening a form can never execute some project's `.opencode/` plugins; the whole run has a 20-second deadline, after which the entire process tree is killed (process groups on macOS / Linux, `taskkill /T` on Windows, and an in-distro `timeout` for WSL installs). Any failure falls back to the static list with a toast. ([#5522](https://github.com/farion1231/cc-switch/pull/5522))
### Built-In Pricing for Qwen3.8 Max
`qwen3.8-max` is seeded at the official list price: $2 input / $6 output per million tokens, $0.25 cache read, $2.50 cache write (125% of input, the official explicit context-cache rate). Seeding is insert-if-absent, so a price you edited yourself is untouched. ([#6053](https://github.com/farion1231/cc-switch/pull/6053))
---
## Changed
### Partner Roster Maintenance
The NekoCode and Unity2.ai partner presets are removed from every app, the READMEs, and all locale files; the Qiniu preset's position in the ordering is adjusted.
---
## Fixed
### Codex Usage Over-Counted (Up to Several Times) When Counters Interleaved
The session importer used to derive deltas from a single high-water mark over cumulative totals — correct when a file carries one monotonic counter, but real-world logs contain two interleaved shapes: a gateway replaying the same **unchanged** snapshot under changing rate-limit buckets, and two genuinely distinct cumulative counters alternating. The old algorithm treated both replays and alternation as new increments; files from the field measured six to eight times their true usage.
The importer now prefers the explicit last-turn usage each event carries, and recognizes replays by their full token signature. Deduplication is deliberately narrow: a snapshot is compared only against **the same source's own previous signature** or **the immediately preceding token event** — never against other sources' older signatures, because a legitimate counter reset reproduces old values and a full-table scan would swallow it. The totals-only legacy format falls back to a single global baseline, with the same semantics as before.
The fix is validated by replaying nearly 1,900 real session files totalling 1.7 GB: within 0.001% of an independently recomputed ideal, with every residual difference being a legitimate recovery of a counter reset the old algorithm clamped away. Historical data is deliberately not rewritten — see "Upgrade Notes" for how to correct it. ([#3011](https://github.com/farion1231/cc-switch/issues/3011), [#3015](https://github.com/farion1231/cc-switch/issues/3015))
### Dropped Tool Calls No Longer Masquerade as a Completed Turn
Third-party Chat gateways occasionally return tool calls with **missing function names**; the Chat → Responses transform used to drop them silently and still report the turn `completed` — Codex saw a "successful turn with nothing left to do" and quietly ended its agent loop, turning a diagnosable upstream failure into a silent stall.
Now, when every tool call in a turn has been dropped and none remains usable, the streaming path emits `response.failed` and the non-streaming path reports a transform error; the check is gated on `status == "completed"`, so `finish_reason: length` truncation keeps its own `incomplete` semantics. All three drop sites log structured, content-free fields — call-id presence, argument byte counts, finish reason — so problems like [#4341](https://github.com/farion1231/cc-switch/issues/4341) can finally be diagnosed from real traffic. Turns with a valid tool call, text-only turns, and truncated turns behave as before.
### OMO's Configuration Was Written to a File It No Longer Reads
OMO 4.19.3 unified its configuration into `~/.omo/omo.jsonc` (then `omo.json`), and its migration renames the legacy per-app file out of the way. From then on CC Switch — which only knew the legacy path — kept writing a file outside OMO's config chain, so provider switches looked successful while landing nowhere ([#5945](https://github.com/farion1231/cc-switch/issues/5945)).
When the unified file is detected, the OpenCode configuration is now written into OMO's `"[opencode]"` section — and **only there**, because OMO validates its root schema strictly and discards the whole file over any unknown root key. Writes treat the document as JSON5: comments, key order, and line endings survive, and nothing is written when nothing changed; before every write, the result is re-parsed and compared semantically against the intent — if serialization would corrupt the document, the write is refused and the original file left untouched rather than saving a broken one (see "Upgrade Notes" for the known trigger). The same change also moves atomic file writes on Windows to `ReplaceFileW` for every managed app, closing the brief window in the old delete-then-rename sequence where the target file did not exist.
### Copilot Takeover Left Current Claude Code Signed Out
Current Claude Code releases show a confirmation dialog for an unrecognized API key, with "No (recommended)" preselected — and the `ANTHROPIC_API_KEY` placeholder Copilot takeover used to write ran straight into it: follow the recommendation and the key is ignored, leaving a signed-out session. Takeover now writes the `ANTHROPIC_AUTH_TOKEN` placeholder, entering with no dialog; a provider that explicitly selected the `ANTHROPIC_API_KEY` field in the form's advanced section keeps the old behavior. The Copilot forwarding path also gains the `[1M]` context-marker strip the other paths already had, so a `claude-*[1M]` model ID no longer reaches GitHub's API verbatim. ([#5832](https://github.com/farion1231/cc-switch/pull/5832))
### Hermes Prompts Were Written Under the Wrong File Name
The identity file Hermes loads from `~/.hermes/` is `SOUL.md`; it never looks for `AGENTS.md` there — that name is project-level context, discovered upward from the working directory. CC Switch's prompt management had written `~/.hermes/AGENTS.md` since the day Hermes support was added, so enabling a Hermes prompt produced a dead file. It now reads and writes `~/.hermes/SOUL.md`, and the existing back-fill still applies: a SOUL.md you wrote yourself is imported into the database before being replaced. ([#5777](https://github.com/farion1231/cc-switch/issues/5777))
### Skill Repositories With a Same-Name Wrapper Directory Would Not Install
Installing ast-grep's official Skill failed with "SKILL.md missing": that repository keeps a wrapper directory named after the Skill at its root, with the real Skill nested deeper, and the resolver returned the first directory whose name matched. Source resolution is now anchored on SKILL.md itself — a directory without one is never selected — which also fixes the phantom "update available" that update checks kept reporting against such repositories. ([#4141](https://github.com/farion1231/cc-switch/issues/4141))
### skills.sh Nested Skills Got 404 README Links
The skills.sh discovery flow reports only a Skill's basename; installation resolved the real nested directory, but the stored README link was still built from the basename guess — a 404 on click. The link is now generated from the directory the installer **actually resolved**. The fix applies to the install path only — records written by earlier versions need a one-time reinstall, see "Upgrade Notes". ([#6111](https://github.com/farion1231/cc-switch/issues/6111))
### Header Actions Were Clipped With Every App Enabled
With every app tab, the profile switcher, and the takeover toggles visible at once, the header overflowed and the add-provider button was clipped. Primary actions now live in a non-shrinking cluster, and the app switcher is width-aware: apps that no longer fit collapse into a "more" popover, with the active app always visible.
### The Route Status Animation Burned GPU in the Background
The route status indicator's pulse animation kept running while the window was unfocused, occupying the GPU for a purely decorative effect. Window focus now gates the heartbeat through a data attribute and CSS — an unfocused window freezes the animation at full opacity, and the system's reduced-motion preference disables it entirely. Data polling is unaffected; only the decoration pauses. ([#5767](https://github.com/farion1231/cc-switch/pull/5767))
---
## Security Hardening
### Every Unbounded Read Capped, No More Hidden Fields in the Confirmation
A six-part externally contributed hardening pass ([#5919](https://github.com/farion1231/cc-switch/pull/5919)):
- **Usage scripts get resource and time limits**: usage scripts can reach a machine via deep link or a synced database, and used to run on an unrestricted JS runtime — a single `while(true)` could hang the backend thread forever. The runtime now enforces a 5-second interrupt, a 16 MiB memory cap, and a 256 KiB stack cap.
- **Grok session-log reads get bounds**: files over 50 MiB are skipped, directory recursion is capped at 16 levels, and symlinks are no longer followed — a symlink cycle under `~/.grok/sessions` could previously overflow the stack.
- **The Codex model-catalog path is tightened**: `model_catalog_json` used to trust any absolute path on the file name alone; it must now resolve inside the Codex config directory — re-checked after `canonicalize`, so a symlink cannot escape — with a 32 MiB per-read cap.
- **Buffered proxy response bodies are capped**: bodies collected in full — non-streaming responses, error bodies, and whole-body validation paths — are capped at 128 MiB, accumulated as chunks arrive so the connection is dropped the moment the limit is crossed rather than after collection; streaming paths (passthrough and streamed transforms) are never buffered in full and carry no total cap.
- **Decompression is budgeted up front**: the quota sits on the decoder's read side, covering gzip, deflate, zstd, and brotli, so a compression bomb cannot expand unchecked; an over-limit response maps to a distinct 502 instead of being mistaken for a retryable network error.
- **The deep-link confirmation gains two fields**: the provider import confirmation used to parse and persist `usageAccessToken` and `usageUserId` without ever showing them; both now display before you approve, the token masked as usual.
---
## Performance
### Backups: Batched Exports, Single-Transaction Restores
Each direction had its own independent cost. On the **export side**, every row used to be its own INSERT, so importing a large backup had SQLite parsing, preparing, and destroying tens of thousands of statements one by one; exports now generate multi-row INSERTs in batches of 200 rows / 1 MB, cutting the statement count by two orders of magnitude and shrinking the backup file itself by roughly 4x. On the **restore side**, every WebDAV / S3 sync import ends by writing back the locally retained tables, and each row used to be its own implicit transaction — one full journal write and one fsync per row, exactly what made automatic sync stall the app periodically on large databases; the whole restore now runs in a single transaction.
Old single-row backups still import as before, and the new format is within what every SQLite shipped with the app supports — compatible in both directions across versions. The cross-machine import freeze reported in [#2100](https://github.com/farion1231/cc-switch/issues/2100) will likely ease — real-world results on that issue are welcome. ([#6122](https://github.com/farion1231/cc-switch/pull/6122))
### Full Codex Usage Re-Imports Are Roughly 3x Faster, More on Windows
A full re-import — triggered by importing a pre-v16 SQL backup, by cursor mismatches after a cross-machine restore, or by a manual rebuild — could pin a CPU core for minutes on a large corpus: every token event formed its own auto-commit transaction, paying a full journal create / fsync / delete cycle per row, and every archived file ran a cursor-inheritance query that could not use an index.
Events now commit in batches of 1,000, with the connection lock released between batches so UI queries can slip in; the cursor advances in the same transaction as the final batch, so a crash can never leave it ahead of the data; cursors and model pricing are preloaded once per pass, and hot statements use the prepared-statement cache. A real corpus of 1,920 files / 1.7 GB drops from 36.3 to 11.1 seconds on macOS (release build); on Windows, where each per-row fsync costs milliseconds, the absolute win is an order of magnitude larger. Replaying the same corpus before and after verifies equivalence: 82,000 imported rows are byte-identical across all exported columns, with identical import / skip counts.
---
## Upgrade Notes
### No Database Migration in This Release
v3.19.2 contains no schema migration (the version stays at v16), triggers no pre-upgrade backup, and is ready to use immediately.
### Inflated Historical Codex Usage Needs a One-Time Manual Rebuild
The interleaved-counter fix **only guarantees correctness going forward**: historical rows are deliberately not rewritten, and there is no automatic rebuild. If your dashboard's Codex numbers look impossibly high and your session files carry the interleaved shape, go to **Usage page → Codex usage maintenance → "Rebuild Codex usage"** once after upgrading — the database is backed up automatically before the rebuild; history whose session logs were already deleted cannot be re-imported. This release's import speedup makes the rebuild roughly 3x faster than before.
Most installations are unaffected: on data without the interleaved shape, the old and new algorithms differ by less than one part in a thousand.
### Existing Nested-Skill Records Need a One-Time Reinstall
An existing Skill installed through skills.sh whose README link 404s recovers the correct link after an uninstall and reinstall; an in-place "update" will not rewrite it.
### The First Sync After Upgrading Re-Uploads the Backup File Once
The backup dump format changed, and the sync protocol treats it as an opaque artifact hashed as a whole, so the first WebDAV / S3 sync after upgrading re-transfers `db.sql` in full — one-time and harmless.
### The Copilot Placeholder Takes Effect on the Next Takeover Write
The `AUTH_TOKEN` placeholder takes effect the next time takeover rewrites the live config — switch providers or restart takeover. Providers that explicitly selected the `ANTHROPIC_API_KEY` field in the form's advanced section are unaffected; your choice is preserved as is.
### OMO Unified Config Is Detected by File Presence
The decision is based on whether the file exists, not on the OMO version: when `~/.omo/omo.jsonc` (or `omo.json`) exists, it is edited in place; when neither exists, the legacy OpenCode-layer file is written as before. Known limitation: if the unified file contains **block comments** (`/* … */`), writes fail with an error to protect the document — line comments (`//`) are unaffected. Until the upstream JSON5 writer is fixed, remove block comments before switching providers.
### Bulk Toggles Act on the Whole List
The management panels' bulk per-app toggles act on every entry, not the search-filtered subset.
### Buffered Proxy Response Bodies Are Capped at 128 MiB
Proxy responses that must be buffered in full — non-streaming responses and error bodies — fail with a 502 above 128 MiB instead of being forwarded; streamed passthrough responses are unaffected. A normal LLM response is a few MB at most, so the cap only triggers on upstream anomalies; such a failure terminates the request and does not trigger failover to the next address.
---
## Risk Notice
### Carried-Over Notices
**xAI Grok OAuth sign-in**: reuses the public OAuth client identity of the official Grok CLI; using it could lead to account restriction or suspension — see the [v3.18.0 release notes](v3.18.0-en.md#risk-notice) for details.
**Codex OAuth reverse proxy**: using a ChatGPT subscription's Codex OAuth through a reverse proxy may violate OpenAI's terms of service. See the [v3.13.0 release notes](v3.13.0-en.md#-risk-notice) for details.
**SuperGrok quota queries**: the quota display on provider cards depends on a non-public billing endpoint at grok.com and may stop working once xAI changes the interface — see the [v3.19.0 release notes](v3.19.0-en.md#risk-notice) for details.
**Third-party provider routing**: when the CC Switch local proxy converts and forwards Codex, Claude Desktop, or Grok Build requests to a third-party provider, each provider has different constraints on billing, compliance, and data retention. Please read the target provider's terms of service before use.
By enabling these features, users accept the associated risks. CC Switch is not responsible for any account restriction, warning, or service suspension resulting from their use.
---
## Thanks
Thirteen of this release's 24 commits are PRs from outside contributors — nine of them, covering nearly every main line from the headline usage fix to the security hardening.
### Code Contributions
- [#5854](https://github.com/farion1231/cc-switch/pull/5854): the Codex interleaved-counter usage fix — this release's headline. Thanks to @MJYKIM99, who arrived with real-file evidence and polished the fix through three review rounds until the full replay converged; thanks also to @ayanamislover for independently replaying their own interleaved files, corroborating our validation.
- [#5919](https://github.com/farion1231/cc-switch/pull/5919), [#6122](https://github.com/farion1231/cc-switch/pull/6122), [#6119](https://github.com/farion1231/cc-switch/pull/6119): the six-part security hardening, the backup performance overhaul, and the skills.sh README fix. Thanks to @zayokami — the "Security Hardening" and "Performance" chapters of this release are largely these three pieces of work.
- [#6011](https://github.com/farion1231/cc-switch/pull/6011), [#5522](https://github.com/farion1231/cc-switch/pull/5522), [#5767](https://github.com/farion1231/cc-switch/pull/5767): the OMO unified-config adaptation, runtime model discovery, and the route-status GPU fix. Thanks to @allenxu09.
- [#5967](https://github.com/farion1231/cc-switch/pull/5967): the management panels' search and bulk toggles, fixing two long-standing data-layer concurrency problems along the way. Thanks to @YUZHEthefool — who also collaborated on #6119 to converge that fix to its minimal shape.
- [#4887](https://github.com/farion1231/cc-switch/pull/4887): per-account subscription usage in the Auth Center. Thanks to @SaladDay.
- [#5832](https://github.com/farion1231/cc-switch/pull/5832): Copilot takeover compatibility with current Claude Code. Thanks to @Suaig.
- [#5779](https://github.com/farion1231/cc-switch/pull/5779): the Hermes prompt file-name fix. Thanks to @mmm-05610 — from the report [#5777](https://github.com/farion1231/cc-switch/issues/5777) to the submitted fix, one person end to end.
- [#4153](https://github.com/farion1231/cc-switch/pull/4153): anchoring Skill source-directory resolution on SKILL.md. Thanks to @makoMakoGo.
- [#6053](https://github.com/farion1231/cc-switch/pull/6053): built-in pricing for Qwen3.8 Max. Thanks to @mhy1227.
### Issue Reports
- Thanks to @KeShih for pinpointing in [#3011](https://github.com/farion1231/cc-switch/issues/3011) that `total_token_usage` is non-monotonic and that replays were being counted as new increments — the problem definition behind this release's headline fix comes straight from that report; @KeShih also proposed the repair direction early in [#3015](https://github.com/farion1231/cc-switch/issues/3015).
- Thanks to @Syuryuuki for reporting the missing OMO unified-config adaptation ([#5945](https://github.com/farion1231/cc-switch/issues/5945)), @abcfy2 for the ast-grep Skill install failure ([#4141](https://github.com/farion1231/cc-switch/issues/4141)), and @mortalBibo for the skills.sh nested-Skill 404 links ([#6111](https://github.com/farion1231/cc-switch/issues/6111)).
- Thanks to @kith13 ([#5954](https://github.com/farion1231/cc-switch/issues/5954)) and @Getianyu1998 ([#5935](https://github.com/farion1231/cc-switch/issues/5935)) — the management panels' search and bulk toggles came straight from these two suggestions.
---
## Download & Install
Visit [Releases](https://github.com/farion1231/cc-switch/releases/latest) and download the build for your system, or get it from the official site [ccswitch.io](https://ccswitch.io) (downloads are distributed through Cloudflare edge nodes and do not depend on GitHub being reachable).
### System Requirements
| System | Minimum Version | Architecture |
| ------- | -------------------- | ----------------------------------- |
| Windows | Windows 10 and later | x64 / ARM64 |
| macOS | macOS 12 (Monterey)+ | Intel (x64) / Apple Silicon (arm64) |
| Linux | See table below | x64 / ARM64 |
### Windows
| File | Description |
| ---------------------------------------- | ------------------------------------------------ |
| `CC-Switch-v3.19.2-Windows.msi` | **Recommended** - MSI installer with auto-update |
| `CC-Switch-v3.19.2-Windows-Portable.zip` | Portable build, unzip and run |
Windows ARM64 devices should pick the artifact whose file name carries the `arm64` tag.
### macOS
| File | Description |
| -------------------------------- | ----------------------------------------------------- |
| `CC-Switch-v3.19.2-macOS.dmg` | **Recommended** - DMG installer, drag to Applications |
| `CC-Switch-v3.19.2-macOS.zip` | Unzip and drag to Applications, Universal Binary |
| `CC-Switch-v3.19.2-macOS.tar.gz` | For Homebrew install and auto-update |
Homebrew install:
```bash
brew install --cask cc-switch
```
Upgrade:
```bash
brew upgrade --cask cc-switch
```
### Linux
Linux assets are available for both **x86_64** and **ARM64** (`aarch64`). Choose the file whose architecture tag matches your machine's `uname -m` output:
- `CC-Switch-v3.19.2-Linux-x86_64.AppImage` / `.deb` / `.rpm`
- `CC-Switch-v3.19.2-Linux-arm64.AppImage` / `.deb` / `.rpm`
| Distribution | Recommended Format | Install Command |
| --------------------------------------- | ------------------ | ---------------------------------------------------------------------- |
| Ubuntu / Debian / Linux Mint / Pop!\_OS | `.deb` | `sudo dpkg -i CC-Switch-*.deb` or `sudo apt install ./CC-Switch-*.deb` |
| Fedora / RHEL / CentOS / Rocky Linux | `.rpm` | `sudo rpm -i CC-Switch-*.rpm` or `sudo dnf install ./CC-Switch-*.rpm` |
| openSUSE | `.rpm` | `sudo zypper install ./CC-Switch-*.rpm` |
| Arch Linux / Manjaro | `.AppImage` | Make executable and run directly, or use AUR |
| Other distributions / unsure | `.AppImage` | `chmod +x CC-Switch-*.AppImage && ./CC-Switch-*.AppImage` |
+305
View File
@@ -0,0 +1,305 @@
# CC Switch v3.19.2
> 本リリースの主軸は**数字を正しくし、境界を固めること**です。Codex の使用量統計では、カウンターが交錯したファイルを数倍に計上してしまう欠陥を修正しました——アップグレード後の新しいデータは直ちに正しくなり、過去の水増しは手動での 1 回の再構築で正常化できます(「アップグレード時の注意」を参照)。6 項目のセキュリティ強化により、使用量スクリプト・セッションログ・カタログファイル・プロキシがバッファするレスポンスボディの無制限読み取りをすべて上限で抑えました。日常の使い勝手も補いました。MCP / プロンプト / Skills パネルで検索ができるようになり、MCP と Skills はアプリ単位の一括切り替えにも対応。認証センターは ChatGPT アカウントごとのサブスクリプション使用量を表示し、OMO ユーザーは動作する連携を取り戻します。2 つの書き込み経路のバッチ化により、大きなデータベースでのバックアップのインポート・自動同期・使用量の再インポートが頻繁に固まることはなくなりました。本リリースに**データベースマイグレーションはありません**。
**[English →](v3.19.2-en.md) | [中文版 →](v3.19.2-zh.md)**
---
## ハイライト:本リリースでできること
- **正しい Codex の使用量を得る**:実際のログにはカウンターが交錯したファイルが存在します——同じスナップショットをゲートウェイがレート制限バケットを変えながら繰り返し再送するもの、あるいは 2 つの累計カウンターが交互に現れるものです——旧アルゴリズムはこれらを新しい増分として扱い、現場のファイルでは実測で 6〜8 倍の水増しがありました。修正は約 1,900 件の実セッションファイルのリプレイで検証済みで、独立に再計算した理想値との差は 0.001% です。過去のデータが自動で書き換えられることはありません。正常化の方法は[アップグレード時の注意](#codex-の過去の使用量の水増しは手動で-1-回再構築が必要です)を参照してください。
- **MCP・プロンプト・Skills パネルで直接検索する**:3 つのパネルに検索ボックスが付きました。MCP と Skills の一覧にあるアプリバッジは 3 状態のトグルにもなり、あるアプリを一覧全体でまとめて有効化・無効化できます([#5954](https://github.com/farion1231/cc-switch/issues/5954) と [#5935](https://github.com/farion1231/cc-switch/issues/5935) はいずれもユーザーの声から生まれました)。
- **新しい Claude Code で Copilot 引き継ぎのセッションにそのまま入る**:新しい Claude Code は未知の API キーに対して確認ダイアログを表示し、既定で「No (recommended)」が選ばれています。これまで引き継ぎが書き込んでいたプレースホルダーはちょうどこれに当たってしまい、ユーザーの目の前には未ログインのセッションがありました。現在は `ANTHROPIC_AUTH_TOKEN` のプレースホルダーを書き込み、ダイアログなしでそのまま入れます。
- **CC Switch で OMO を管理し続ける**OMO 4.19.3 から設定は `~/.omo/omo.jsonc` に統一され、旧ファイルは読まれなくなりました。これまでのプロバイダ切り替えは成功したように見えて、実際にはすべて空振りでした。現在は統一設定ファイル(`omo.jsonc` または `omo.json`)を検出すると、その `"[opencode]"` セクションに書き込みます。OMO フォームのモデル選択には、`opencode models` が実際に報告するランタイムのモデルもマージされます。
- **認証センターで ChatGPT アカウントごとのサブスクリプション使用量を見る**:複数アカウントでも、切り替えながら 1 つずつ確認する必要はもうありません。
- **大きなデータベースで頻繁に固まらない**:バックアップのエクスポートはバッチ INSERT に、同期の復元は単一トランザクションになりました——行ごとの fsync こそが自動同期の周期的な固まりの元凶でした。Codex 使用量の全量再インポートは実コーパスで 36.3 秒から 11.1 秒に短縮(macOS)、Windows ではさらに大きく縮まります。
- **ゲートウェイに握りつぶされたツール呼び出しを、静かに放置されるのではなく見えるようにする**:サードパーティの Chat ゲートウェイが関数名のないツール呼び出しを返した場合、変換層はこれまでそれらを捨てたうえで「このターンは完了」と報告し、Codex はそのまま静かにループを終えていました。現在この状況は明確にエラーとなり、破棄箇所には構造化ログが付くため、[#4341](https://github.com/farion1231/cc-switch/issues/4341) のような問題をようやく実トラフィックから診断できます。
- **Hermes のプロンプトを本当に効かせる**:Hermes が実際に読み込む `~/.hermes/SOUL.md` に書き込みます。読まれることのない `AGENTS.md` ではありません。
- **これまで入らなかった Skill をインストールする**:ast-grep のような同名のラッパーディレクトリを持つリポジトリがインストールできるようになりました。skills.sh の入れ子 Skill の README リンクも 404 ではなくなります(既存レコードの回復には 1 回の再インストールが必要です。[アップグレード時の注意](#入れ子の-skill-の既存レコードは-1-回再インストールが必要です)を参照)。
---
## 利用ガイド
本リリースの変更は使用量統計と拡張管理パネルに集中しています。以下のドキュメントとあわせてお読みください:
- **[使用量統計](../user-manual/ja/4-proxy/4.4-usage.md)**:使用量ダッシュボードのデータソースと集計基準。交錯カウンターの多重計上がどう起きたか、どのような場合に手動での再構築が必要かを理解する助けになります。
- **[MCP 管理](../user-manual/ja/3-extensions/3.1-mcp.md)** と **[Skills 管理](../user-manual/ja/3-extensions/3.3-skills.md)**:新しい検索と一括切り替えが加わった 2 つのパネルです。
---
> [!WARNING]
>
> ## 唯一の公式チャネル(必ずお読みください)
>
> CC Switch は**完全に無料・オープンソース**のデスクトップアプリで、**ユーザーから料金を徴収することはありません**。本ソフトウェアは下記の公式チャネルからのみ入手してください:
>
> | チャネル | 唯一の公式 |
> | ------------ | ------------------------------------------------------------------------------ |
> | 公式サイト | **[ccswitch.io](https://ccswitch.io)** |
> | ソースコード | **[github.com/farion1231/cc-switch](https://github.com/farion1231/cc-switch)** |
> | ダウンロード | **[GitHub Releases](https://github.com/farion1231/cc-switch/releases)** |
> | 作者 | **[@farion1231](https://github.com/farion1231)** |
> | 偽サイト通報 | **[GitHub Issues](https://github.com/farion1231/cc-switch/issues)** |
>
> **料金請求・チャージ・認証情報の提供を求める「CC Switch」サイトやクライアントはすべて偽物です。** 支払いを誘導された場合は直ちに操作を中止し、GitHub Issues からご報告ください。
---
## 概要
CC Switch v3.19.2 は正確性を主眼としたメンテナンスリリースで、軸は 3 つあります。1 つ目は数字を正しくすることです。Codex のセッションインポーターはカウンターが交錯したファイルで使用量を数倍に計上することがありました([#3011](https://github.com/farion1231/cc-switch/issues/3011))。本リリースでは「各ターンの明示的な増分を優先し、完全な署名でリプレイを識別する」アルゴリズムに切り替え、約 1,900 件の実セッションファイルのリプレイ検証で締めくくりました。バックアップと使用量インポートの 2 つの書き込み経路も同時にバッチ化され、大きなデータベースでのインポートの固まりが大幅に緩和されます([#2100](https://github.com/farion1231/cc-switch/issues/2100) も改善が見込まれます)。
2 つ目は境界を固めることです。外部コントリビューターによるセキュリティ強化の一巡で、使用量スクリプトのランタイム、Grok のセッションログ、Codex のカタログファイル、プロキシがバッファするレスポンスボディの無制限読み取りをすべて上限で抑え、ディープリンクのインポート確認ダイアログには、これまで収集していながら表示していなかった 2 つの認証情報フィールドを追加しました。3 つ目は日常の使い勝手を補うことです。MCP / プロンプト / Skills の 3 パネルの検索、MCP と Skills のアプリ単位の一括切り替え、認証センターのアカウントごとのサブスクリプション使用量、そして OMO の統一設定とランタイムモデルの 2 つの適応です。このほか、Copilot のログイン、Hermes のプロンプト、Skill のインストールなど 7 件の個別の不具合修正があります。本リリースに**データベーススキーマのマイグレーションはなく**(バージョンは v16 のまま)、アップグレードは軽量です。
**リリース日**2026-08-06
**変更規模**24 commits | 109 files changed | +12,340 / -1,897 lines
---
## 追加機能
### 管理パネル:検索とアプリ単位の一括切り替え
MCP・プロンプト・Skills の 3 つのパネルに共通の検索ボックスが付きました——Esc でクリアでき、内容があるときだけグローバルの「戻る」ショートカットを横取りするため、普段の操作の癖に影響しません。MCP と Skills の一覧上部にあるアプリ別のカウントバッジは 3 状態のトグルボタンになりました。あるアプリを一覧全体でまとめて有効化・無効化でき、1 件ずつスイッチを切り替える日々は終わりです([#5954](https://github.com/farion1231/cc-switch/issues/5954)、[#5935](https://github.com/farion1231/cc-switch/issues/5935))。
一括操作は意図的に並行ではなく**直列で実行**します——各アプリのライブ設定は単一のファイルで、並行に書き込むと互いに上書きし合うためです。失敗した項目は集めてまとめて報告されます。一括切り替えは検索で絞り込んだ部分集合ではなく**一覧全体**に作用します。「絞り込んだ結果だけを切り替えたつもりが、実際の状態が不明」という曖昧さを避けるためです。
底層ではデータ層の古い問題も 2 つ修正しました。MCP の切り替えは「行全体を読み、メモリで変更し、行全体を書く」方式から単一カラムのアトミックな UPDATE に変わり、2 つのアプリをほぼ同時に切り替えても更新が失われなくなりました。Skill の更新は保存前にレコードがまだ存在しインストール世代が変わっていないことを再確認するため、遅い更新タスクがアンインストール直後の Skill を復活させることはもうできません。検索インデックスは明示的なホワイトリストで、環境変数とリクエストヘッダが検索対象のテキストに**入ることは決してありません**。
### 認証センター:アカウントごとのサブスクリプション使用量
設定 → 認証センターは、ChatGPT(Codex OAuth)の各アカウントのサブスクリプション使用量をインラインで表示するようになりました。プロバイダカードのフッターがすでに使っているクエリを再利用します——アカウント単位で重複を除き、5 分間キャッシュし、マウント時に 1 回だけ取得してポーリングしません。複数アカウントのユーザーが残量を見るために 1 つずつ切り替える必要はなくなりました。([#4887](https://github.com/farion1231/cc-switch/pull/4887)
### OMO のモデル選択にランタイムのモデルをマージ
OMO フォームのモデル選択はこれまで静的な一覧だけでした。現在は `opencode models` も実行し、ローカルにインストールされた OpenCode が実際に報告するモデルをマージします。この補助プロセスは意図的にサンドボックスに閉じ込めています。プロジェクトレベルの設定探索を無効化し、作業ディレクトリを OpenCode の設定ディレクトリに固定するため、フォームを開いただけでどこかのプロジェクトの `.opencode/` プラグインが実行されることはありません。全体は 20 秒の制限時間付きで、超過するとプロセスツリーごと終了します(macOS / Linux はプロセスグループ、Windows は `taskkill /T`、WSL はディストリビューション内の `timeout`)。失敗した場合はいずれも静的な一覧にフォールバックし、通知を表示します。([#5522](https://github.com/farion1231/cc-switch/pull/5522)
### Qwen3.8 Max の組み込み価格
`qwen3.8-max` を公式の定価で投入します。100 万 token あたり入力 $2 / 出力 $6、キャッシュ読み取り $0.25、キャッシュ書き込み $2.50(入力価格の 125%、公式の明示的なコンテキストキャッシュ料率)です。「存在しない場合のみ挿入」で投入されるため、自分で変更した価格は影響を受けません。([#6053](https://github.com/farion1231/cc-switch/pull/6053)
---
## 変更
### パートナー一覧のメンテナンス
NekoCode と Unity2.ai のパートナープリセットを、すべてのアプリ・README・言語ファイルから削除しました。七牛(Qiniu)プリセットの並び順も調整しています。
---
## 修正
### カウンターが交錯すると Codex の使用量が多重計上される問題(最大数倍)
セッションインポーターはこれまで、単一の高水位線から累計値の差分を取っていました——1 つのファイルに単調増加のカウンターが 1 つだけならこれで正しいのですが、実際のログには 2 つの交錯形態が存在します。ゲートウェイが同じ**変化していない**スナップショットをレート制限バケットを変えながら繰り返し再送するものと、本当に異なる 2 つの累計カウンターが交互に現れるものです。旧アルゴリズムはどちらの形態でも再送や交互出現を新しい増分として扱い、現場のファイルでは実測で 6〜8 倍の水増しがありました。
現在のインポーターは、各イベントが明示的に持つ「このターンの使用量」を優先して読み取り、完全な token 署名でリプレイを識別します。重複排除は意図的に狭くしてあります。スナップショットは**同じソース自身の直前の署名**か**直前の token イベント**とだけ比較します——他のソースの古い署名とは比較しません。正当なカウンターのリセットは古い数値を再現するため、テーブル全体を走査すると誤って飲み込んでしまうからです。累計値しか持たない旧形式は単一のグローバル基線にフォールバックし、意味はこれまでと同じです。
修正は約 1,900 件・計 1.7 GB の実セッションファイルのリプレイで検証しました。独立に再計算した理想値との差は 0.001% で、残る差分はすべて、旧アルゴリズムがカウンターのリセットを切り詰めて飲み込んでいたリクエストを、新アルゴリズムが正当に救い出したものです。過去のデータは意図的に書き換えません——正常化の方法は「アップグレード時の注意」を参照してください。([#3011](https://github.com/farion1231/cc-switch/issues/3011)、[#3015](https://github.com/farion1231/cc-switch/issues/3015)
### 破棄されたツール呼び出しが「ターン完了」を装わなくなりました
サードパーティの Chat ゲートウェイは、まれに**関数名のない**ツール呼び出しを返します。Chat → Responses の変換層はこれまでそれらを黙って破棄したうえ、そのターンを `completed` と報告していました——Codex には「成功したが何もすることがないターン」が見え、静かにエージェントループを終えていました。診断可能なはずの上流の障害が、無音の停止に変わっていたのです。
現在は、あるターンのツール呼び出しがすべて破棄され使えるものが 1 つも残らなかった場合、ストリーミング経路は `response.failed` を発行し、非ストリーミング経路は変換エラーを報告します。判定は `status == "completed"` に限定されるため、`finish_reason: length` の切り詰めは自身の `incomplete` の意味を保ちます。3 つの破棄箇所はいずれも、内容を含まない構造化フィールドを記録します——call id の有無、引数のバイト数、終了理由です——[#4341](https://github.com/farion1231/cc-switch/issues/4341) のような問題をようやく実トラフィックから診断できます。有効なツール呼び出しを含むターン、テキストのみのターン、切り詰められたターンの動作は変わりません。
### OMO の設定が、もう読まれないファイルに書き込まれていた問題
OMO 4.19.3 は設定を `~/.omo/omo.jsonc`(次いで `omo.json`)に統一し、移行時に旧来のアプリ別ファイルを改名して退避します。それ以降、旧パスしか知らない CC Switch は OMO の設定チェーンから外れたファイルに書き込み続けており、プロバイダの切り替えは成功したように見えて、実際にはすべて空振りでした([#5945](https://github.com/farion1231/cc-switch/issues/5945))。
現在は統一設定ファイルを検出すると、OpenCode の設定を OMO の `"[opencode]"` セクションに書き込みます——そして**ここにしか書きません**。OMO はルートのスキーマを厳格に検証し、未知のルートキーが 1 つでもあるとファイル全体を破棄するためです。書き込みはドキュメントを JSON5 として扱います。コメント・キーの順序・行末はそのまま保たれ、内容に変化がなければ書き込みません。さらに毎回の書き込み前に結果を再パースし、意図した内容と意味的に比較します——シリアライズがドキュメントを壊す場合、書き込みは拒否され、元のファイルはそのまま残ります。壊れたファイルを保存することは決してありません(既知の発生条件は「アップグレード時の注意」を参照)。同じ変更で、すべての受管アプリの Windows でのアトミック書き込みを `ReplaceFileW` に置き換え、旧来の「削除してから改名」の手順で対象ファイルが一瞬存在しなくなる窓を塞ぎました。
### Copilot 引き継ぎで新しい Claude Code がログイン状態に入れない問題
新しい Claude Code は未知の API キーに確認ダイアログを表示し、既定で「No (recommended)」が選ばれています——Copilot 引き継ぎがこれまで書き込んでいた `ANTHROPIC_API_KEY` のプレースホルダーはちょうどこれに当たっていました。推奨に従うとキーは無視され、ユーザーの前には未ログインのセッションが残ります。引き継ぎは現在 `ANTHROPIC_AUTH_TOKEN` のプレースホルダーを書き込み、ダイアログなしでそのまま入れます。プロバイダフォームの詳細設定で `ANTHROPIC_API_KEY` フィールドを明示的に選んでいるプロバイダは旧来の動作を保ちます。Copilot の転送経路には、他の経路がすでに持っていた `[1M]` コンテキストマーカーの除去も追加され、`claude-*[1M]` 形式のモデル ID がそのまま GitHub の API に送られることはなくなりました。([#5832](https://github.com/farion1231/cc-switch/pull/5832)
### Hermes のプロンプトのファイル名が間違っていた問題
Hermes が `~/.hermes/` から読み込む人格ファイルは `SOUL.md` で、そこで `AGENTS.md` を探すことはありません——後者はプロジェクトレベルのコンテキストで、作業ディレクトリから上に向かって探索されるものです。CC Switch のプロンプト管理は Hermes 対応を追加した日から `~/.hermes/AGENTS.md` を書いており、Hermes プロンプトを有効にしても生まれるのは読まれないファイルでした。現在は `~/.hermes/SOUL.md` を読み書きし、既存の取り込み機構もそのまま働きます。自分で書いた SOUL.md は、置き換えられる前にデータベースへ取り込まれます。([#5777](https://github.com/farion1231/cc-switch/issues/5777)
### 同名のラッパーディレクトリを持つ Skill リポジトリが入らない問題
ast-grep の公式 Skill をインストールすると「SKILL.md がない」と報告されていました。このリポジトリはルートに Skill と同名のラッパーディレクトリを持ち、本物の Skill はさらに深くに入れ子になっていますが、リゾルバーは名前が一致した最初のディレクトリを返していたのです。ソースディレクトリの解決は現在 SKILL.md 自体をアンカーとします——それを持たないディレクトリが選ばれることはありません——あわせて、この種のリポジトリで更新チェックが「常に更新あり」と報告し続ける幻の通知も直りました。([#4141](https://github.com/farion1231/cc-switch/issues/4141)
### skills.sh の入れ子 Skill の README リンクが 404 になる問題
skills.sh の発見フローは Skill の末端のディレクトリ名しか報告しません。インストール時には本物の入れ子ディレクトリを解決できていたのに、保存される README リンクは相変わらず名前からの推測で組み立てられており、開くと 404 でした。リンクは現在、インストーラーが**実際に解決したディレクトリ**から生成されます。修正はインストール経路のみに働きます——旧バージョンで書き込まれたレコードは 1 回再インストールしないと回復しません。「アップグレード時の注意」を参照してください。([#6111](https://github.com/farion1231/cc-switch/issues/6111)
### すべてのアプリを有効にするとヘッダのボタンが切れる問題
すべてのアプリタブ・プロファイル切り替え・引き継ぎスイッチを同時に表示するとヘッダが溢れ、「プロバイダを追加」ボタンが切れていました。主要な操作は縮まない領域に固定され、アプリ切り替えは幅を認識するようになりました。収まらないアプリは「その他」のポップオーバーに畳まれ、現在のアプリは常に見えています。
### ルート状態のアニメーションがバックグラウンドで GPU を浪費する問題
ルート状態インジケーターのパルスアニメーションは、ウィンドウのフォーカスが外れても動き続け、純粋な装飾のために GPU を占有していました。現在はウィンドウのフォーカスが data 属性と CSS を通じて鼓動を制御します——フォーカスが外れるとアニメーションは完全な不透明度で静止し、システムの「視覚効果を減らす」設定では完全に無効になります。データのポーリングは影響を受けません。止まるのは装飾だけです。([#5767](https://github.com/farion1231/cc-switch/pull/5767)
---
## セキュリティ強化
### 無制限読み取りをすべて上限で抑え、確認ダイアログはフィールドを隠さない
外部コントリビューターによる 6 項目の強化です([#5919](https://github.com/farion1231/cc-switch/pull/5919)):
- **使用量スクリプトにリソースと時間の制限**:使用量スクリプトはディープリンクや同期されたデータベース経由でマシンに到達しえますが、これまで制限のない JS ランタイムで動いており、`while(true)` の 1 行でバックエンドのスレッドを永久に固められました。ランタイムは現在、5 秒での中断、16 MiB のメモリ上限、256 KiB のスタック上限を強制します。
- **Grok セッションログの読み取りに境界**:50 MiB を超えるファイルはスキップし、ディレクトリの再帰は 16 階層まで、シンボリックリンクはたどりません——`~/.grok/sessions` 配下のシンボリックリンクの環は、これまでスタックオーバーフローを起こせました。
- **Codex モデルカタログのパスを制限**:`model_catalog_json` はこれまでファイル名だけを見て任意の絶対パスを信頼していました。現在は Codex の設定ディレクトリの中に解決されることが必須で——`canonicalize` の後にも再チェックするためシンボリックリンクでは抜け出せません——1 回の読み取りは 32 MiB が上限です。
- **プロキシがバッファするレスポンスボディに上限**:全体を収集するボディ——非ストリーミングのレスポンス、エラーレスポンス、全体の検証が必要な経路——は 128 MiB が上限で、チャンクの到着時に逐次加算し、上限を超えた瞬間に接続を切断します。収集し終えてから比較するのではありません。ストリーミング経路(透過転送とストリーミング変換)はもともと全体をバッファしないため、総量の上限はありません。
- **展開の予算を前置**:展開の上限はデコーダーの読み取り側に置かれ、gzip・deflate・zstd・brotli をすべてカバーします。圧縮爆弾が無制御に膨張することはできません。上限を超えたレスポンスは独立した 502 に対応付けられ、再試行可能なネットワークエラーと誤判定されることはありません。
- **ディープリンクの確認ダイアログに 2 つのフィールドを追加**:プロバイダのインポート確認はこれまで `usageAccessToken``usageUserId` を解析・保存しながら一度も表示していませんでした。現在はどちらも承認前に表示され、トークンは通常どおりマスクされます。
---
## パフォーマンス
### バックアップ:エクスポートをバッチ化、復元を単一トランザクションに
2 つの方向にはそれぞれ独立したコストがありました。**エクスポート側**はこれまで 1 行ごとに 1 つの INSERT で、大きなバックアップのインポートでは SQLite が数万の文を 1 つずつ解析・準備・破棄していました。現在は 200 行 / 1 MB を 1 バッチとして複数行の INSERT を生成し、文の数は 2 桁減り、バックアップファイル自体も約 4 分の 1 に縮みます。**復元側**では、WebDAV / S3 の同期インポートのたびにローカル保持のテーブルを書き戻しますが、これまでは 1 行ごとが暗黙のトランザクションでした——1 行につき完全なジャーナル書き込みと fsync を 1 回ずつ払っており、これこそが大きなデータベースで自動同期が周期的にアプリを固める元凶でした。現在は復元全体が単一のトランザクションで完了します。
旧形式の 1 行ずつのバックアップは従来どおりインポートでき、新形式もアプリに同梱されるすべての SQLite のサポート範囲内で、バージョン間で双方向に互換です。[#2100](https://github.com/farion1231/cc-switch/issues/2100) で報告されたマシン間インポートの固まりはこれで緩和される可能性が高いです——実際の結果を同 issue にお寄せください。([#6122](https://github.com/farion1231/cc-switch/pull/6122)
### Codex 使用量の全量再インポートが約 3 倍高速化、Windows ではさらに
全量の再インポート——v16 より前の SQL バックアップの取り込み、マシン間復元後のカーソル不一致、手動の再構築で発生します——は、大きなコーパスで CPU コアを数分間占有していました。token イベントの 1 つ 1 つが自動コミットのトランザクションを構成し、1 行ごとにジャーナルの作成 / fsync / 削除のサイクルを丸ごと払い、さらにアーカイブファイルごとにインデックスの効かないカーソル継承クエリを実行していたためです。
現在はイベントを 1,000 件ずつのバッチでコミットし、バッチ間で接続ロックを解放するため UI のクエリが割り込めます。カーソルは最後のバッチと同じトランザクション内で前進するため、クラッシュしてもカーソルがデータより先行することは決してありません。カーソルとモデル価格はパスごとに 1 回先読みされ、頻出の文はプリペアドステートメントのキャッシュを使います。1,920 件 / 1.7 GB の実コーパスは macOSrelease ビルド)で 36.3 秒から 11.1 秒に短縮。Windows では 1 行ごとの fsync に数ミリ秒かかるため、絶対的な短縮幅は 1 桁大きくなります。変更の前後で同じコーパスをリプレイして等価性を検証済みです。82,000 行のインポート結果はすべてのエクスポート列でバイト単位に一致し、インポート / スキップの件数も完全に同じです。
---
## アップグレード時の注意
### 本リリースにデータベースマイグレーションはありません
v3.19.2 にスキーマのマイグレーションは含まれず(バージョンは v16 のまま)、アップグレード前のバックアップも発生しないため、そのまますぐに利用できます。
### Codex の過去の使用量の水増しは手動で 1 回再構築が必要です
交錯カウンターの修正が保証するのは**今後の正しさだけ**です。過去の行は意図的に書き換えず、自動の再構築もありません。ダッシュボードの Codex の数字が明らかに高すぎ、セッションファイルに交錯の形態がある場合は、アップグレード後に**使用量ページ → Codex 使用量のメンテナンス →「Codex 使用量を再構築」**で 1 回だけ手動で再構築してください——再構築の前にデータベースは自動でバックアップされます。削除済みのセッションログに対応する過去の分は再インポートできません。本リリースのインポート高速化により、この再構築は従来より約 3 倍速くなっています。
ほとんどのインストールは影響を受けません。交錯の形態を含まないデータでは、新旧アルゴリズムの差は 1,000 分の 1 以内です。
### 入れ子の Skill の既存レコードは 1 回再インストールが必要です
skills.sh 経由でインストールされ README リンクが 404 になっている既存の Skill は、アンインストールして再インストールすれば正しいリンクに戻ります。その場での「更新」ではリンクは書き換わりません。
### アップグレード後の初回同期でバックアップファイルが 1 回丸ごと再転送されます
バックアップの dump の形式が変わり、同期プロトコルはこれを全体のハッシュで扱う不透明な成果物と見なすため、アップグレード後の最初の WebDAV / S3 同期では `db.sql` が丸ごと再転送されます——1 回きりで、害はありません。
### Copilot のプレースホルダーは次回の引き継ぎ書き込みで有効になります
`AUTH_TOKEN` のプレースホルダーは、引き継ぎが次にライブ設定を書き換えるときに有効になります——プロバイダを切り替えるか、引き継ぎを再起動してください。プロバイダフォームの詳細設定で `ANTHROPIC_API_KEY` フィールドを明示的に選んだプロバイダは影響を受けず、選択はそのまま保たれます。
### OMO の統一設定はファイルの存在で判定します
判定の根拠はファイルが存在するかどうかであり、OMO のバージョンではありません。`~/.omo/omo.jsonc`(または `omo.json`)が存在すればその場で編集し、どちらも存在しなければ従来どおり旧来の OpenCode 層のファイルに書き込みます。既知の制限:統一設定ファイルに**ブロックコメント**(`/* … */`)が含まれると、ドキュメント保護のため書き込みはエラーで拒否されます——行コメント(`//`)は影響を受けません。上流の JSON5 ライターが修正されるまでは、プロバイダを切り替える前にブロックコメントを取り除いてください。
### 一括切り替えは一覧全体に作用します
管理パネルの一括アプリ切り替えは、検索で絞り込んだ部分集合ではなく、すべての項目に作用します。
### プロキシがバッファするレスポンスボディの上限は 128 MiB です
全体のバッファが必要なプロキシレスポンス——非ストリーミングのレスポンスとエラーレスポンス——は、128 MiB を超えると転送されず 502 で失敗します。透過転送のストリーミングレスポンスは影響を受けません。通常の LLM レスポンスは大きくても数 MB なので、この上限に達するのは上流の異常時だけです。この失敗はリクエストを終了させ、次のアドレスへのフェイルオーバーは発生しません。
---
## リスク通知
### 継続してお伝えしている注意事項
**xAI Grok OAuth サインイン**:公式 Grok CLI の公開 OAuth クライアント識別情報を再利用しており、利用によってアカウントの制限や停止につながる恐れがあります——詳細は [v3.18.0 release notes](v3.18.0-ja.md#リスク通知) を参照してください。
**Codex OAuth リバースプロキシ**:ChatGPT サブスクリプションの Codex OAuth をリバースプロキシ経由で使用すると、OpenAI の利用規約に違反する可能性があります。詳細は [v3.13.0 release notes](v3.13.0-ja.md#-リスクに関する注意事項) を参照してください。
**SuperGrok の残量照会**:プロバイダカードの残量表示は grok.com の非公開の課金エンドポイントに依存しており、xAI がインターフェースを変更すると機能しなくなる可能性があります——詳細は [v3.19.0 release notes](v3.19.0-ja.md#リスク通知) を参照してください。
**サードパーティプロバイダへのルーティング**:CC Switch のローカルプロキシで Codex・Claude Desktop・Grok Build のリクエストを変換してサードパーティのプロバイダへ転送する場合、課金・コンプライアンス・データ保持に関する制約はプロバイダごとに異なります。利用前に対象プロバイダの利用規約をお読みください。
上記の機能を有効にした時点で、ユーザーは関連するリスクを自ら引き受けることになります。CC Switch は、これらの機能の利用に起因するアカウントの制限・警告・サービス停止について、一切の責任を負いません。
---
## 謝辞
本リリースの 24 コミットのうち 13 は外部コントリビューターの PR です——9 名のコントリビューターが、使用量のヘッドライン修正からセキュリティ強化まで、ほぼすべての主軸をカバーしました。
### コード貢献
- [#5854](https://github.com/farion1231/cc-switch/pull/5854):Codex の交錯カウンター使用量修正——本リリースのヘッドラインです。@MJYKIM99 さんに感謝します。実ファイルの証拠を携えて登場し、レビューに沿って 3 巡の磨き込みを経て全量リプレイの収束まで到達しました。また、自身の交錯ファイルで独立にリプレイし、こちらの検証と突き合わせてくださった @ayanamislover さんにも感謝します。
- [#5919](https://github.com/farion1231/cc-switch/pull/5919)、[#6122](https://github.com/farion1231/cc-switch/pull/6122)、[#6119](https://github.com/farion1231/cc-switch/pull/6119):6 項目のセキュリティ強化、バックアップ性能の改造、skills.sh の README 修正。@zayokami さんに感謝します——本リリースの「セキュリティ強化」と「パフォーマンス」の 2 章は、大半がこの 3 つの仕事です。
- [#6011](https://github.com/farion1231/cc-switch/pull/6011)、[#5522](https://github.com/farion1231/cc-switch/pull/5522)、[#5767](https://github.com/farion1231/cc-switch/pull/5767):OMO 統一設定への適応、ランタイムモデルの発見、ルート状態アニメーションの GPU 修正。@allenxu09 さんに感謝します。
- [#5967](https://github.com/farion1231/cc-switch/pull/5967):管理パネルの検索と一括切り替え、あわせてデータ層の並行性の古い問題を 2 つ修正。@YUZHEthefool さんに感謝します——#6119 でも協力し、修正を最小の形に収束させました。
- [#4887](https://github.com/farion1231/cc-switch/pull/4887):認証センターのアカウントごとのサブスクリプション使用量。@SaladDay さんに感謝します。
- [#5832](https://github.com/farion1231/cc-switch/pull/5832)Copilot 引き継ぎの新しい Claude Code への対応。@Suaig さんに感謝します。
- [#5779](https://github.com/farion1231/cc-switch/pull/5779):Hermes プロンプトのファイル名修正。@mmm-05610 さんに感謝します——報告の [#5777](https://github.com/farion1231/cc-switch/issues/5777) から修正の提出まで、お一人で完結させました。
- [#4153](https://github.com/farion1231/cc-switch/pull/4153):Skill のソースディレクトリを SKILL.md をアンカーとして解決。@makoMakoGo さんに感謝します。
- [#6053](https://github.com/farion1231/cc-switch/pull/6053)Qwen3.8 Max の組み込み価格。@mhy1227 さんに感謝します。
### 問題報告
- [#3011](https://github.com/farion1231/cc-switch/issues/3011) で「`total_token_usage` が単調増加ではない / 再送が新しい増分として扱われている」と正確に指摘してくださった @KeShih さんに感謝します——本リリースのヘッドライン修正の問題定義はこの報告から直接来ており、[#3015](https://github.com/farion1231/cc-switch/issues/3015) では修正の方向性も先んじて提案してくださいました。
- OMO 統一設定が未対応であることを報告してくださった @Syuryuuki さん([#5945](https://github.com/farion1231/cc-switch/issues/5945))、ast-grep の Skill が入らないことを報告してくださった @abcfy2 さん([#4141](https://github.com/farion1231/cc-switch/issues/4141))、skills.sh の入れ子 Skill のリンクが 404 になることを報告してくださった @mortalBibo さん([#6111](https://github.com/farion1231/cc-switch/issues/6111))に感謝します。
- @kith13 さん([#5954](https://github.com/farion1231/cc-switch/issues/5954))と @Getianyu1998 さん([#5935](https://github.com/farion1231/cc-switch/issues/5935))に感謝します——管理パネルの検索と一括切り替えは、この 2 つの提案から生まれました。
---
## ダウンロードとインストール
[Releases](https://github.com/farion1231/cc-switch/releases/latest) から、お使いのシステムに対応するビルドをダウンロードするか、公式サイト [ccswitch.io](https://ccswitch.io) から入手してください(ダウンロードは Cloudflare のエッジノード経由で配信され、GitHub への到達性に依存しません)。
### システム要件
| システム | 最低バージョン | アーキテクチャ |
| -------- | ------------------------ | ----------------------------------- |
| Windows | Windows 10 以降 | x64 / ARM64 |
| macOS | macOS 12 (Monterey) 以降 | Intel (x64) / Apple Silicon (arm64) |
| Linux | 下表を参照 | x64 / ARM64 |
### Windows
| ファイル | 説明 |
| ---------------------------------------- | -------------------------------------------- |
| `CC-Switch-v3.19.2-Windows.msi` | **推奨** - 自動更新対応の MSI インストーラー |
| `CC-Switch-v3.19.2-Windows-Portable.zip` | ポータブル版、展開してそのまま実行できます |
Windows ARM64 デバイスでは、ファイル名に `arm64` が含まれる対応する成果物を選択してください。
### macOS
| ファイル | 説明 |
| -------------------------------- | ------------------------------------------------------ |
| `CC-Switch-v3.19.2-macOS.dmg` | **推奨** - DMG インストーラー、Applications へドラッグ |
| `CC-Switch-v3.19.2-macOS.zip` | 展開して Applications へドラッグ、Universal Binary |
| `CC-Switch-v3.19.2-macOS.tar.gz` | Homebrew インストールと自動更新用 |
Homebrew インストール:
```bash
brew install --cask cc-switch
```
更新:
```bash
brew upgrade --cask cc-switch
```
### Linux
Linux アセットは **x86_64****ARM64**`aarch64`)の両方を提供します。ファイル名のアーキテクチャ識別子を、マシンの `uname -m` 出力に合わせて選択してください:
- `CC-Switch-v3.19.2-Linux-x86_64.AppImage` / `.deb` / `.rpm`
- `CC-Switch-v3.19.2-Linux-arm64.AppImage` / `.deb` / `.rpm`
| ディストリビューション | 推奨形式 | インストール方法 |
| --------------------------------------- | ----------- | -------------------------------------------------------------------------- |
| Ubuntu / Debian / Linux Mint / Pop!\_OS | `.deb` | `sudo dpkg -i CC-Switch-*.deb` または `sudo apt install ./CC-Switch-*.deb` |
| Fedora / RHEL / CentOS / Rocky Linux | `.rpm` | `sudo rpm -i CC-Switch-*.rpm` または `sudo dnf install ./CC-Switch-*.rpm` |
| openSUSE | `.rpm` | `sudo zypper install ./CC-Switch-*.rpm` |
| Arch Linux / Manjaro | `.AppImage` | 実行権限を付与して直接実行、または AUR を利用 |
| その他 / 不明な場合 | `.AppImage` | `chmod +x CC-Switch-*.AppImage && ./CC-Switch-*.AppImage` |
+305
View File
@@ -0,0 +1,305 @@
# CC Switch v3.19.2
> 这一版的主线是**把数字算对、把边界扎紧**:Codex 用量统计修掉一个会把交错计数器文件多算数倍的缺陷——升级后新数据即刻正确,历史虚高可用一次手动重建回正(见「升级提醒」);一轮六项安全加固把用量脚本、会话日志、目录文件与代理缓冲响应体的无界读取全部封顶。日常顺手的部分也补齐了:MCP / 提示词 / Skills 面板可以搜索,MCP 与 Skills 还能按应用一键批量开关;认证中心逐账号显示 ChatGPT 订阅用量;OMO 用户拿回可用的集成。两条写盘路径批量化之后,大数据库的备份导入、自动同步与用量重导入不再动辄卡住。本版**没有数据库迁移**。
**[English →](v3.19.2-en.md) | [日本語版 →](v3.19.2-ja.md)**
---
## 重点内容:你现在可以
- **拿到正确的 Codex 用量数字**:真实日志里存在计数器交错的文件——同一份快照被网关换着限额桶反复重播,或两个累计计数器交替出现——旧算法会把它们当成新增量,现场文件实测有 6 到 8 倍虚高。修复经近 1,900 份真实会话文件回放验证,与独立重算的理想值偏差 0.001%。历史数据不会被自动改写,回正方法见[升级提醒](#codex-历史用量虚高需手动重建一次)。
- **在 MCP、提示词、Skills 面板里直接搜索**:三个面板都有了搜索框;MCP 与 Skills 列表上的应用徽章还变成了三态开关,一键把某个应用在整张列表上批量启用或停用([#5954](https://github.com/farion1231/cc-switch/issues/5954)、[#5935](https://github.com/farion1231/cc-switch/issues/5935) 都是用户之声)。
- **让新版 Claude Code 直接进入 Copilot 接管的会话**:新版 Claude Code 对不认识的 API key 会弹确认框、且默认选中「No (recommended)」,此前接管写入的占位符正好撞上它,用户看到的是一个未登录的会话。现在改写 `ANTHROPIC_AUTH_TOKEN` 占位符,零弹窗直接进入。
- **继续用 CC Switch 管理 OMO**OMO 4.19.3 起配置统一进 `~/.omo/omo.jsonc`,旧文件不再被读取,此前的供应商切换看似成功、实则全部落空。现在检测到统一配置文件(`omo.jsonc``omo.json`)就写进它的 `"[opencode]"` 分区。OMO 表单的模型选择器还会合并 `opencode models` 实际报告的运行时模型。
- **在认证中心看到每个 ChatGPT 账号的订阅用量**:多账号场景下不再需要逐个切换查看。
- **在大数据库上不再动辄卡住**:备份导出改为批量 INSERT、同步恢复改为单事务——此前每行一次 fsync 正是自动同步周期性卡顿的元凶;Codex 用量全量重导入在真实语料上从 36.3 秒降到 11.1 秒(macOS),Windows 收益更大。
- **看到被网关吞掉的工具调用,而不是被静默晾在原地**:第三方 Chat 网关返回缺函数名的工具调用时,转换层此前把它们丢掉还报「本轮完成」,Codex 于是无声地结束了循环。现在这种情况会明确报错,且丢弃点带结构化日志,[#4341](https://github.com/farion1231/cc-switch/issues/4341) 这类问题终于可以从真实流量里诊断。
- **让 Hermes 提示词真正生效**:写入 Hermes 实际加载的 `~/.hermes/SOUL.md`,而不是它从不读取的 `AGENTS.md`
- **装上此前装不了的 Skill**:ast-grep 这类带同名空壳目录的仓库能装了;skills.sh 嵌套 Skill 的 README 链接不再 404(存量记录需重装一次恢复,见[升级提醒](#嵌套-skill-的存量记录需要重装一次))。
---
## 使用攻略
本版的改动集中在用量统计与扩展管理面板上,建议结合以下文档了解:
- **[用量统计](../user-manual/zh/4-proxy/4.4-usage.md)**:用量看板的数据来源与统计口径,理解交错计数器多算是怎么发生的、什么情况下需要手动重建。
- **[MCP 管理](../user-manual/zh/3-extensions/3.1-mcp.md)** 与 **[Skills 管理](../user-manual/zh/3-extensions/3.3-skills.md)**:新的搜索与批量开关所在的两个面板。
---
> [!WARNING]
>
> ## 唯一官方渠道声明(请务必阅读)
>
> CC Switch 是**完全免费、开源**的桌面应用,**不会向用户收取任何费用**。请仅通过下列官方渠道获取本软件:
>
> | 类别 | 唯一官方 |
> | -------- | ------------------------------------------------------------------------------ |
> | 官网 | **[ccswitch.io](https://ccswitch.io)** |
> | 源码 | **[github.com/farion1231/cc-switch](https://github.com/farion1231/cc-switch)** |
> | 下载 | **[GitHub Releases](https://github.com/farion1231/cc-switch/releases)** |
> | 作者 | **[@farion1231](https://github.com/farion1231)** |
> | 举报山寨 | **[GitHub Issues](https://github.com/farion1231/cc-switch/issues)** |
>
> **任何向你收费、要求充值、或索取登录凭据的"CC Switch"网站或客户端均为假冒**。如果你被诱导支付了费用,请立即停止操作并通过 GitHub Issues 反馈。
---
## 概览
CC Switch v3.19.2 是一次以正确性为主的维护版本,主线有三条。第一条是把数字算对:Codex 会话导入器在计数器交错的文件上会把用量多算数倍([#3011](https://github.com/farion1231/cc-switch/issues/3011)),本版换用「优先取每轮增量、按完整签名识别重播」的算法,并以近 1,900 份真实会话文件的回放验证收口;备份与用量导入两条写盘路径同时批量化,大数据库导入卡顿显著缓解([#2100](https://github.com/farion1231/cc-switch/issues/2100) 或将受益)。
第二条是把边界扎紧:一轮外部贡献的安全加固把用量脚本运行时、Grok 会话日志、Codex 目录文件与代理缓冲响应体的无界读取全部封顶,深链导入确认框补上两个此前收集却不显示的凭据字段。第三条是把日常顺手的东西补齐:MCP / 提示词 / Skills 三个面板的搜索、MCP 与 Skills 的批量应用开关、认证中心的逐账号订阅用量,以及 OMO 的统一配置与运行时模型两项适配。此外还有 Copilot 登录、Hermes 提示词、Skill 安装等七个具体故障修复。本版**没有数据库 schema 迁移**(版本号保持 v16),升级轻量。
**发布日期**2026-08-06
**更新规模**24 commits | 109 files changed | +12,340 / -1,897 lines
---
## 新功能
### 管理面板:搜索与批量应用开关
MCP、提示词、Skills 三个面板都有了共享的搜索框——按 Esc 清空,且只在有内容时拦截全局返回快捷键,不影响你平时的操作习惯。MCP 与 Skills 列表顶部的应用计数徽章变成了三态开关按钮:一键把某个应用在整张列表上批量启用或停用,逐条点开关的日子结束了([#5954](https://github.com/farion1231/cc-switch/issues/5954)、[#5935](https://github.com/farion1231/cc-switch/issues/5935))。
批量操作刻意**串行执行**而不是并发——每个应用的 live 配置是单个文件,并发写会互相覆盖;失败的条目会被收集起来一次性报告。批量开关作用于**整张列表**而不是搜索过滤后的子集,避免「以为只开了过滤结果、实际状态不明」的歧义。
底层还顺手修掉两个数据层的老问题:MCP 开关从「读整行、改内存、写整行」改为单列原子 UPDATE,两个应用几乎同时切换时不再互相丢失更新;Skill 更新落库前会重新确认记录仍然存在、安装代数未变,慢速更新任务不再可能复活一个刚被卸载的 Skill。搜索索引是显式白名单——环境变量与请求头**永远不进**可搜索文本。
### 认证中心:逐账号订阅用量
设置 → 认证中心现在给每个 ChatGPT(Codex OAuth)账号内联显示订阅用量,复用供应商卡片页脚已有的查询——按账号去重、缓存五分钟、挂载时拉取一次不轮询。多账号用户不用再逐个切换查看余量。([#4887](https://github.com/farion1231/cc-switch/pull/4887)
### OMO 模型选择器合并运行时模型
OMO 表单的模型选择器此前只有静态列表;现在还会运行 `opencode models`,把本机安装的 OpenCode 实际报告的模型合并进来。这个辅助进程被刻意关进沙箱:禁用项目级配置发现、工作目录钉死在 OpenCode 配置目录——打开一个表单绝不会执行某个项目的 `.opencode/` 插件;整个过程限时 20 秒,超时后杀掉完整进程树(macOS / Linux 用进程组,Windows 用 `taskkill /T`WSL 在发行版内部用 `timeout`)。任何失败都回落到静态列表并弹提示。([#5522](https://github.com/farion1231/cc-switch/pull/5522)
### Qwen3.8 Max 内置定价
`qwen3.8-max` 按官方牌价播种:每百万 token 输入 $2 / 输出 $6,缓存读取 $0.25,缓存写入 $2.50(输入价的 125%,官方显式上下文缓存费率)。按「不存在才插入」播种,你自己改过的价格不受影响。([#6053](https://github.com/farion1231/cc-switch/pull/6053)
---
## 变更
### 预设清单维护
NekoCode 与 Unity2.ai 的合作伙伴预设从所有应用、README 与语言文件中移除;七牛预设的排序调整。
---
## 修复
### Codex 用量在计数器交错时被多算(最高数倍)
会话导入器此前从单一高水位线对累计值求差——一份文件里只有一个单调计数器时这是对的,但真实日志里存在两种交错形态:网关把同一份**未变化**的快照换着限额桶反复重播,以及两个真正不同的累计计数器交替出现。旧算法在这两种形态上都会把重播或交替当成新增量,现场文件实测有 6 到 8 倍虚高。
现在导入器优先读取每个事件显式携带的「本轮用量」,并按完整 token 签名识别重播。去重刻意收窄:一份快照只与**同一来源自己的上一份签名**或**紧邻的前一个 token 事件**比对——不与其它来源的旧签名比对,因为合法的计数器重置会重现旧数值,扫全表会把它误吞。只有累计值的旧格式回退到单一全局基线,语义与从前一致。
修复用近 1,900 份、共 1.7 GB 的真实会话文件回放验证:与独立重算的理想值偏差 0.001%,残余差异全部是旧算法把计数器重置截断吞掉、新算法合法救回的请求。历史数据刻意不改写——回正方法见「升级提醒」。([#3011](https://github.com/farion1231/cc-switch/issues/3011)、[#3015](https://github.com/farion1231/cc-switch/issues/3015)
### 被丢弃的工具调用不再伪装成「本轮完成」
第三方 Chat 网关偶尔会返回**缺函数名**的工具调用,Chat → Responses 转换层此前把它们静默丢弃、还照样报告本轮 `completed`——Codex 看到一个「成功但无事可做」的回合,就安静地结束了智能体循环,一个本可诊断的上游故障变成了无声停摆。
现在,当一轮里的工具调用全部被丢弃、没有任何可用项时,流式路径发出 `response.failed`,非流式路径报转换错误;判定挂在 `status == "completed"` 上,`finish_reason: length` 的截断保持自己的 `incomplete` 语义不受影响。三个丢弃点都会记录结构化、不含内容的日志字段——是否有 call id、参数字节数、结束原因——[#4341](https://github.com/farion1231/cc-switch/issues/4341) 这类问题终于可以从真实流量里诊断。含有效工具调用的回合、纯文本回合与截断回合行为不变。
### OMO 的配置写进了它不再读取的文件
OMO 4.19.3 把配置统一进 `~/.omo/omo.jsonc`(其次 `omo.json`),迁移时会把旧的按应用文件改名挪走。此后 CC Switch——只认识旧路径——一直在写一个不在 OMO 配置链上的文件,供应商切换看似成功、实则全部落空([#5945](https://github.com/farion1231/cc-switch/issues/5945))。
现在检测到统一配置文件就把 OpenCode 配置写进 OMO 的 `"[opencode]"` 分区——并且**只写在这里**,因为 OMO 对根层 schema 严格校验,任何未知根键都会让它丢弃整份文件。写入把文档当 JSON5 对待:注释、键序与行尾原样保留,内容没变化就不落盘;每次写出前还会把结果重新解析、与预期做语义比对——如果序列化会损坏文档,写入被拒绝、原文件原样保留,绝不落盘一份坏文件(已知触发场景见「升级提醒」)。同一改动还把所有受管应用在 Windows 上的原子写入换成 `ReplaceFileW`,堵上了旧「先删后改名」序列里目标文件短暂不存在的窗口。
### Copilot 接管在新版 Claude Code 上进不了登录态
新版 Claude Code 对不认识的 API key 会弹确认框、默认选中「No (recommended)」——Copilot 接管此前写入的 `ANTHROPIC_API_KEY` 占位符正好撞上它:按推荐走,key 被忽略,用户面对的是一个未登录的会话。接管现在改写 `ANTHROPIC_AUTH_TOKEN` 占位符,零弹窗直接进入;在供应商表单高级区显式选择了 `ANTHROPIC_API_KEY` 字段的供应商保持旧行为。Copilot 转发路径还补上了其它路径早就有的 `[1M]` 上下文标记剥离,`claude-*[1M]` 形态的模型 ID 不再原样发给 GitHub 的 API。([#5832](https://github.com/farion1231/cc-switch/pull/5832)
### Hermes 提示词写错了文件名
Hermes 从 `~/.hermes/` 加载的身份文件是 `SOUL.md`,从不在那里找 `AGENTS.md`——后者是项目级上下文,从工作目录向上发现。CC Switch 的提示词管理从加入 Hermes 支持那天起写的就是 `~/.hermes/AGENTS.md`,启用 Hermes 提示词产出的是一个死文件。现在读写 `~/.hermes/SOUL.md`,既有的回填机制照常生效:你自己写过的 SOUL.md 会先导入数据库再被替换。([#5777](https://github.com/farion1231/cc-switch/issues/5777)
### 带同名空壳目录的 Skill 仓库装不上
安装 ast-grep 官方 Skill 报「缺少 SKILL.md」:这个仓库在根下有一个与 Skill 同名的空壳目录,真正的 Skill 嵌套在更深处,而解析器返回了第一个名字匹配的目录。源目录解析现在以 SKILL.md 本身为锚点——没有它的目录绝不会被选中——顺带修好了同类仓库上「更新检查永远报有更新」的幻影提示。([#4141](https://github.com/farion1231/cc-switch/issues/4141)
### skills.sh 嵌套 Skill 的 README 链接 404
skills.sh 的发现流程只报告 Skill 的末级目录名;安装时能解析出真实的嵌套目录,但入库的 README 链接仍按目录名猜测构建,点开就是 404。链接现在从安装器**实际解析出的目录**生成。修复只作用于安装链路——旧版本写入的记录要重装一次才能恢复,见「升级提醒」。([#6111](https://github.com/farion1231/cc-switch/issues/6111)
### 全部应用启用时头部按钮被裁掉
所有应用页签、项目切换器与接管开关同时显示时,头部溢出,「添加供应商」按钮被裁掉。主要操作现在固定在不收缩的区块里,应用切换器变成宽度感知:放不下的应用折叠进「更多」弹出层,当前应用始终可见。
### 路由状态动画在后台空耗 GPU
路由状态指示器的脉冲动画在窗口失焦时照常运行,为一个纯装饰效果持续占用 GPU。现在窗口焦点通过 data 属性与 CSS 控制心跳——失焦时动画冻结在完整不透明度,系统的「减少动态效果」偏好则完全禁用它。数据轮询不受影响,暂停的只是装饰。([#5767](https://github.com/farion1231/cc-switch/pull/5767)
---
## 安全加固
### 无界读取全部封顶,确认框不再隐藏字段
一轮六项的外部贡献加固([#5919](https://github.com/farion1231/cc-switch/pull/5919)):
- **用量脚本限资源限时**:用量脚本可以经深链或同步的数据库到达本机,此前跑在没有任何限制的 JS 运行时上,一句 `while(true)` 就能把后端线程永远挂死。现在运行时强制 5 秒中断、16 MiB 内存与 256 KiB 栈上限。
- **Grok 会话日志读取设界**:跳过超过 50 MiB 的文件,目录递归限深 16 层且不再跟随符号链接——`~/.grok/sessions` 下的一个符号链接环此前能造成栈溢出。
- **Codex 模型目录路径收紧**:`model_catalog_json` 此前只看文件名就信任任意绝对路径;现在必须解析到 Codex 配置目录之内——`canonicalize` 之后复查一遍,符号链接逃不出去——单次读取上限 32 MiB。
- **代理缓冲响应体封顶**:会被完整收集的响应体——非流式响应、错误响应与需要整体校验的路径——上限 128 MiB,并且在分块到达时即时累计、越限立即断开连接,而不是先收完再比较;流式路径(透传与流式转换)本就不整体缓冲,不设总量上限。
- **解压预算前置**:解压配额加在解码器读取侧,gzip、deflate、zstd、brotli 全覆盖,压缩炸弹无法不受控地膨胀;越限响应映射为独立的 502,不会被误判为可重试的网络错误。
- **深链确认框补上两个字段**:供应商导入确认框此前会解析并持久化 `usageAccessToken``usageUserId`,却从不显示它们;现在两个字段都在批准前展示,令牌照常脱敏。
---
## 性能
### 备份:导出批量化,恢复单事务
两个方向各有一个独立的成本。**导出侧**此前每行数据一条 INSERT,导入大备份时 SQLite 要逐条解析、准备、销毁数万条语句;现在按 200 行 / 1 MB 一批生成多行 INSERT,语句数少两个数量级,备份文件本身也缩小约 4 倍。**恢复侧**,每次 WebDAV / S3 同步导入后要把保留在本地的表逐行写回,此前每一行都是一个隐式事务——每行付一次完整的日志写入与 fsync,正是大库自动同步周期性卡住应用的元凶;现在整个恢复在单个事务内完成。
旧格式的单行备份照常导入,新格式也在所有随应用分发的 SQLite 支持范围内,跨版本双向兼容。[#2100](https://github.com/farion1231/cc-switch/issues/2100) 报告的跨机导入卡死很可能因此缓解——欢迎在该 issue 反馈实测结果。([#6122](https://github.com/farion1231/cc-switch/pull/6122)
### Codex 用量全量重导入提速约 3 倍,Windows 收益更大
全量重导入——导入 v16 之前的 SQL 备份、跨机恢复后游标不匹配、或手动重建时触发——在大语料上会把一个 CPU 核心跑满数分钟:每个 token 事件各自构成一个自动提交事务,每行付一次完整的日志创建 / fsync / 删除循环;每个归档文件还要跑一条用不上索引的游标继承查询。
现在事件按 1,000 条一批提交,批间释放连接锁,界面查询得以插队;游标在与最后一批相同的事务里推进,崩溃永远不会让游标领先于数据;游标与模型定价每趟预载一次,热点语句预编译缓存。1,920 份 / 1.7 GB 的真实语料在 macOSrelease 构建)上从 36.3 秒降到 11.1 秒;Windows 上每行 fsync 开销约数毫秒,绝对收益大一个数量级。改动前后回放同一语料验证等价:82,000 行导入结果在所有导出列上逐字节一致,导入 / 跳过计数完全相同。
---
## 升级提醒
### 本版没有数据库迁移
v3.19.2 不含 schema 迁移(版本号保持 v16),不会触发升级前备份,升级即用。
### Codex 历史用量虚高需手动重建一次
交错计数器修复**只保证今后正确**:历史行刻意不改写,也没有自动重建。如果你的看板里 Codex 数字高得离谱、且会话文件带交错形态,升级后到 **用量页 → Codex 用量维护 → 「重建 Codex 用量」** 手动重建一次即可——重建前会自动备份数据库;已删除的会话日志对应的历史无法重新导入。本版的导入提速让这次重建比以往快约 3 倍。
大多数安装不受影响:不含交错形态的数据上,新旧算法的差异在千分之一以内。
### 嵌套 Skill 的存量记录需要重装一次
通过 skills.sh 安装、README 链接 404 的存量 Skill,卸载后重装即可恢复正确链接;原地「更新」不会重写它。
### 升级后的首次同步会整体重传一次备份文件
备份 dump 的格式变了,而同步协议把它当作整体哈希的不透明工件,所以升级后第一次 WebDAV / S3 同步会完整重传一次 `db.sql`——一次性、无害。
### Copilot 占位符在下次接管写入时生效
`AUTH_TOKEN` 占位符在接管下一次重写 live 配置时生效——切换供应商或重启接管即可。在供应商表单高级区显式选过 `ANTHROPIC_API_KEY` 字段的供应商不受影响,你的选择原样保留。
### OMO 统一配置按文件存在性检测
判定依据是文件是否存在、而不是 OMO 版本:`~/.omo/omo.jsonc`(或 `omo.json`)存在时就地编辑它;两者都不存在时照旧写传统的 OpenCode 层文件。已知限制:如果统一配置文件里含**块注释**(`/* … */`),写入会报错拒绝以保护文档——行注释(`//`)不受影响。在上游 JSON5 写入器修复之前,切换供应商前请先移除块注释。
### 批量开关作用于整张列表
管理面板的批量应用开关作用于全部条目,而不是搜索过滤后的子集。
### 代理缓冲响应体上限 128 MiB
需要完整缓冲的代理响应——非流式响应与错误响应——超过 128 MiB 时以 502 失败,不再转发;透传的流式响应不受影响。正常的 LLM 响应最多也只有几 MB,这个上限只会在上游异常时触发;这类失败会终止请求,不触发向下一个地址的故障转移。
---
## 风险提示
### 沿用的提示
**xAI Grok OAuth 登录**:复用官方 Grok CLI 的公开 OAuth 客户端身份,使用可能导致账号被限制或封禁——详见 [v3.18.0 release notes](v3.18.0-zh.md#风险提示)。
**Codex OAuth 反向代理**:使用 ChatGPT 订阅的 Codex OAuth 反代可能违反 OpenAI 服务条款,详情见 [v3.13.0 release notes](v3.13.0-zh.md#-风险提示)。
**SuperGrok 配额查询**:供应商卡片的配额展示依赖 grok.com 的非公开计费端点,xAI 调整接口后可能失效——详见 [v3.19.0 release notes](v3.19.0-zh.md#风险提示)。
**第三方供应商路由**:通过 CC Switch 本地代理把 Codex、Claude Desktop 或 Grok Build 的请求转换并转发到第三方供应商时,各供应商对计费、合规与数据留存的约束不同,请在使用前阅读目标供应商的服务条款。
用户启用上述功能即表示自行承担相关风险。CC Switch 不对因使用这些功能而导致的任何账号限制、警告或服务暂停承担责任。
---
## 致谢
这一版 24 个提交里有 13 个 PR 来自外部贡献者——9 位贡献者,覆盖了从用量头条修复到安全加固的几乎每一条主线。
### 代码贡献
- [#5854](https://github.com/farion1231/cc-switch/pull/5854):Codex 交错计数器用量修复——本版头条,感谢 @MJYKIM99。作者自带真实文件证据、按评审意见三轮打磨到全量回放逐位收敛;也感谢 @ayanamislover 用自己的交错文件独立回放,与我们的验证互证。
- [#5919](https://github.com/farion1231/cc-switch/pull/5919)、[#6122](https://github.com/farion1231/cc-switch/pull/6122)、[#6119](https://github.com/farion1231/cc-switch/pull/6119):六项安全加固、备份性能改造与 skills.sh README 修复,感谢 @zayokami——本版的「安全加固」与「性能」两个章节大半出自这三份工作。
- [#6011](https://github.com/farion1231/cc-switch/pull/6011)、[#5522](https://github.com/farion1231/cc-switch/pull/5522)、[#5767](https://github.com/farion1231/cc-switch/pull/5767):OMO 统一配置适配、运行时模型发现与路由状态动画的 GPU 修复,感谢 @allenxu09
- [#5967](https://github.com/farion1231/cc-switch/pull/5967):管理面板搜索与批量开关,并顺手修掉数据层两个并发老问题,感谢 @YUZHEthefool——他还在 #6119 中协作把修复收敛到最小形态。
- [#4887](https://github.com/farion1231/cc-switch/pull/4887):认证中心逐账号订阅用量,感谢 @SaladDay
- [#5832](https://github.com/farion1231/cc-switch/pull/5832)Copilot 接管兼容新版 Claude Code,感谢 @Suaig
- [#5779](https://github.com/farion1231/cc-switch/pull/5779):Hermes 提示词文件名修复,感谢 @mmm-05610——从报告 [#5777](https://github.com/farion1231/cc-switch/issues/5777) 到提交修复一人完成。
- [#4153](https://github.com/farion1231/cc-switch/pull/4153)Skill 源目录以 SKILL.md 为锚点解析,感谢 @makoMakoGo
- [#6053](https://github.com/farion1231/cc-switch/pull/6053)Qwen3.8 Max 内置定价,感谢 @mhy1227
### 问题反馈
- 感谢 @KeShih 在 [#3011](https://github.com/farion1231/cc-switch/issues/3011) 中精确指出「`total_token_usage` 非单调 / 重放被当作新增量」——本版头条修复的问题定义直接来自这条报告,他还在 [#3015](https://github.com/farion1231/cc-switch/issues/3015) 中先行提出了修复思路。
- 感谢 @Syuryuuki 报告 OMO 统一配置未适配([#5945](https://github.com/farion1231/cc-switch/issues/5945))、@abcfy2 报告 ast-grep Skill 无法安装([#4141](https://github.com/farion1231/cc-switch/issues/4141))、@mortalBibo 报告 skills.sh 嵌套 Skill 链接 404[#6111](https://github.com/farion1231/cc-switch/issues/6111))。
- 感谢 @kith13[#5954](https://github.com/farion1231/cc-switch/issues/5954))与 @Getianyu1998[#5935](https://github.com/farion1231/cc-switch/issues/5935))——管理面板的搜索与批量开关正是从这两条建议来的。
---
## 下载与安装
访问 [Releases](https://github.com/farion1231/cc-switch/releases/latest) 下载对应版本,或从官网 [ccswitch.io](https://ccswitch.io) 获取(下载经 Cloudflare 边缘节点分发,不依赖 GitHub 可达)。
### 系统要求
| 系统 | 最低版本 | 架构 |
| ------- | -------------------------- | ----------------------------------- |
| Windows | Windows 10 及以上 | x64 / ARM64 |
| macOS | macOS 12 (Monterey) 及以上 | Intel (x64) / Apple Silicon (arm64) |
| Linux | 见下表 | x64 / ARM64 |
### Windows
| 文件 | 说明 |
| ---------------------------------------- | ----------------------------------- |
| `CC-Switch-v3.19.2-Windows.msi` | **推荐** - MSI 安装包,支持自动更新 |
| `CC-Switch-v3.19.2-Windows-Portable.zip` | 便携版,解压即用,不写入注册表 |
Windows ARM64 设备请选择文件名中带 `arm64` 标识的对应制品。
### macOS
| 文件 | 说明 |
| -------------------------------- | --------------------------------------------- |
| `CC-Switch-v3.19.2-macOS.dmg` | **推荐** - DMG 安装包,拖入 Applications 即可 |
| `CC-Switch-v3.19.2-macOS.zip` | 解压后拖入 ApplicationsUniversal Binary |
| `CC-Switch-v3.19.2-macOS.tar.gz` | 用于 Homebrew 安装和自动更新 |
Homebrew 安装:
```bash
brew install --cask cc-switch
```
更新:
```bash
brew upgrade --cask cc-switch
```
### Linux
Linux 资产同时提供 **x86_64****ARM64**`aarch64`)两种架构。资产文件名中包含架构标识,请按你机器的 `uname -m` 输出选择对应版本:
- `CC-Switch-v3.19.2-Linux-x86_64.AppImage` / `.deb` / `.rpm`
- `CC-Switch-v3.19.2-Linux-arm64.AppImage` / `.deb` / `.rpm`
| 发行版 | 推荐格式 | 安装方式 |
| --------------------------------------- | ----------- | ---------------------------------------------------------------------- |
| Ubuntu / Debian / Linux Mint / Pop!\_OS | `.deb` | `sudo dpkg -i CC-Switch-*.deb``sudo apt install ./CC-Switch-*.deb` |
| Fedora / RHEL / CentOS / Rocky Linux | `.rpm` | `sudo rpm -i CC-Switch-*.rpm``sudo dnf install ./CC-Switch-*.rpm` |
| openSUSE | `.rpm` | `sudo zypper install ./CC-Switch-*.rpm` |
| Arch Linux / Manjaro | `.AppImage` | 添加执行权限后直接运行,或使用 AUR |
| 其他发行版 / 不确定 | `.AppImage` | `chmod +x CC-Switch-*.AppImage && ./CC-Switch-*.AppImage` |