From 0b5da510168914b251481654a568c3ffacd62cf4 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 18 Aug 2026 16:48:03 +0800 Subject: [PATCH] docs(release): add v3.20.0 release notes --- docs/release-notes/v3.20.0-en.md | 394 +++++++++++++++++++++++++++++++ docs/release-notes/v3.20.0-ja.md | 394 +++++++++++++++++++++++++++++++ docs/release-notes/v3.20.0-zh.md | 394 +++++++++++++++++++++++++++++++ 3 files changed, 1182 insertions(+) create mode 100644 docs/release-notes/v3.20.0-en.md create mode 100644 docs/release-notes/v3.20.0-ja.md create mode 100644 docs/release-notes/v3.20.0-zh.md diff --git a/docs/release-notes/v3.20.0-en.md b/docs/release-notes/v3.20.0-en.md new file mode 100644 index 000000000..ea247580a --- /dev/null +++ b/docs/release-notes/v3.20.0-en.md @@ -0,0 +1,394 @@ +# CC Switch v3.20.0 + +> Three structural lines carry this release: **Pi becomes the ninth managed app** — providers, prompts, Skills, a session browser and usage statistics, all in one place; **Codex gains multiple ChatGPT accounts** — sign in to as many as you like in the Auth Center, bind each official card to its own account, and never cross-bill a switch; and **Claude Code's built-in WebSearch finally works under GPT routing**. There is one urgent fix too: v3.19.2 could not update or switch existing configurations on WSL paths — affected users should upgrade straight to this release. The same Windows wave brings a version-detection overhaul (five issues fixed at once), the startup flash fix, and the MSI registry-key cleanup. This release **includes a database migration (v16 → v17)** — a backup is created automatically before migrating, and downgrading requires restoring it. + +**[中文版 →](v3.20.0-zh.md) | [日本語版 →](v3.20.0-ja.md)** + +--- + +## Highlights: What You Can Do Now + +- **Manage Pi with CC Switch**: the ninth managed app ([#6064](https://github.com/farion1231/cc-switch/pull/6064)). The provider form is a structured editor over Pi's native schema, with 58 built-in presets and a 57-model capability catalog; the prompt library, `SYSTEM.md` / `APPEND_SYSTEM.md` editors, slash-command templates, Skills, a session browser and install/upgrade all come along. Pi's own login, default provider and default model are **never touched**. First launch imports the providers already in `models.json` — see [Upgrade Notes](#pis-first-launch-imports-existing-providers-and-backfills-historical-usage). +- **See Pi's session usage in the dashboard**: per-model tokens, costs, errors and aborted turns, under its own "Pi (Session)" source and app filter; incremental resync parses only what was appended to each file ([#6463](https://github.com/farion1231/cc-switch/pull/6463)). +- **Pick an authorized ChatGPT account right when adding a Codex official provider**: sign in to any number of accounts in the Auth Center, then bind a new official card to one of them from a dropdown; or keep the classic route — an unbound official card that follows the Codex CLI's own login, reading the local access token. Switching to a bound card writes that account's complete token bundle — the bare `codex` CLI runs as that account too, and can self-refresh ([#3879](https://github.com/farion1231/cc-switch/pull/3879), [#6535](https://github.com/farion1231/cc-switch/pull/6535)). +- **Use Claude Code's built-in WebSearch under GPT routing**: searches execute upstream, results come back with citations, counts land in usage; the Alpha Search endpoint newer Codex clients call no longer 404s either ([#5681](https://github.com/farion1231/cc-switch/pull/5681)). +- **Escape the v3.19.2 WSL breakage**: v3.19.2 could not update or switch existing configurations on `\\wsl.localhost` paths ([#6188](https://github.com/farion1231/cc-switch/issues/6188)), with no workaround on that version — upgrade straight to this release, and CI now tests against real WSL2 filesystems from here on ([#6233](https://github.com/farion1231/cc-switch/pull/6233)). +- **Have Windows version detection see what your terminal sees**: detection now merges the registry PATH (user + machine), scans standalone installer directories, and probes the PATH default first — "not installed" after in-app self-update, winget-installed Claude Code going unseen, and a stale npm shim masking the newer version: a five-issue family fixed at once ([#6284](https://github.com/farion1231/cc-switch/pull/6284)). +- **Declare the reasoning levels each model really supports**: the Codex model catalog takes a per-model multi-select over the eight canonical levels plus a default, and the presets pre-fill the real tiers from vendor documentation ([#6228](https://github.com/farion1231/cc-switch/pull/6228)). +- **Trust your backups**: SQL backups round-trip every value and truncated files are rejected before import ([#6146](https://github.com/farion1231/cc-switch/pull/6146)); backup files publish atomically, restores validate in a staging database first, `.db` restores rebuild each app's live config, and every sync/restore path runs strictly one at a time ([#6147](https://github.com/farion1231/cc-switch/pull/6147)). +- **Search across hundreds of models**: every model dropdown in every app becomes a type-to-filter combobox, matching on model id and vendor name alike ([#6285](https://github.com/farion1231/cc-switch/pull/6285)). +- **Start without the white/black flash**: the theme applies synchronously before first paint, and on Windows the window stays hidden until the page has loaded ([#6252](https://github.com/farion1231/cc-switch/pull/6252)). + +--- + +## Usage Guides + +The changes in this release center on provider management and usage statistics. The following docs are worth reading alongside it: + +- **[Adding Providers](../user-manual/en/2-providers/2.1-add.md)**: the entry point for Pi and the new presets. +- **[Usage Statistics](../user-manual/en/4-proxy/4.4-usage.md)**: where Pi session usage comes from and how it is counted, plus what the DeepSeek repricing does to the numbers. +- **[Request Routing](../user-manual/en/4-proxy/4.2-routing.md)**: the routing scenarios where the WebSearch bridge applies. + +--- + +> [!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.20.0 spans nearly every subsystem, along three lines. The first is a wider reach: Pi becomes the ninth managed app, wired end to end from provider editing to session usage, and brings this release's only database migration (v16 → v17, the Pi usage dedup ledger); on the Codex side, the long-requested multi-ChatGPT-account management lands — official cards can bind accounts individually, and deliberately leave auto-failover, so a retry can never bill a different account. The second is proxy capability: Claude Code's built-in WebSearch is bridged onto OpenAI Responses and the Codex OAuth backend, and Codex's standalone Alpha Search endpoint is registered as a semantic passthrough — "no web search under GPT routing" is history. + +The third is paying down the Windows and data-reliability debt: the hotfix for v3.19.2's WSL write regression (plus real WSL2 CI coverage), the registry-PATH overhaul of version detection, the startup-flash fix, and the correction of a garbage registry key the MSI had been writing since v3.4.0; backup and sync land two hardening waves after an external contributor's audit — value-exact SQL, atomic publishing, staged validation, strict serialization. On top of that: a full pass over Codex's reasoning-level system (per-model levels + vendor-documented tiers + aggregator dialect corrections), a provider-form consistency sweep, the macOS CJK input-method fix, and DeepSeek V4 repriced to the vendor's new list. + +**Release date**: 2026-08-18 + +**Change size**: 69 commits | 284 files changed | +53,108 / -6,678 lines + +--- + +## Added + +### Pi Joins CC Switch as the Ninth Managed App + +Pi runs in additive mode (like OpenCode and Hermes): a provider is enabled exactly when its key exists in `~/.pi/agent/models.json`, and multiple providers coexist. The provider form is a structured editor over Pi's native schema — API format, per-model reasoning and thinking-level maps across Pi's seven levels, compat keys — with 58 built-in presets (covering four of the form's five API formats) and a hand-reviewed 57-model capability catalog; a raw JSON editor and a fetch-models button round it out, and unknown fields in an existing node are preserved verbatim. Every read-modify-write is guarded by a content revision check: a file changed by another process is refused with a conflict error, never overwritten. + +The boundaries are deliberate and documented: CC Switch **never** materializes Pi's built-in providers into models.json, **never** reads or writes Pi's `auth.json`, and **never** touches `defaultProvider` / `defaultModel` — Pi's own login and model selection stay Pi's. Beyond providers: a prompt library that writes one chosen prompt into Pi's global `AGENTS.md` (auto-backing-up unmatched existing content as a library entry first), dedicated editors for `SYSTEM.md` (replaces Pi's base prompt) and `APPEND_SYSTEM.md`, a slash-command template manager over `~/.pi/agent/prompts/*.md`, Skills with an exists-equals-active rule (a same-named skill CC Switch does not own is never overwritten or deleted), a JSONL session browser, and Pi install/upgrade from Settings → About. Pi has no native MCP registry, so it deliberately sits out MCP sync; it also has no proxy takeover, failover or tray presence — proxy and failover commands now reject every app without a local gateway explicitly, instead of writing dead configuration. ([#6064](https://github.com/farion1231/cc-switch/pull/6064)) + +### Pi Session Usage in the Dashboard + +A new importer reads Pi's session files and records tokens, costs, errors and aborted turns per model under a "Pi (Session)" source with its own app filter. Pi reports its own cost per entry, and a positive reported cost is preferred; a missing or all-zero cost falls back to CC Switch's pricing table. Incremental resync fingerprints each file's tail so only appended bytes are parsed; rewritten or branch-forked sessions are deduplicated through a new durable ledger — the `session_usage_dedup` table, the reason for this release's v16 → v17 migration — which survives detail-row pruning and stays device-local (excluded from cloud sync, preserved on import). Because a Pi session can mix Anthropic-style and OpenAI-style APIs, sums that include Pi carry the partial cache-write caveat rather than an unqualified number. ([#6463](https://github.com/farion1231/cc-switch/pull/6463)) + +### Codex: Multiple ChatGPT Accounts, Bound Per Card + +The Auth Center holds any number of ChatGPT (Codex OAuth) sign-ins. **When adding a Codex official provider, pick one of those authorized accounts right in the form** — no need to create the card first and come back to configure it; or keep the classic route: an unbound official card that follows the Codex CLI's own login, reading the local access token. Any number of official cards can coexist, cards of both kinds side by side, and binding or unbinding keeps the card's identity, endpoints and health history. Switching to a bound card writes that account's **complete token bundle** into `~/.codex/auth.json` — the bare `codex` CLI runs as that account too, and can self-refresh past the access token's lifetime; a CLI-rotated refresh token for the same account is adopted back before each write, so re-switching never overwrites a newer login with a stale one. + +The account picker is a labelled dropdown with a direct jump into the Auth Center; a transient **failure to load** account status now shows an alert with Retry instead of reading as "not signed in", and no longer silently unbinds the account on the next save. Sign-out and account removal are serialized against provider switching; OAuth request timeouts tighten from ten minutes to 30 seconds; and signing out also cancels a device login whose network round-trip is still in flight — an abandoned flow can no longer complete in the background and quietly restore an account ([#6506](https://github.com/farion1231/cc-switch/pull/6506)). Requests through takeover are validated against the bound account: a Codex session still authenticated as a different ChatGPT account gets an explicit "restart Codex" error instead of silently billing the wrong account. ([#3879](https://github.com/farion1231/cc-switch/pull/3879), [#6535](https://github.com/farion1231/cc-switch/pull/6535), [#6506](https://github.com/farion1231/cc-switch/pull/6506)) + +### Codex Model Catalog: Per-Model Reasoning Levels + +Each model row in the Codex provider form can now declare exactly which reasoning efforts its upstream accepts — a multi-select over the eight canonical levels (none through ultra) plus an optional default — and the generated catalog carries them into Codex's picker instead of inheriting the base template's. Unknown values are dropped (a typo never reaches Codex), an explicit default is validated against the declared set, and the override applies on both the native-Responses and the chat-conversion paths. The proxy transforms learned `ultra` at the same time: previously, picking the deepest level on a routed provider silently disabled extended thinking (Anthropic path) or dropped the effort parameter; it now maps to the upstream's deepest legal tier. ([#6228](https://github.com/farion1231/cc-switch/pull/6228), [#6181](https://github.com/farion1231/cc-switch/issues/6181)) + +### Vendor-Documented Reasoning Tiers Pre-Filled Across the Presets + +The presets now ship the effort tiers each vendor actually documents — Volcengine Ark low/medium/high, DouBaoSeed minimal through high, Hunyuan low/high, DeepSeek low/high/max, xAI Grok low/medium/high (no `none`: reasoning cannot be disabled), Zhipu GLM none/high, and more — so a newly created provider's Codex picker starts from the truth; for Zhipu GLM, "disable thinking" becomes selectable from Codex at all. Both Kimi presets enable reasoning effort per Moonshot's own integration guide (top-level `reasoning_effort`, only the tiers the gateway accepts), and Kimi For Coding grows from one model to the four official ones. The Baidu Qianfan Coding Plan preset gains a real thinking on/off switch via the platform's documented `thinking` object. Tiers come from vendor documentation or the vendor's own Codex catalog, narrowed to the ones that actually behave differently — models with no evidence at all stay unfilled. + +### Claude Code WebSearch and Codex Alpha Search Through the Local Proxy + +Two web-search paths that previously dead-ended at the proxy now work. Claude Code's built-in WebSearch tool is bridged onto OpenAI Responses and the Codex OAuth backend: searches execute upstream, results come back as paired Anthropic search blocks with citations preserved and merged, and search counts land in usage. `max_uses` is enforced natively via `max_tool_calls` where the Responses API supports it; the Codex OAuth backend rejects that parameter, so it is enforced locally with a mid-stream cutoff only when the request forces the hosted tool — an unforced request carrying `max_uses` fails with an explicit error. Constraints the Responses API cannot represent (`blocked_domains`, non-direct callers, `response_inclusion`, unknown tool versions) likewise fail explicitly rather than silently searching more broadly. The bridge covers the Responses conversion path only — Chat Completions upstreams still cannot serve hosted WebSearch. Separately, Codex's standalone Alpha Search endpoint is registered as a semantic passthrough with the full provider-selection, auth, model-mapping, retry and logging pipeline, ending the 404 newer Codex clients hit. The Claude-in-Codex routing guide was updated in all three languages: "web search is unavailable under GPT routing" is no longer true on these paths. ([#5681](https://github.com/farion1231/cc-switch/pull/5681), [#5363](https://github.com/farion1231/cc-switch/issues/5363), [#5378](https://github.com/farion1231/cc-switch/issues/5378)) + +### Baidu Qianfan Token Plan Presets + +Qianfan's Token Plan (personal) — which replaced Coding Plan for new purchases in July 2026 — gets presets for Claude Code, Claude Desktop, Codex, OpenCode, OpenClaw and Hermes on the `/tokenplan/personal` endpoints. The Codex preset carries a six-model catalog (DeepSeek V4 Pro / V4 Flash / V4 Flash 0731, GLM 5.2/5.1, Kimi K2.6) and is the first Qianfan preset where both the thinking switch and the reasoning-effort selector actually work. The key must be the Token Plan subscription's dedicated key, not a general Qianfan application key; the older Coding Plan preset stays for existing subscriptions. + +### Fuzzy Search in Every Model Picker + +Every "pick a model" dropdown in the provider forms — Claude Code including Copilot, Claude Desktop mapping rows, Codex, Gemini CLI, OpenCode, Hermes, OpenClaw and Pi — is now a type-to-filter combobox matching on model id and vendor name alike, consolidating four inline copies of the same component along the way. Especially useful against providers that return hundreds of models. ([#6285](https://github.com/farion1231/cc-switch/pull/6285), [#6353](https://github.com/farion1231/cc-switch/pull/6353)) + +### Other Additions + +- **A confirmation animation when takeover turns on**: turning on routing takeover for the current app plays a short one-shot burst on the header brand — never on app launch, app switching, or when reduced motion is preferred. The same change fixes a real gap: the takeover switch is now disabled until the initial proxy status has loaded, so a click against an unknown state can no longer flip takeover the wrong way. ([#6209](https://github.com/farion1231/cc-switch/pull/6209)) +- **The 1M context window toggle returns to the Codex form**: upstream Codex accepts `model_context_window = 1000000` again, so the toggle hidden in April (with its paired auto-compact-limit input) is back, writing the same two config.toml fields as before. +- **New presets**: PPIO (vendor-contributed), JieKou AI (vendor-contributed) and XycAi (partner), each across the apps they support. ([#6239](https://github.com/farion1231/cc-switch/pull/6239), [#6356](https://github.com/farion1231/cc-switch/pull/6356)) + +--- + +## Changed + +### Codex Official Account Cards Leave Auto Failover + +An official ChatGPT card is never added to, listed in, or retried through the failover queue, and every error class on an official route is non-retryable — retrying against another provider would reuse the inbound ChatGPT authorization against a different account. Existing queue rows for the built-in official card are filtered out at read time. Official-card detection also stopped relying on the category label alone: a card whose stored config carries a real API key or an explicit third-party upstream is treated as an ordinary provider, keeping its direct API path and failover eligibility. ([#3879](https://github.com/farion1231/cc-switch/pull/3879), [#6535](https://github.com/farion1231/cc-switch/pull/6535)) + +### Codex OAuth Quota Display Is Configurable Per Card + +A card bound to a ChatGPT account gains the same "Configure usage" entry as script-based providers: the quota footer can be switched off or its refresh interval changed (previously hard-wired to five minutes with no off switch), the dialog's Test button queries the **bound account** rather than whatever the CLI happens to be logged into, and the tray no longer decorates an account-bound card with the app-wide subscription percentage. ([#6537](https://github.com/farion1231/cc-switch/pull/6537)) + +### OpenCode Go Connects Directly + +The OpenCode Go gateway serves native Anthropic Messages, but its `/v1/messages` only accepts `x-api-key` and silently ignores a Bearer header — so the Claude Code preset now stores the key as `ANTHROPIC_API_KEY` and drops the Chat format declaration: Claude Code connects straight to the gateway, no routing takeover, no "needs routing" badge. Claude Desktop keeps its proxy mode by design (it cannot rename models itself), but the proxy now passes Anthropic Messages through instead of converting to OpenAI Chat. The Codex-side preset also fills the DeepSeek V4 models' context window at 1,048,576, so Codex stops auto-compacting them around the 128K fallback. ([#6171](https://github.com/farion1231/cc-switch/issues/6171), [#6196](https://github.com/farion1231/cc-switch/pull/6196)) + +### Provider Form Consistency Pass + +A contributor-led sweep aligning every app's provider dialog: Grok Build and Claude Desktop move onto the same glass card as the rest; sub-sections share one left-rule hierarchy; empty config editors collapse to three lines instead of reserving 6–14; the Hermes and OpenClaw model editors become compact rows with expandable details and proper accessibility labels (expansion state now keyed by stable row key, so deleting a model no longer leaves the wrong rows expanded); checkboxes render through one native component; and the Claude form's "API Format" selector is relabelled "Upstream Format" with per-option guidance on which formats require routing takeover. Separately, the partner star was removed from main-panel provider cards — partner marking now lives only in the preset picker. ([#6198](https://github.com/farion1231/cc-switch/pull/6198)–[#6201](https://github.com/farion1231/cc-switch/pull/6201), [#6203](https://github.com/farion1231/cc-switch/pull/6203)–[#6208](https://github.com/farion1231/cc-switch/pull/6208)) + +### Claude Desktop: A Connection Mode Picker With Separate Model Lists + +Direct and Model Mapping are chosen from a labelled dropdown instead of a switch; each mode keeps its own model rows when toggling back and forth; the direct-mode model list is always visible instead of hidden behind an "advanced" disclosure; and choosing a direct preset pre-fills its model list instead of discarding it. ([#6208](https://github.com/farion1231/cc-switch/pull/6208)) + +### Grok Build Form Rebuilt on the Codex Layout + +The Grok Build provider dialog now renders the shared Codex field set — endpoint, key, default model, advanced options with upstream format, reasoning and User-Agent — with Grok-specific wording throughout (a follow-up caught five Codex-worded hints the alignment had leaked in). The standalone "API Backend" and "client model profile" inputs are gone: the client always speaks Responses — to the local proxy when a Chat or Anthropic upstream needs converting, straight to the upstream otherwise — and the upstream protocol is expressed through Advanced → Upstream Format; saving through the form pins `api_backend = "responses"` in the stored config, applied to the live file immediately for the current provider and on the next switch for others — see Upgrade Notes. ([#6427](https://github.com/farion1231/cc-switch/pull/6427), [#6511](https://github.com/farion1231/cc-switch/pull/6511)) + +### Kimi Upstreams Get Clean Passthrough + +At Moonshot's request, the proxy no longer injects placeholder thinking blocks into tool-call history or emits the non-standard `reasoning_content` field for Kimi/Moonshot endpoints — their gateways no longer require thinking replay, and the injected placeholders were disrupting the model's chain of thought. Tool-call history is forwarded as-is on Kimi routes (the rest of the proxy pipeline is unchanged), effective immediately for existing providers. DeepSeek and MiMo keep the behavior — theirs is a documented server-side requirement. + +### DeepSeek V4 Repriced to the New Peak-Tier Rates, Gemini 3.7 Flash Seeded + +DeepSeek introduced peak/off-peak billing on 2026-08-16 with a steep rise: the built-in rates for `deepseek-v4-flash` (and its `-0731`, `deepseek-chat`, `deepseek-reasoner` aliases) move from $0.14/$0.28 per million input/output tokens to **$0.44/$1.32** with $0.014 cache read, and `deepseek-v4-pro` from $0.435/$0.87 to **$1.32/$3.96** with $0.044 cache read. The pricing table has no time-of-day dimension, so the **peak tier was recorded deliberately** — peak hours (Beijing 09:00–12:00, 14:00–18:00) coincide with working hours; usage in the other seventeen hours of the day therefore reads about twice its billed cost. Guarded repairs migrate databases still holding the old built-in values; a price you edited yourself is never touched. `gemini-3.7-flash` is seeded at its introductory $0.75/$3.75 with $0.075 cache read, with list price returning from 2027; `gemini-3.6-flash` is unchanged — it did not get the promotional rate. + +### Other Changes + +- **BytePlus preset switched to native Responses**: BytePlus' own Codex guide configures `wire_api = "responses"` on the exact endpoint the preset uses, so it now declares native Responses like its domestic Volcengine siblings and pre-fills the documented low/medium/high tiers. +- **Goal mode toggle removed from the Codex form**: codex-cli 0.147.0 enables goals by default, which had made the toggle actively misleading — unchecking it removed the config line, which then falls back to on: the box read unchecked while the feature stayed enabled. Nothing needs configuring anymore; a `goals = true` you previously wrote stays in config.toml with no effect. +- **Project profile changes trigger auto-sync**: the WebDAV/S3 auto-sync trigger list had never been updated for the `profiles` table, so profile edits only reached the cloud when some other table happened to change; the two per-transport copies of that list are now one shared list that includes profiles. ([#6147](https://github.com/farion1231/cc-switch/pull/6147)) +- **Partner roster maintenance**: RunAPI's presets move to its new `runapi.host` domain (keeping the old domain as a fallback endpoint candidate where the preset type supports one); PPIO is listed as a project sponsor. + +--- + +## Fixed + +### Windows: Config Updates on WSL Paths Failed on v3.19.2 + +v3.19.2 switched Windows atomic writes to `ReplaceFileW`, which the WSL filesystem rejects with `ERROR_NOT_SUPPORTED` (50) — and the rename fallback only engaged on NotFound, so any write replacing an existing live config on a `\\wsl.localhost` / `\\wsl$` path failed outright: existing providers could not be updated or switched (only the first-ever write of a config file, where the missing target already triggered the fallback, still worked). Error 50 now falls through to the rename path WSL accepts. Only v3.19.2 is affected; there is no in-app workaround on that version, so affected users should upgrade directly. ([#6232](https://github.com/farion1231/cc-switch/pull/6232), [#6224](https://github.com/farion1231/cc-switch/issues/6224), [#6219](https://github.com/farion1231/cc-switch/issues/6219), [#6188](https://github.com/farion1231/cc-switch/issues/6188), [#6247](https://github.com/farion1231/cc-switch/issues/6247)) + +### Windows: CLI Detection Finally Sees What Your Terminal Sees + +Version detection relied on the inherited process PATH plus a hardcoded directory list — probed in the wrong order. Three visible failure modes, one cause each: after an in-app self-update, the relaunched process inherits only the machine PATH and loses the user PATH, so user-installed CLIs read "not installed" until a full relaunch from the Start menu ([#6061](https://github.com/farion1231/cc-switch/issues/6061)); winget's Claude Code, the standalone Codex installer and custom npm prefixes lived in directories never scanned ([#6278](https://github.com/farion1231/cc-switch/issues/6278), [#6047](https://github.com/farion1231/cc-switch/issues/6047), [#4366](https://github.com/farion1231/cc-switch/issues/4366)); and hardcoded directories were probed before the PATH default, letting a stale `%APPDATA%\npm` shim mask the newer install actually on PATH — "updated but still shows the old version" ([#4701](https://github.com/farion1231/cc-switch/pull/4701)). Detection now merges the registry PATH (user and machine, with `%VAR%` expansion) into the effective search path, scans the standalone installer directories, probes the PATH default first via an explicit `where.exe` invocation (skipping Microsoft Store app aliases, never searching the current directory), and feeds the same merged PATH to install-conflict diagnosis and anchored upgrades. ([#6284](https://github.com/farion1231/cc-switch/pull/6284)) + +### No More White/Black Flash at Startup + +The window was shown before the theme class was applied, so an unthemed page painted first. An inline pre-paint script now applies the persisted theme synchronously before the bundle loads (every platform), and on Windows the window additionally stays hidden until the page has finished loading. ([#6252](https://github.com/farion1231/cc-switch/pull/6252), [#6182](https://github.com/farion1231/cc-switch/issues/6182)) + +### Windows Installer No Longer Writes a Garbage Registry Key + +The WiX template's `Software\{{manufacturer}}\{{product_name}}` used single backslashes, which Handlebars consumed as its escape sequence — so every MSI since v3.4.0 created a literal `HKCU\Software{{manufacturer}}{{product_name}}` key instead of the intended path. Both backslashes are doubled, matching every other key in the template. The stale key on already-installed machines is not cleaned up — see Upgrade Notes. ([#6283](https://github.com/farion1231/cc-switch/issues/6283)) + +### Proxy Takeover Restore No Longer Wipes the Official ChatGPT Login + +The takeover restore backup is a snapshot from when takeover started; if you ran `codex login` while takeover was active, every restore — stopping takeover, quitting the app, crash recovery — overwrote the fresh login with the pre-login snapshot, and automatic re-takeover on startup repeated the wipe on every restart. Restore now arbitrates: live login material always wins (only Codex itself can advance it, so it is always newer than the snapshot), and the backed-up third-party API key is preserved by demoting it into config.toml instead of clobbering auth.json. A login already destroyed by an earlier release is not restored — run `codex login` once. ([#6277](https://github.com/farion1231/cc-switch/issues/6277)) + +### Environment Check No Longer Hangs on "Update All" or Conflict Diagnosis + +A refactor that shipped in v3.19.2 spawned the PATH-probe login shell into a background process group that still held the controlling terminal: on an instance started from a terminal, job control stopped the shell with SIGTTIN and the untimed wait never returned — freezing the whole preflight. Even where that could not happen (a normally launched build has no controlling terminal), the path carried no deadline at all, Windows included — one hung probe (a blocking `.zshrc`, a `--version` that never exits) froze the run just the same. Probes now run in a fully detached session with stdin nulled and a 10-second deadline that kills the whole process tree; a lost probe degrades that one tool's report instead of hanging the run, and the buttons show a spinner during the probe phase instead of appearing to ignore the click. (regression from [#5522](https://github.com/farion1231/cc-switch/pull/5522)) + +### macOS Input Methods No Longer Corrupt Provider Forms + +With a Chinese/Japanese input method, fast typing into provider form fields intermittently duplicated and reordered characters — in the reported reproduction, a 12-character value ballooned to 1,396 characters. Controlled inputs were writing parent state back into the DOM while the IME still owned the composition range, and the provider-key fields even ran their lowercase-and-strip normalization on every intermediate composition state. A shared IME-safe input now keeps composition text local until it commits, applies normalization only to the finished text, and force-commits pending text when focus leaves mid-composition (a WebKit window-switch path that never delivers `compositionend`). Applied to the shared name/notes/website fields of every app and the Hermes, OpenClaw and OpenCode field sets — where the corruption was reported. Values already saved corrupted stay corrupted — re-edit them once. ([#6308](https://github.com/farion1231/cc-switch/issues/6308), [#6333](https://github.com/farion1231/cc-switch/pull/6333), [#6507](https://github.com/farion1231/cc-switch/pull/6507)) + +### SQL Backups Round-Trip Every Value, and Truncated Imports Are Rejected + +Four defects in the SQL dump/import cycle: TEXT values with non-UTF-8 bytes aborted the export while a NUL byte silently truncated the statement; REAL values lost their storage class (infinities, negative zero, integral REALs); AUTOINCREMENT high-water marks were re-derived from surviving rows instead of preserved; and a restore left the database's `auto_vacuum` mode downgraded, which the next launch repaired with a full VACUUM rebuild. All four are fixed. Validation also moved before table creation: a truncated SQL file — or one missing CC Switch's core tables — is now rejected with the live database untouched, where before schema migration could fabricate the missing tables and let partial data replace your database. A genuine export with no providers or MCP servers now imports instead of being refused. ([#6146](https://github.com/farion1231/cc-switch/pull/6146)) + +### Backups Publish Atomically, Restores Validate in Staging, Everything Runs Serialized + +A backup used to be created at its final name before any page was copied, with the copy result ignored — an interrupted copy became an apparently valid backup file. Backups are now built in a temp file, integrity-checked, and only then published without clobbering. Restores validate the whole image — integrity, schema tables, migrations — in a staging database before the live database is touched, so a corrupt or newer-schema backup fails cleanly instead of being discovered mid-replacement; and retention now protects both the backup being restored and the fresh safety snapshot. On the concurrency side: WebDAV and S3 each held their own lock (two transports could restore at once), manual imports and `.db` restores took no lock at all, and the Skills files shared no lock with the database rows they mirror. One global sync lock now serializes every path end-to-end, a Skills state lock keeps rows and files moving together, and auto-sync suppression starts only when a download actually begins — local edits made during the queue wait are no longer silently swallowed. Session-log read cursors are also excluded from cloud snapshots: they are absolute local file positions, and importing another machine's cursors desynced local usage ingestion. ([#6147](https://github.com/farion1231/cc-switch/pull/6147), [#6129](https://github.com/farion1231/cc-switch/issues/6129)) + +### Restoring a Backup Now Rebuilds What Depends on the Database + +Restoring a `.db` backup changed only the database — every app's live config kept its pre-restore content until the next manual provider switch, and the post-import routine after SQL imports and cloud downloads ran against a throwaway state object whose cache invalidations reached nothing. All restore paths now project the restored database outward — the live configs of every managed app except Pi (whose `models.json` stays the source of truth and is re-imported on next launch), per-app prompt files, the runtime log level, and the tray's usage cache — and re-apply your local settings file and user-owned model-pricing overrides on top of the restored rows; one app failing no longer silently skips the rest. ([#6147](https://github.com/farion1231/cc-switch/pull/6147), [#6129](https://github.com/farion1231/cc-switch/issues/6129)) + +### Usage Trend Tooltip and Highlight Agree Across Years + +On a range spanning multiple years, hovering highlighted a point from one year while the tooltip described another: the chart keyed its X axis on the localized MM/DD label, so buckets from different years shared one category value and the chart library's active-point lookup returned the first match — the highlight snapped to the earlier year's point while the tooltip followed the cursor (the plotted points themselves were always in the right place). The axis now keys on the backend's full bucket timestamp, with tick labels and tooltips resolved separately (and a year shown when the range crosses one). ([#6337](https://github.com/farion1231/cc-switch/pull/6337), [#6302](https://github.com/farion1231/cc-switch/issues/6302)) + +### Volcengine Ark: the Agent Plan Preset Now Actually Targets Agent Plan + +The preset named for Agent Plan pointed at Coding Plan where it mattered — the endpoints and the invite link — and the two plans are separate subscriptions that do not share quota. It is split into two presets across six apps: Agent Plan on `/api/plan[/v3]` (native Responses on Codex) and Coding Plan on the old `/api/coding[/v3]`. Plan-quota detection is widened to recognize the Agent Plan endpoints, effective immediately for stored providers; the presets themselves apply to newly created ones — an Agent Plan subscriber with an old provider should re-create it or edit the base URL. ([#6070](https://github.com/farion1231/cc-switch/issues/6070), [#6448](https://github.com/farion1231/cc-switch/issues/6448)) + +### A Batch of Thinking-Switch and Reasoning-Tier Dialect Corrections + +- **ModelScope / Novita / Nvidia thinking dialects**: all three aggregator presets declared the Zhipu-style `thinking:{type}` object none of them documents — on ModelScope and Novita the toggle did nothing, and on Nvidia NIM the injected field could be rejected outright. The first two now send the documented `enable_thinking` boolean; Nvidia's switch is withdrawn entirely — the real control is out of the parameter's reach. The platform inference table gained a ModelScope branch, so hand-created ModelScope providers with no stored declaration are corrected immediately. +- **StepFun reasoning effort reaches step-3.7-flash**: the inference branch only granted effort to the 2603-suffixed models, so the effort picked in Codex was silently dropped for step-3.7-flash; it now passes through verbatim (low/medium/high), the 2603 models keep their two-tier mapping, and the suffix-less step-3.5-flash deliberately gets no effort field — StepFun documents no effort control for it. +- **OpenCode Zen reasoning effort reaches the gateway**: in routing mode, the level picked in Codex never arrived as picked — on the GLM/Kimi/MiMo models the proxy fell back to model-vendor heuristics, dropped the level and sent a Zhipu-shaped field the gateway ignores, and on the DeepSeek models it sent the DeepSeek dialect's coerced value. A platform rule for `opencode.ai` now sends top-level `reasoning_effort`, clamped per model to its declared tiers, and sends nothing for models with no effort control rather than guessing. Existing providers need the preset re-added once to carry the per-model tier table. ([#6123](https://github.com/farion1231/cc-switch/pull/6123), [#6112](https://github.com/farion1231/cc-switch/issues/6112)) +- **SiliconFlow and ModelScope presets pointed at models that do not exist**: a vendor-catalog audit found the SiliconFlow presets shipping a MiniMax id absent from both sites (the first request failed with 400 "Model does not exist") and the ModelScope preset pointing at a GLM id unavailable on its free route. They now ship `Pro/MiniMaxAI/MiniMax-M2.5` (.cn), `MiniMaxAI/MiniMax-M3` (.com, with its real 1M window) and `ZhipuAI/GLM-5.2`, across seven apps. + +### A Batch of Usage and Pricing Corrections + +- **DeepSeek cache hits counted as zero on the Chat path**: relays that forward only DeepSeek's documented `prompt_cache_hit_tokens` — without mirroring it into the OpenAI-style field — had their cache hits recorded as zero, overstating cost by pricing hit tokens as fresh input. The field now sits at the end of the standard fallback chain, on both the usage parser and the synthesized Codex usage. ([#6126](https://github.com/farion1231/cc-switch/pull/6126), [#6073](https://github.com/farion1231/cc-switch/issues/6073)) +- **Grok Build conversations no longer fail on a missing usage field**: every turn a Chat upstream reported no cache tokens failed with "missing field `input_tokens_details`" — with the reported GLM-5.2 upstream, which always sends `cached_tokens: 0`, that was every turn. The Chat→Responses usage translator only emitted that object when cache tokens were present, and the Grok client requires it; it is now always emitted, on the streaming path too. ([#6423](https://github.com/farion1231/cc-switch/pull/6423), [#6140](https://github.com/farion1231/cc-switch/issues/6140)) +- **Zhipu quota tiers reappear after the CREDIT_LIMIT rename**: Zhipu renamed the quota entry type on the mainland endpoint from `TOKENS_LIMIT` to `CREDIT_LIMIT`; the parser filtered on the old value alone, dropped every tier and left the panel empty. Both values are accepted now. ([#6160](https://github.com/farion1231/cc-switch/pull/6160), [#6153](https://github.com/farion1231/cc-switch/issues/6153)) +- **Grok 4.5 cached rate corrected; Grok 4.6 and a DeepSeek alias priced**: `grok-4.5` had been seeded with grok-4.6's $0.50 cached-input rate; it is corrected to the actual $0.30, with a guarded repair for existing databases. `grok-4.6` is seeded at $2/$6 with $0.50 cache read — the base tier: xAI doubles every Grok 4.5/4.6 rate above a 200K prompt and the table has no tier column, so long-context Grok requests read at about half their billed cost. And `deepseek-v4-flash-0731` — a 4-digit date variant the id normalizer cannot strip, so it matched no pricing row and billed at $0 — gets its own row; its historical $0 rows are backfilled at the current rate, so totals for that model rise. + +### Other Fixes + +- **A Skill whose files are missing shows as updatable**: update checks trusted the database-cached content hash without ever looking at the filesystem, so a skill whose files were gone (typically after a cross-machine database restore, which moves rows but not files) permanently reported "no update", and the only recovery was uninstall-reinstall. The check now verifies the skill's directory exists first; a missing directory surfaces as an available update whose install rebuilds the files. This covers repo-installed skills — locally created skills are not update-checked, so missing files there still need a manual re-add. +- **OpenClaw "Set as default" asks which model and preserves your fallbacks**: setting a provider as default always picked its first model and replaced whatever fallback chain `openclaw.json` contained with a synthetic one. Multi-model providers now get a picker, and the write merges into the existing default-model block, preserving fallbacks and unknown keys. ([#6201](https://github.com/farion1231/cc-switch/pull/6201)) +- **A user-owned Codex `model_catalog_json` is no longer overwritten**: switching providers unconditionally repointed `model_catalog_json` in `~/.codex/config.toml` at the app-generated catalog, discarding a custom catalog path. The pointer is now claimed only when absent or already CC Switch's own filename. Prevention only — a pointer already rewritten by an earlier version is not restored, see Upgrade Notes. ([#6087](https://github.com/farion1231/cc-switch/pull/6087)) +- **Angle-bracket text restored in the mirrored DeepSeek Codex catalog**: the bundled mirror of DeepSeek's official Codex catalog had been extracted with HTML unescaping applied before tag stripping, so literal angle-bracket text inside four harness strings was swallowed as markup — mangling an instruction sentence and a markdown-link example in `base_instructions` and both models' message templates. The mirror is byte-faithful again; existing DeepSeek native-Responses providers pick it up on their next switch, no re-save needed. + +--- + +## Security Hardening + +### Model-Fetch Errors No Longer Echo Credentials + +A failed "fetch models" call could reflect the API key back into the visible error message, and masking elsewhere only engaged on secrets of eight or more characters. Fetch error bodies now pass through strict redaction — the API key, and the custom header values this release newly supports, hidden down to one character — for every app's provider form. The fetch itself also became format-aware for Pi: the credential header follows the provider's API format, and validated custom headers are supported, including header-only authentication. ([#6064](https://github.com/farion1231/cc-switch/pull/6064)) + +--- + +## Upgrade Notes + +### This Release Includes a Database Migration; Downgrading Requires the Backup + +The schema migrates from v16 to v17 (the session-usage dedup ledger for the Pi importer), with a backup created automatically before migrating. After this version has run once, older CC Switch builds refuse to open the database — downgrading requires restoring that backup. + +### Pi's First Launch Imports Existing Providers and Backfills Historical Usage + +Pi appears as a new app tab by default. On first launch, providers already written in `~/.pi/agent/models.json` are imported as manageable cards; the first usage sync scans all discoverable Pi sessions and backfills historical usage, so **dashboard totals can jump**. Pi's own login, default provider and default model are never touched. A Pi `sessionDir` configured as a relative path cannot be enumerated — set an absolute one for the session browser and usage import. + +### WSL Users on v3.19.2 Should Upgrade Directly + +If you are on v3.19.2 with a WSL-hosted config directory, existing configurations cannot be updated or switched on that version — upgrade directly to this release. + +### The Stale MSI Registry Key Is Not Cleaned Up + +Windows machines installed from any MSI between v3.4.0 and v3.19.2 keep a stale `HKCU\Software{{manufacturer}}{{product_name}}` registry key after upgrading; the fix does not delete it. Remove it manually with regedit if you want it gone — note that deleting it may trigger a one-time Windows Installer repair prompt, since it was registered as the install's key path. + +### Some ChatGPT Accounts Need One Re-Login + +ChatGPT accounts signed in to the Auth Center before this release predate the persisted id_token and show a "Re-login required" badge; sign them in once more before binding them to a provider card. A ChatGPT login already wiped by the pre-fix takeover-restore bug is likewise not restored — run `codex login` once. + +### Official Cards Are Filtered Out of the Failover Queue + +If the built-in Codex official card was in your auto-failover queue, it is now filtered out and Auto mode will not start from an official card; pick a third-party Codex provider as the primary instead. + +### Stopping Codex Takeover on WSL / exFAT Now Refuses the Restore + +On WSL or exFAT config directories, stopping Codex takeover now refuses with a clear "filesystem does not support safe recovery" error instead of risking a half-written auth file. Nothing is deleted, but the pre-takeover credentials are **not written back** either — run `codex login` again afterwards, or keep the Codex directory on a filesystem that supports the safety probe. + +### Preset Changes Apply Only to Newly Created Providers (Exceptions Below) + +A stored provider keeps the settings it was created with. In this release that covers: the Volcengine Agent Plan endpoints, the ModelScope/Novita/Nvidia thinking dialects, Kimi reasoning effort, BytePlus native Responses, the SiliconFlow/ModelScope model-id replacements, OpenCode Go's direct connection and 1M context window, the pre-filled reasoning tiers, and RunAPI's new domain. Re-create the provider from the preset (or edit the relevant field) to pick these up. **Exceptions that apply to existing providers immediately**: the Kimi passthrough change, the platform inference corrections (ModelScope, StepFun, opencode.ai) for providers without a stored reasoning declaration, quota detection for the Volcengine Agent Plan endpoints, and the corrected DeepSeek vendor catalog (on the provider's next switch). + +### A Rewritten `model_catalog_json` Pointer Needs One Manual Reset + +If an earlier version already rewrote `model_catalog_json` in `~/.codex/config.toml`, this release does not restore your original pointer — point it back at your own file once, and it will be left alone from then on. While it points at a user-owned file, CC Switch's per-provider model table (display names, context windows, reasoning levels) does not reach Codex. + +### Saving a Grok Build Provider Pins `api_backend` + +Saving an existing Grok Build provider through the form pins its stored `api_backend` to `responses` — written to the live config immediately if it is the current provider, otherwise on the next switch to it; the upstream protocol is set via Advanced → Upstream Format instead. + +### Text Corrupted by the IME Bug Needs a One-Time Re-Edit + +Text corrupted by the input-method bug before this release stays corrupted in the database and live configs — re-edit the affected provider name/key/model fields once. + +### DeepSeek V4 Cost Readings Rise Sharply + +DeepSeek V4 costs in the dashboard rise going forward — roughly 3x on input, 4.5–4.7x on output, and 5x (Flash) to 12x (Pro) on cache reads. That is the vendor's new peak-tier list price, not an accounting change. Costs are frozen at log time, so history is not re-priced — except that previously-unpriced `deepseek-v4-flash-0731` rows are backfilled from $0 at the current peak-tier rate, so those historical totals read high. Manually edited prices are never touched. Gemini 3.7 Flash is seeded at the introductory price the vendor lists through 2026. + +### Backup and Restore Behavior Changes + +SQL backups exported by earlier versions keep their old fidelity loss — export a fresh backup if you rely on exact round-tripping. A truncated or table-missing SQL file is now rejected at import where an earlier version might have accepted it; and restoring a `.db` backup now rewrites the live config files of every managed app except Pi from the restored database, where it previously changed only the database. With WebDAV/S3 auto-sync enabled, project-profile edits now queue snapshot uploads they previously did not. + +### Unrepresentable WebSearch Constraints Fail Explicitly + +Claude Code WebSearch requests carrying constraints the Responses API cannot represent (`blocked_domains`, non-direct callers, `response_inclusion`, or `max_uses` on Codex OAuth without forcing the tool) now fail with an explicit error instead of searching more broadly than asked; Chat-format upstreams still do not serve hosted WebSearch. + +### If a Kimi Endpoint Starts Returning Thinking-Related 400s + +Check the `thinking` / `reasoning_effort` fields the re-added presets now send first — Moonshot's parameter page and its Codex integration guide disagree on whether kimi-k3 accepts `thinking`, and the presets follow the guide. Only a 400 demanding that thinking history be passed back would point at the removed history injection instead. + +--- + +## 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 + +Thirty-eight of this release's 69 commits come from 11 outside contributors — every one of the three main lines had deep outside involvement. + +### Code Contributions + +- Thanks to @SaladDay — 19 commits, this release's largest contributor: the entire Pi line ([#6064](https://github.com/farion1231/cc-switch/pull/6064), [#6463](https://github.com/farion1231/cc-switch/pull/6463)), the entire Codex multi-account line ([#3879](https://github.com/farion1231/cc-switch/pull/3879), [#6535](https://github.com/farion1231/cc-switch/pull/6535), [#6506](https://github.com/farion1231/cc-switch/pull/6506), [#6537](https://github.com/farion1231/cc-switch/pull/6537)), the ten-PR form consistency pass, the Windows startup-flash fix ([#6252](https://github.com/farion1231/cc-switch/pull/6252)) and the Grok Build usage-field fix. +- Thanks to @YUZHEthefool: the two backup and sync hardening waves ([#6146](https://github.com/farion1231/cc-switch/pull/6146), [#6147](https://github.com/farion1231/cc-switch/pull/6147)) — the three big data-reliability entries in "Fixed" are this work; plus the Windows CLI detection overhaul ([#6284](https://github.com/farion1231/cc-switch/pull/6284)), model-picker fuzzy search ([#6285](https://github.com/farion1231/cc-switch/pull/6285), [#6353](https://github.com/farion1231/cc-switch/pull/6353)), the Zhipu CREDIT_LIMIT fix and the Grok Build form alignment. +- Thanks to @allenxu09: the hotfix for v3.19.2's WSL write regression ([#6232](https://github.com/farion1231/cc-switch/pull/6232)) and CI coverage on real WSL2 filesystems ([#6233](https://github.com/farion1231/cc-switch/pull/6233)) — fixing the bug and closing the test gap that let it ship. +- Thanks to @Program120: the WebSearch and Alpha Search proxy bridge ([#5681](https://github.com/farion1231/cc-switch/pull/5681)) — one person opened this release's third main line. +- Thanks to @stofancy: per-model reasoning levels in the Codex catalog ([#6228](https://github.com/farion1231/cc-switch/pull/6228)) — the foundation of this release's reasoning-tier pass. +- Thanks to @zayokami: OpenCode Zen reasoning-effort routing ([#6123](https://github.com/farion1231/cc-switch/pull/6123)), DeepSeek cache-hit accounting ([#6126](https://github.com/farion1231/cc-switch/pull/6126)) and the Grok Build wording fix ([#6511](https://github.com/farion1231/cc-switch/pull/6511)). +- Thanks to @yovinchen: the macOS input-method corruption fix and its hardening ([#6333](https://github.com/farion1231/cc-switch/pull/6333), [#6507](https://github.com/farion1231/cc-switch/pull/6507)). +- Thanks to @Hexc01: the multi-year usage-trend alignment fix ([#6337](https://github.com/farion1231/cc-switch/pull/6337)). +- Thanks to @misaka-myu: respecting a user-owned `model_catalog_json` ([#6087](https://github.com/farion1231/cc-switch/pull/6087)). +- Thanks also to @hu-miao and @jiekouai for contributing their platforms' presets ([#6239](https://github.com/farion1231/cc-switch/pull/6239), [#6356](https://github.com/farion1231/cc-switch/pull/6356)). + +### Issue Reports + +- Thanks to @vxzhong for the WSL write-regression report in [#6188](https://github.com/farion1231/cc-switch/issues/6188) — pinpointing os error 50 framed the hotfix directly. +- Thanks to the Windows CLI-detection five-issue family: @RonsonNamek ([#6061](https://github.com/farion1231/cc-switch/issues/6061)), @gaoqiong001 ([#6278](https://github.com/farion1231/cc-switch/issues/6278)), @lovelyhjqhs ([#6047](https://github.com/farion1231/cc-switch/issues/6047)), @baoyu0 ([#4366](https://github.com/farion1231/cc-switch/issues/4366)) — and @jiangliushi666, who flagged the PATH probe-order problem earlier in [#4701](https://github.com/farion1231/cc-switch/pull/4701). +- Thanks to @HyskoaMorroh for reporting the takeover restore wiping the ChatGPT login ([#6277](https://github.com/farion1231/cc-switch/issues/6277)), @CacinieP for the precise IME-corruption reproduction ([#6308](https://github.com/farion1231/cc-switch/issues/6308)), @FishV6A for the startup flash ([#6182](https://github.com/farion1231/cc-switch/issues/6182)), and @Destiny4073 for the MSI registry mis-write ([#6283](https://github.com/farion1231/cc-switch/issues/6283)). +- Thanks to @totoneei ([#6302](https://github.com/farion1231/cc-switch/issues/6302)), @zju-zhanglu ([#6153](https://github.com/farion1231/cc-switch/issues/6153)), @xiaoyu753 ([#6073](https://github.com/farion1231/cc-switch/issues/6073)), @GengchenXU ([#6140](https://github.com/farion1231/cc-switch/issues/6140)), @HOnnTaka ([#6112](https://github.com/farion1231/cc-switch/issues/6112)), @Xiao0219 ([#6171](https://github.com/farion1231/cc-switch/issues/6171)), @STEVENTAN100 ([#6181](https://github.com/farion1231/cc-switch/issues/6181)), @20130101 ([#6070](https://github.com/farion1231/cc-switch/issues/6070)) and @leoncdq ([#6448](https://github.com/farion1231/cc-switch/issues/6448)) — a whole batch of usage, quota and tier corrections started from these reports. + +--- + +## 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.20.0-Windows.msi` | **Recommended** - MSI installer with auto-update | +| `CC-Switch-v3.20.0-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.20.0-macOS.dmg` | **Recommended** - DMG installer, drag to Applications | +| `CC-Switch-v3.20.0-macOS.zip` | Unzip and drag to Applications, Universal Binary | +| `CC-Switch-v3.20.0-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.20.0-Linux-x86_64.AppImage` / `.deb` / `.rpm` +- `CC-Switch-v3.20.0-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` | diff --git a/docs/release-notes/v3.20.0-ja.md b/docs/release-notes/v3.20.0-ja.md new file mode 100644 index 000000000..aaab2a096 --- /dev/null +++ b/docs/release-notes/v3.20.0-ja.md @@ -0,0 +1,394 @@ +# CC Switch v3.20.0 + +> 本リリースは 3 つの構造的な主軸で成り立っています。**Pi が 9 番目の管理対象アプリになりました**——プロバイダ・プロンプト・Skills・セッションブラウザ・使用量統計をひとつの場所で。**Codex が複数の ChatGPT アカウントに対応しました**——認証センターに好きなだけサインインし、公式カードごとにアカウントを紐付け、切り替えで課金先を取り違えることはありません。そして **Claude Code 内蔵の WebSearch が GPT ルーティングでついに動くようになりました**。緊急の修正も 1 件あります。v3.19.2 は WSL パス上で既存設定の更新・切り替えができませんでした——該当するユーザーは本リリースへ直接アップグレードしてください。同じ Windows の一群には、バージョン検出の全面刷新(5 件の issue を一挙に修正)、起動時のちらつき修正、MSI レジストリキーの是正も含まれます。本リリースには**データベースマイグレーション(v16 → v17)が含まれます**——マイグレーション前にバックアップが自動作成され、ダウングレードにはその復元が必要です。 + +**[English →](v3.20.0-en.md) | [中文版 →](v3.20.0-zh.md)** + +--- + +## ハイライト:本リリースでできること + +- **CC Switch で Pi を管理する**:9 番目の管理対象アプリです([#6064](https://github.com/farion1231/cc-switch/pull/6064))。プロバイダフォームは Pi のネイティブスキーマに沿った構造化エディタで、58 のプリセットと 57 モデルの能力カタログを内蔵。プロンプトライブラリ、`SYSTEM.md` / `APPEND_SYSTEM.md` エディタ、スラッシュコマンドテンプレート、Skills、セッションブラウザ、インストール/アップグレードも揃っています。Pi 自身のログイン・既定プロバイダ・既定モデルには**一切触れません**。初回起動時に `models.json` 内の既存プロバイダをインポートします——[アップグレード時の注意](#pi-の初回起動は既存プロバイダのインポートと過去使用量の取り込みを行います)を参照してください。 +- **ダッシュボードで Pi のセッション使用量を見る**:モデルごとのトークン・コスト・エラー・中断ターンを、専用の「Pi (Session)」ソースとアプリフィルタで表示。増分同期はファイルに追記された分だけを解析します([#6463](https://github.com/farion1231/cc-switch/pull/6463))。 +- **Codex 公式プロバイダの追加時に認可済み ChatGPT アカウントを直接選ぶ**:認証センターに複数のアカウントをサインインし、新しい公式カードの作成時にドロップダウンから 1 つ選んで紐付けます。従来どおり、紐付けのない空の公式カード(Codex CLI 自身のログインに追従し、ローカルの access token を読む方式)も選べます。紐付けカードへの切り替えはそのアカウントの完全なトークン一式を書き込みます——素の `codex` CLI もそのアカウントとして動作し、自力で更新も可能です([#3879](https://github.com/farion1231/cc-switch/pull/3879)、[#6535](https://github.com/farion1231/cc-switch/pull/6535))。 +- **GPT ルーティングで Claude Code 内蔵の WebSearch を使う**:検索は上流で実行され、結果は引用付きで返り、回数は使用量に計上されます。新しい Codex クライアントが呼ぶ Alpha Search エンドポイントも 404 ではなくなりました([#5681](https://github.com/farion1231/cc-switch/pull/5681))。 +- **v3.19.2 の WSL 障害から抜け出す**:v3.19.2 は `\\wsl.localhost` パス上で既存設定の更新・切り替えができず([#6188](https://github.com/farion1231/cc-switch/issues/6188))、そのバージョン内に回避策はありません——本リリースへ直接アップグレードしてください。CI は今後、実際の WSL2 ファイルシステム上でテストを実行します([#6233](https://github.com/farion1231/cc-switch/pull/6233))。 +- **Windows のバージョン検出をターミナルと同じ目線にする**:検出はレジストリ PATH(ユーザー+マシン)をマージし、スタンドアロンインストーラのディレクトリを走査し、PATH の既定を最優先で探します——アプリ内自己更新後の「未インストール」、winget 版 Claude Code の未検出、古い npm shim による新バージョンの隠蔽という 5 件の issue 一族を一挙に修正しました([#6284](https://github.com/farion1231/cc-switch/pull/6284))。 +- **モデルごとに実際へ対応する思考レベルを宣言する**:Codex モデルカタログは 8 つの標準レベルからのモデル単位の複数選択と既定値に対応し、各プリセットはベンダー文書に基づく実レベルを事前設定済みです([#6228](https://github.com/farion1231/cc-switch/pull/6228))。 +- **バックアップを信頼する**:SQL バックアップは全値を忠実に往復し、切り詰められたファイルはインポート前に拒否されます([#6146](https://github.com/farion1231/cc-switch/pull/6146))。バックアップファイルはアトミックに公開され、復元はまずステージングデータベースで検証し、`.db` 復元は各アプリの live 設定を再構築し、すべての同期/復元経路は厳密に直列実行されます([#6147](https://github.com/farion1231/cc-switch/pull/6147))。 +- **数百のモデルから直接検索する**:全アプリのモデルドロップダウンが入力フィルタ付きコンボボックスになり、モデル id とベンダー名の両方でマッチします([#6285](https://github.com/farion1231/cc-switch/pull/6285))。 +- **白/黒のちらつきなしで起動する**:テーマは初回描画前に同期適用され、Windows ではページ読み込み完了までウィンドウが非表示のままです([#6252](https://github.com/farion1231/cc-switch/pull/6252))。 + +--- + +## 利用ガイド + +本リリースの変更はプロバイダ管理と使用量統計に集中しています。以下のドキュメントとあわせてお読みください: + +- **[プロバイダの追加](../user-manual/ja/2-providers/2.1-add.md)**:Pi と新プリセットの入口です。 +- **[使用量統計](../user-manual/ja/4-proxy/4.4-usage.md)**:Pi セッション使用量の出所と集計基準、そして DeepSeek の価格改定が数字へ与える影響。 +- **[リクエストルーティング](../user-manual/ja/4-proxy/4.2-routing.md)**:WebSearch ブリッジが適用されるルーティングのシナリオです。 + +--- + +> [!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.20.0 はほぼすべてのサブシステムにまたがり、軸は 3 つあります。1 つ目は対応範囲の拡大です。Pi が 9 番目の管理対象アプリとなり、プロバイダ編集からセッション使用量までエンドツーエンドで接続され、本リリース唯一のデータベースマイグレーション(v16 → v17、Pi 使用量の重複排除台帳)をもたらします。Codex 側では要望の多かった複数 ChatGPT アカウント管理が実現し、公式カードはアカウントを個別に紐付けられるうえ、意図的に自動フェイルオーバーから外れます——リトライが別アカウントに課金することは決してありません。2 つ目はプロキシ能力です。Claude Code 内蔵の WebSearch を OpenAI Responses と Codex OAuth バックエンドへブリッジし、Codex 単体の Alpha Search エンドポイントをセマンティックパススルーとして登録しました——「GPT ルーティングではウェブ検索が使えない」は過去の話です。 + +3 つ目は Windows とデータ信頼性の負債返済です。v3.19.2 の WSL 書き込みリグレッションのホットフィックス(実 WSL2 の CI カバレッジも追加)、レジストリ PATH に基づくバージョン検出の刷新、起動時のちらつき修正、v3.4.0 以来 MSI が書き込んでいたゴミレジストリキーの是正。バックアップと同期は外部コントリビューターの監査を経て二波の強化が入りました——値の完全往復、アトミックな公開、ステージング検証、厳密な直列化です。加えて、Codex の思考レベル体系の一巡(モデル単位のレベル+ベンダー文書のレベル事前設定+アグリゲータの方言修正)、プロバイダフォームの一貫性向上、macOS の日本語・中国語入力の修正、DeepSeek V4 のベンダー新価格への改定があります。 + +**リリース日**:2026-08-18 + +**変更規模**:69 commits | 284 files changed | +53,108 / -6,678 lines + +--- + +## 新機能 + +### Pi が 9 番目の管理対象アプリに + +Pi は加算モードで動作します(OpenCode・Hermes と同型)。プロバイダの有効化は `~/.pi/agent/models.json` にキーが存在することと等価で、複数プロバイダが共存します。プロバイダフォームは Pi のネイティブスキーマに沿った構造化エディタです——API 形式、Pi の 7 段階にわたるモデル単位の思考レベルマップ、互換キー——58 のプリセット(フォームが提供する 5 つの API 形式のうち 4 つをカバー)と人手でレビューした 57 モデルの能力カタログを内蔵し、生 JSON エディタとモデル取得ボタンが補完します。既存ノードの未知フィールドはそのまま保持されます。すべての読み取り・変更・書き込みは内容リビジョン検査で守られ、別プロセスに変更されたファイルは競合エラーで拒否され、上書きされることはありません。 + +境界は意図的に引かれ、文書化されています。CC Switch は Pi の組み込みプロバイダを models.json に**決して**実体化せず、Pi の `auth.json` を**決して**読み書きせず、`defaultProvider` / `defaultModel` に**決して**触れません——Pi 自身のログインとモデル選択は Pi のものです。プロバイダ以外では:選んだ 1 件を Pi のグローバル `AGENTS.md` に書き込むプロンプトライブラリ(一致しない既存内容は先にライブラリ項目として自動バックアップ)、`SYSTEM.md`(Pi の基本プロンプトを置換)と `APPEND_SYSTEM.md` の専用エディタ、`~/.pi/agent/prompts/*.md` のスラッシュコマンドテンプレート管理、「存在=有効」規則の Skills(CC Switch の所有でない同名 Skill は上書きも削除もしません)、JSONL セッションブラウザ、設定 → バージョン情報からの Pi インストール/アップグレードがあります。Pi にはネイティブの MCP レジストリがないため、意図的に MCP 同期から外れています。プロキシ引き継ぎ・フェイルオーバー・トレイ表示もありません——プロキシとフェイルオーバーのコマンドは、ローカルゲートウェイのないすべてのアプリを明示的に拒否するようになりました。死んだ設定を書き込むことはありません。([#6064](https://github.com/farion1231/cc-switch/pull/6064)) + +### Pi のセッション使用量がダッシュボードに + +新しいインポーターが Pi のセッションファイルを読み取り、専用の「Pi (Session)」ソースとアプリフィルタの下で、モデルごとのトークン・コスト・エラー・中断ターンを記録します。Pi は記録ごとに自前のコストを報告し、正の値であれば優先採用します。欠落またはすべてゼロの場合は CC Switch の価格表にフォールバックします。増分同期は各ファイルの末尾をフィンガープリントし、追記されたバイトだけを解析します。書き換えられたセッションや分岐したセッションは、新しい永続台帳——本リリースの v16 → v17 マイグレーションの理由である `session_usage_dedup` テーブル——で重複排除されます。この台帳は明細行の削除後も存続し、デバイスローカルに留まります(クラウド同期から除外、インポート時は保持)。Pi のセッションは Anthropic 系と OpenAI 系の API を混在させうるため、Pi を含む合計には無条件の数字ではなく「キャッシュ書き込みが不完全」の注記が付きます。([#6463](https://github.com/farion1231/cc-switch/pull/6463)) + +### Codex:複数の ChatGPT アカウント、カードごとの紐付け + +認証センターは任意の数の ChatGPT(Codex OAuth)サインインを保持できます。**Codex 公式プロバイダの追加時、フォーム内で認可済みアカウントから直接 1 つ選んで紐付けられます**——先にカードを作って後から設定し直す必要はありません。従来どおり、紐付けのない空の公式カード(Codex CLI 自身のログインに追従し、ローカルの access token を読む方式)も選べます。公式カードの数に制限はなく、両方式のカードが共存でき、紐付け・解除でカードの識別情報・エンドポイント・健全性履歴は保たれます。紐付けカードへの切り替えはそのアカウントの**完全なトークン一式**を `~/.codex/auth.json` に書き込みます——素の `codex` CLI もそのアカウントとして動作し、アクセストークンの寿命を超えて自力更新できます。同一アカウントで CLI がローテーションしたリフレッシュトークンは書き込み前に取り込まれるため、再切り替えが新しいログインを古いもので上書きすることはありません。 + +アカウント選択はラベル付きドロップダウンで、認証センターへ直接ジャンプできます。アカウント状態の**読み込み失敗**は「未サインイン」と誤読させる代わりに再試行付きの警告を表示し、次回保存時に静かに紐付けを解除することもなくなりました。サインアウトとアカウント削除はプロバイダ切り替えと直列化され、OAuth リクエストのタイムアウトは 10 分から 30 秒に短縮。サインアウトはネットワーク往復中のデバイスログインもキャンセルします——放棄されたフローがバックグラウンドで完了して静かにアカウントを復活させることはもうありません([#6506](https://github.com/farion1231/cc-switch/pull/6506))。引き継ぎ経由のリクエストは紐付けアカウントと照合されます。別の ChatGPT アカウントとして認証されたままの Codex セッションは、誤ったアカウントへ静かに課金する代わりに「Codex を再起動してください」という明確なエラーになります。([#3879](https://github.com/farion1231/cc-switch/pull/3879)、[#6535](https://github.com/farion1231/cc-switch/pull/6535)、[#6506](https://github.com/farion1231/cc-switch/pull/6506)) + +### Codex モデルカタログ:モデル単位の思考レベル + +Codex プロバイダフォームの各モデル行で、上流が実際に受け付ける思考レベルを宣言できるようになりました——8 つの標準レベル(none から ultra)からの複数選択と任意の既定値です——生成されるカタログはベーステンプレートを継承する代わりにそれらを Codex の選択肢へ運びます。未知の値は破棄され(タイプミスが Codex に届くことはありません)、明示的な既定値は宣言セットに対して検証され、上書きはネイティブ Responses と Chat 変換の両経路で有効です。プロキシ変換は同時に `ultra` を学びました。これまでルーティングされたプロバイダで最深レベルを選ぶと、拡張思考が静かに無効化されるか(Anthropic 経路)、effort パラメータが落ちていました。現在は上流の合法な最深レベルにマップされます。([#6228](https://github.com/farion1231/cc-switch/pull/6228)、[#6181](https://github.com/farion1231/cc-switch/issues/6181)) + +### 各社プリセットにベンダー文書どおりの思考レベルを事前設定 + +プリセットは各ベンダーが実際に文書化しているレベルを搭載するようになりました——Volcengine Ark low/medium/high、DouBaoSeed minimal〜high、Hunyuan low/high、DeepSeek low/high/max、xAI Grok low/medium/high(`none` なし:思考は無効化できません)、Zhipu GLM none/high など——新規作成したプロバイダの Codex 選択肢は事実から始まります。Zhipu GLM では「思考を無効化」が Codex からそもそも選べるようになりました。2 つの Kimi プリセットは Moonshot 自身の接続ガイドに従い推論強度を有効化し(トップレベルの `reasoning_effort`、ゲートウェイが受け付けるレベルのみ)、Kimi For Coding は 1 モデルから公式の 4 モデルに拡大。百度 Qianfan Coding Plan プリセットはプラットフォーム文書化の `thinking` オブジェクトによる本物の思考オン/オフを獲得しました。レベルはベンダー文書またはベンダー自身の Codex カタログに由来し、実際に挙動が異なるレベルへ絞り込まれています——根拠が皆無のモデルは未設定のままです。 + +### Claude Code WebSearch と Codex Alpha Search がローカルプロキシを通過 + +プロキシで行き止まりだった 2 つのウェブ検索経路が開通しました。Claude Code 内蔵の WebSearch ツールは OpenAI Responses と Codex OAuth バックエンドへブリッジされます。検索は上流で実行され、結果は引用を保持・統合した Anthropic 検索ブロックの組として返り、検索回数は使用量に計上されます。`max_uses` は Responses API が対応する箇所では `max_tool_calls` によりネイティブに強制されます。Codex OAuth バックエンドはそのパラメータを拒否するため、リクエストがホスト型ツールを強制する場合に限りストリーム途中の打ち切りでローカルに強制し、強制していないのに `max_uses` を持つリクエストは明示的にエラーとなります。Responses API が表現できない制約(`blocked_domains`、非直接の呼び出し元、`response_inclusion`、未知のツールバージョン)も同様に明示的に失敗し、指定より広く検索することはありません。ブリッジは Responses 変換経路のみが対象です——Chat Completions 上流はいまもホスト型 WebSearch を提供できません。これとは別に、Codex 単体の Alpha Search エンドポイントがセマンティックパススルーとして登録され、プロバイダ選択・認証・モデルマッピング・リトライ・ログの完全なパイプラインを備え、新しい Codex クライアントの 404 は終わりました。Claude-in-Codex ルーティングガイドは 3 言語で更新済みです。「GPT ルーティングではウェブ検索が使えない」は、これらの経路ではもう当てはまりません。([#5681](https://github.com/farion1231/cc-switch/pull/5681)、[#5363](https://github.com/farion1231/cc-switch/issues/5363)、[#5378](https://github.com/farion1231/cc-switch/issues/5378)) + +### 百度 Qianfan Token Plan プリセット + +Qianfan の Token Plan(個人版)——2026 年 7 月に新規購入の Coding Plan を置き換えたもの——が、`/tokenplan/personal` エンドポイント上で Claude Code・Claude Desktop・Codex・OpenCode・OpenClaw・Hermes の 6 アプリのプリセットを獲得しました。Codex プリセットは 6 モデルのカタログ(DeepSeek V4 Pro / V4 Flash / V4 Flash 0731、GLM 5.2/5.1、Kimi K2.6)を搭載し、思考スイッチと推論強度セレクタの両方が実際に機能する初の Qianfan プリセットです。キーは Token Plan サブスクリプション専用のキーが必要で、汎用の Qianfan アプリケーションキーではありません。既存契約向けに旧 Coding Plan プリセットは残ります。 + +### すべてのモデル選択にファジー検索 + +プロバイダフォームのあらゆる「モデルを選ぶ」ドロップダウン——Claude Code(Copilot 含む)、Claude Desktop のマッピング行、Codex、Gemini CLI、OpenCode、Hermes、OpenClaw、Pi——が入力フィルタ付きコンボボックスになり、モデル id とベンダー名の両方でマッチし、あわせて 4 つの重複インライン実装を 1 つに統合しました。数百のモデルを返すプロバイダに特に有効です。([#6285](https://github.com/farion1231/cc-switch/pull/6285)、[#6353](https://github.com/farion1231/cc-switch/pull/6353)) + +### その他の新機能 + +- **引き継ぎオン時の確認アニメーション**:現在のアプリでルーティング引き継ぎをオンにすると、ヘッダーのブランド部で短い一回限りのエフェクトが再生されます——アプリ起動時、アプリ切り替え時、「視差効果を減らす」設定時には決して発火しません。同じ変更が実際の欠陥も塞ぎました。引き継ぎスイッチは初期プロキシ状態の読み込み完了まで無効化され、未知の状態へのクリックが引き継ぎを誤った方向に倒すことはもうありません。([#6209](https://github.com/farion1231/cc-switch/pull/6209)) +- **Codex フォームに 1M コンテキストウィンドウのトグルが復活**:上流の Codex が `model_context_window = 1000000` を再び受け付けるため、4 月に隠したトグル(対になる自動圧縮しきい値の入力も)が戻りました。書き込むのは従来と同じ 2 つの config.toml フィールドです。 +- **新プリセット**:PPIO(ベンダー貢献)、JieKou AI(ベンダー貢献)、XycAi(パートナー)が、それぞれ対応アプリに追加されました。([#6239](https://github.com/farion1231/cc-switch/pull/6239)、[#6356](https://github.com/farion1231/cc-switch/pull/6356)) + +--- + +## 変更 + +### Codex 公式アカウントカードは自動フェイルオーバーから離脱 + +公式 ChatGPT カードはフェイルオーバーキューへの追加・列挙・リトライの対象外となり、公式ルート上のすべてのエラー種別はリトライ不可です——別プロバイダへのリトライは、入ってきた ChatGPT 認可を別アカウントに対して使い回すことになるためです。組み込み公式カードの既存キュー行は読み取り時に除外されます。公式カードの判定もカテゴリラベルだけに頼るのをやめました。保存設定に実 API キーや明示的なサードパーティ上流を持つカードは通常プロバイダとして扱われ、直接 API 経路とフェイルオーバー資格を保ちます。([#3879](https://github.com/farion1231/cc-switch/pull/3879)、[#6535](https://github.com/farion1231/cc-switch/pull/6535)) + +### Codex OAuth の残量表示はカードごとに設定可能に + +ChatGPT アカウントを紐付けたカードは、スクリプト型プロバイダと同じ「使用量設定」の入口を獲得します。残量フッターはオフにでき、更新間隔も変更可能(従来は 5 分固定でオフのスイッチなし)。ダイアログのテストボタンは CLI がたまたまログインしているアカウントではなく**紐付けたアカウント**へ問い合わせ、トレイがアカウント紐付けカードにアプリ全体のサブスクリプション割合を飾ることもなくなりました。([#6537](https://github.com/farion1231/cc-switch/pull/6537)) + +### OpenCode Go は直接接続に + +OpenCode Go ゲートウェイはネイティブの Anthropic Messages を提供しますが、その `/v1/messages` は `x-api-key` しか受け付けず、Bearer ヘッダーを静かに無視します——そこで Claude Code プリセットはキーを `ANTHROPIC_API_KEY` として保存し、Chat 形式宣言を外しました。Claude Code はゲートウェイへ直接つながり、ルーティング引き継ぎも「ルーティングが必要」バッジも不要です。Claude Desktop は設計上プロキシモードを維持します(自身でモデル名を変更できないため)が、プロキシは OpenAI Chat への変換ではなく Anthropic Messages のパススルーになりました。Codex 側プリセットは DeepSeek V4 系モデルのコンテキストウィンドウを 1,048,576 に設定し、Codex が 128K フォールバック付近で自動圧縮するのを止めます。([#6171](https://github.com/farion1231/cc-switch/issues/6171)、[#6196](https://github.com/farion1231/cc-switch/pull/6196)) + +### プロバイダフォームの一貫性向上 + +コントリビューター主導で全アプリのプロバイダダイアログを揃える一巡です。Grok Build と Claude Desktop のフォームは他と同じガラスカードに移動。サブセクションは 1 つの左罫線階層を共有。空の設定エディタは 6〜14 行を確保する代わりに 3 行へ収縮。Hermes と OpenClaw のモデルエディタは展開可能な詳細を備えたコンパクト行になり、アクセシビリティラベルも整備(展開状態は安定した行キーで管理され、モデル削除で無関係な行が開いたままになることはもうありません)。チェックボックスは 1 つのネイティブコンポーネントに統一。Claude フォームの「API 形式」は「上流形式」に改名され、どの形式にルーティング引き継ぎが必要かの選択肢ごとの説明が付きました。あわせて、メインパネルのプロバイダカードからパートナーの星印を撤去——パートナー表示はプリセット選択画面にのみ残ります。([#6198](https://github.com/farion1231/cc-switch/pull/6198)–[#6201](https://github.com/farion1231/cc-switch/pull/6201)、[#6203](https://github.com/farion1231/cc-switch/pull/6203)–[#6208](https://github.com/farion1231/cc-switch/pull/6208)) + +### Claude Desktop:接続モードはドロップダウンで選択、モデルリストは別々に保持 + +直接接続とモデルマッピングはスイッチではなくラベル付きドロップダウンで選ぶようになりました。行き来してもモードごとのモデル行は保持され、直接モードのモデルリストは「詳細」折りたたみに隠れる代わりに常時表示、直接プリセットの選択はモデルリストを破棄せず事前設定します。([#6208](https://github.com/farion1231/cc-switch/pull/6208)) + +### Grok Build フォームは Codex レイアウトの上に再構築 + +Grok Build のプロバイダダイアログは Codex と共有のフィールドセット——エンドポイント・キー・既定モデル・上流形式/思考/User-Agent を含む詳細オプション——を、全体を Grok 向けの文言で描画するようになりました(整列時に紛れ込んだ Codex 文言のヒント 5 か所はフォローアップが捕捉)。独立した「API Backend」と「クライアントモデルプロファイル」の入力は撤去。クライアントは常に Responses を話します——Chat や Anthropic の上流で変換が必要ならローカルプロキシへ、それ以外は上流へ直接——上流プロトコルは詳細 → 上流形式で表現します。フォーム経由の保存は保存設定の `api_backend` を `responses` に固定します——現在のプロバイダには即座に live 設定へ反映、それ以外は次回の切り替え時に反映——「アップグレード時の注意」を参照してください。([#6427](https://github.com/farion1231/cc-switch/pull/6427)、[#6511](https://github.com/farion1231/cc-switch/pull/6511)) + +### Kimi 上流はクリーンなパススルーに + +Moonshot 側の要請により、プロキシは Kimi/Moonshot エンドポイントのツール呼び出し履歴へプレースホルダー思考ブロックを注入することも、非標準の `reasoning_content` フィールドを発出することもやめました——同社のゲートウェイはもう思考リプレイを要求せず、注入されたプレースホルダーはむしろモデルの思考連鎖を乱していました。Kimi ルートのツール呼び出し履歴はそのまま転送され(プロキシパイプラインの他の部分は不変)、既存プロバイダに即時適用されます。DeepSeek と MiMo はこの挙動を維持します——そちらは文書に明記されたサーバー側要件です。 + +### DeepSeek V4 を新ピーク価格に改定、Gemini 3.7 Flash を追加 + +DeepSeek は 2026-08-16 にピーク/オフピーク課金を導入し、大幅に値上げしました。`deepseek-v4-flash`(および `-0731`、`deepseek-chat`、`deepseek-reasoner` の別名)の組み込み価格は 100 万トークンあたり入力/出力 $0.14/$0.28 から **$0.44/$1.32**(キャッシュ読み取り $0.014)へ、`deepseek-v4-pro` は $0.435/$0.87 から **$1.32/$3.96**(キャッシュ読み取り $0.044)へ移行します。価格表に時間帯の次元はないため、**意図的にピーク価格を記録しています**——ピーク時間帯(北京時間 9:00–12:00、14:00–18:00)は業務時間と重なります。したがって 1 日の残り 17 時間の使用量は、実際の請求のおよそ 2 倍で表示されます。保護付きの修復が旧組み込み価格を保持するデータベースを移行し、自分で編集した価格には決して触れません。`gemini-3.7-flash` は導入価格 $0.75/$3.75(キャッシュ読み取り $0.075)で追加され、2027 年から定価に戻ります。`gemini-3.6-flash` は変更なしです——プロモーション価格の対象ではありません。 + +### その他の変更 + +- **BytePlus プリセットをネイティブ Responses に切り替え**:BytePlus 自身の Codex ガイドが、プリセットが使うまさにそのエンドポイントで `wire_api = "responses"` を設定しているため、国内の Volcengine 系プリセットと同様にネイティブ Responses を宣言し、文書化された low/medium/high レベルを事前設定します。 +- **Codex フォームから Goal モードのトグルを撤去**:codex-cli 0.147.0 が goals を既定で有効にしたため、トグルは積極的に誤解を招くものになっていました——チェックを外すと設定行が削除され、それは有効へのフォールバックを意味します。表示はオフなのに機能は有効のまま。もう何も設定する必要はありません。以前書き込んだ `goals = true` は config.toml に残りますが、影響はありません。 +- **プロジェクトプロファイルの変更が自動同期を起動**:WebDAV/S3 自動同期のトリガー一覧が `profiles` テーブルに対応しておらず、プロファイル編集は他のテーブルがたまたま変わったときだけクラウドに届いていました。トランスポートごとの 2 つの一覧は profiles を含む 1 つの共有一覧になりました。([#6147](https://github.com/farion1231/cc-switch/pull/6147)) +- **パートナー一覧のメンテナンス**:RunAPI のプリセットは新ドメイン `runapi.host` へ移行(プリセット型が対応する場合は旧ドメインをフォールバック候補として保持)。PPIO はプロジェクトスポンサーとして記載されます。 + +--- + +## 修正 + +### Windows:v3.19.2 で WSL パス上の設定更新が失敗 + +v3.19.2 は Windows のアトミック書き込みを `ReplaceFileW` に切り替えましたが、WSL のファイルシステムはこれを `ERROR_NOT_SUPPORTED` (50) で拒否します——rename フォールバックは NotFound のときにしか働かず、`\\wsl.localhost` / `\\wsl$` パス上で既存の live 設定を置き換える書き込みはすべて即失敗していました。既存プロバイダの更新・切り替えができません(欠落したターゲットが元々フォールバックを起こす、設定ファイルの初回作成だけは機能していました)。エラー 50 は WSL が受け付ける rename 経路へ落ちるようになりました。影響は v3.19.2 のみです。そのバージョン内に回避策はないため、該当ユーザーは直接アップグレードしてください。([#6232](https://github.com/farion1231/cc-switch/pull/6232)、[#6224](https://github.com/farion1231/cc-switch/issues/6224)、[#6219](https://github.com/farion1231/cc-switch/issues/6219)、[#6188](https://github.com/farion1231/cc-switch/issues/6188)、[#6247](https://github.com/farion1231/cc-switch/issues/6247)) + +### Windows:CLI 検出がようやくターミナルと同じものを見る + +バージョン検出は継承したプロセス PATH とハードコードされたディレクトリ一覧に依存し、しかも探索順序が誤っていました。3 つの可視的な故障、それぞれに 1 つの原因:アプリ内自己更新後、再起動したプロセスはマシン PATH しか継承せずユーザー PATH を失い、ユーザーがインストールした CLI はスタートメニューから完全に再起動するまで「未インストール」と表示([#6061](https://github.com/farion1231/cc-switch/issues/6061))。winget 版 Claude Code、スタンドアロンインストーラの Codex、カスタム npm prefix は一度も走査されないディレクトリにありました([#6278](https://github.com/farion1231/cc-switch/issues/6278)、[#6047](https://github.com/farion1231/cc-switch/issues/6047)、[#4366](https://github.com/farion1231/cc-switch/issues/4366))。ハードコードのディレクトリが PATH 既定より先に探られ、古い `%APPDATA%\npm` の shim が PATH 上の新しいインストールを隠しました——「更新したのに古いバージョンのまま」([#4701](https://github.com/farion1231/cc-switch/pull/4701))。検出はレジストリ PATH(ユーザーとマシン、`%VAR%` 展開付き)を有効な探索パスへマージし、スタンドアロンインストーラのディレクトリを走査し、明示的な `where.exe` 呼び出しで PATH 既定を最優先に探り(Microsoft Store のアプリエイリアスをスキップ、カレントディレクトリは決して探索しない)、同じマージ済み PATH をインストール競合診断とアンカー付きアップグレードにも供給します。([#6284](https://github.com/farion1231/cc-switch/pull/6284)) + +### 起動時の白/黒ちらつきを解消 + +テーマクラスの適用前にウィンドウが表示され、未着色のページが先に描画されていました。インラインの事前描画スクリプトがバンドル読み込み前に永続化テーマを同期適用し(全プラットフォーム)、Windows ではさらにページ読み込み完了までウィンドウを非表示に保ちます。([#6252](https://github.com/farion1231/cc-switch/pull/6252)、[#6182](https://github.com/farion1231/cc-switch/issues/6182)) + +### Windows インストーラがゴミレジストリキーを書き込まないように + +WiX テンプレートの `Software\{{manufacturer}}\{{product_name}}` は単一のバックスラッシュを使っており、Handlebars がエスケープシーケンスとして消費していました——そのため v3.4.0 以来のすべての MSI が、意図したパスの代わりにリテラルの `HKCU\Software{{manufacturer}}{{product_name}}` キーを作成していました。両方のバックスラッシュを二重化し、テンプレート内の他のキーと揃えました。インストール済みマシン上の古いキーはクリーンアップされません——「アップグレード時の注意」を参照してください。([#6283](https://github.com/farion1231/cc-switch/issues/6283)) + +### プロキシ引き継ぎの復元が公式 ChatGPT ログインを消さないように + +引き継ぎの復元バックアップは引き継ぎ開始時のスナップショットです。引き継ぎ中に `codex login` を実行していた場合、あらゆる復元——引き継ぎ停止、アプリ終了、クラッシュ回復——が新しいログインをログイン前のスナップショットで上書きし、起動時の自動再引き継ぎがその消去を再起動のたびに繰り返していました。復元は仲裁するようになりました。live のログイン素材が常に勝ちます(それを進められるのは Codex 自身だけなので、スナップショットより必ず新しい)。バックアップ内のサードパーティ API キーは auth.json を潰す代わりに config.toml へ降格して保存されます。過去のリリースで既に破壊されたログインは復元されません——`codex login` を 1 回実行してください。([#6277](https://github.com/farion1231/cc-switch/issues/6277)) + +### 環境チェックが「すべて更新」や競合診断で固まらないように + +v3.19.2 に含まれたリファクタリングが、PATH 探測のログインシェルを制御端末を保持したままのバックグラウンドプロセスグループに起動していました。ターミナルから起動したインスタンスでは、ジョブ制御が SIGTTIN でシェルを停止させ、期限のない待機は決して戻りません——プリフライト全体が凍結します。それが起こりえない場所でも(通常起動のビルドには制御端末がありません)、この経路には期限が一切なく、Windows も同様でした——固まった探測 1 件(ブロックする `.zshrc`、終了しない `--version`)が同じように全体を凍結させます。探測は完全に分離されたセッションで実行され、stdin は null 化、10 秒の期限でプロセスツリー全体を停止します。失われた探測はその 1 ツールの報告を劣化させるだけで、実行を固まらせません。ボタンは探測フェーズ中、クリックを無視しているように見える代わりにスピナーを表示します。([#5522](https://github.com/farion1231/cc-switch/pull/5522) のリグレッション) + +### macOS の入力メソッドがプロバイダフォームを壊さないように + +中国語/日本語の入力メソッドでプロバイダフォームに高速入力すると、文字が断続的に重複・並べ替えられていました——報告された再現では 12 文字の値が 1,396 文字に膨張。制御されたインプットが、IME がまだ変換範囲を保持している間に親状態を DOM へ書き戻し、プロバイダキーのフィールドは変換途中の状態にまで小文字化・除去の正規化を実行していました。共有の IME セーフ入力は、確定まで変換テキストをローカルに保持し、正規化は完成テキストのみに適用し、変換途中でフォーカスが外れた場合は保留テキストを強制確定します(`compositionend` を配送しない WebKit のウィンドウ切り替え経路対策)。全アプリ共有の名前/メモ/サイトフィールドと、破損が報告された Hermes・OpenClaw・OpenCode のフィールド群に適用されています。すでに破損して保存された値は直りません——1 回編集し直してください。([#6308](https://github.com/farion1231/cc-switch/issues/6308)、[#6333](https://github.com/farion1231/cc-switch/pull/6333)、[#6507](https://github.com/farion1231/cc-switch/pull/6507)) + +### SQL バックアップは全値を忠実に往復し、切り詰めインポートは拒否 + +SQL ダンプ/インポートサイクルの 4 つの欠陥:非 UTF-8 バイトを含む TEXT 値はエクスポートを中断させ、NUL バイトは文を静かに切り詰めていました。REAL 値はストレージクラスを失っていました(無限大、負のゼロ、整数値の REAL)。AUTOINCREMENT の最高値は保存される代わりに生存行から再導出されていました。復元後はデータベースの `auto_vacuum` モードが格下げのままになり、次回起動が全体 VACUUM 再構築で修復していました。4 つすべてを修正。検証もテーブル作成前に移動しました。切り詰められた SQL ファイル——あるいは CC Switch のコアテーブルを欠くファイル——は live データベースに手を付けずに拒否されます。以前はスキーママイグレーションが欠けたテーブルをでっち上げ、不完全なデータにデータベースを置き換えさせる可能性がありました。プロバイダも MCP もない正真のエクスポートは、拒否される代わりにインポートできるようになりました。([#6146](https://github.com/farion1231/cc-switch/pull/6146)) + +### バックアップはアトミックに公開、復元はステージングで検証、全経路が直列実行 + +バックアップは従来、ページを 1 つもコピーしないうちに最終名で作成され、コピー結果は無視されていました——中断されたコピーが一見有効なバックアップファイルになります。バックアップは一時ファイルで構築し、完全性検査を経てから、同名を潰さずに公開するようになりました。復元は live データベースに触れる前にイメージ全体——完全性・スキーマテーブル・マイグレーション——をステージングデータベースで検証するため、破損した、あるいは新しいスキーマのバックアップは置換の途中で発覚する代わりにきれいに失敗します。保持ポリシーは復元中のバックアップと新しい安全スナップショットの両方を守ります。並行性の面では:WebDAV と S3 は各自のロックを持ち(2 つのトランスポートが同時に復元できました)、手動インポートと `.db` 復元はロックを一切取らず、Skills のファイルはミラー元のデータベース行とロックを共有していませんでした。1 つのグローバル同期ロックがすべての経路をエンドツーエンドで直列化し、Skills 状態ロックが行とファイルを一緒に動かし、自動同期の抑制はダウンロードが実際に始まったときにだけ開始されます——キュー待機中のローカル編集が静かに飲み込まれることはもうありません。セッションログの読み取りカーソルもクラウドスナップショットから除外されました。これは絶対的なローカルファイル位置であり、他マシンのカーソルをインポートするとローカルの使用量取り込みが狂うためです。([#6147](https://github.com/farion1231/cc-switch/pull/6147)、[#6129](https://github.com/farion1231/cc-switch/issues/6129)) + +### バックアップの復元がデータベースに依存するものを再構築 + +`.db` バックアップの復元は従来データベースしか変更しませんでした——各アプリの live 設定は次に手動でプロバイダを切り替えるまで復元前の内容のままで、SQL インポートやクラウドダウンロード後の後処理は使い捨ての状態オブジェクトに対して走り、キャッシュ無効化はどこにも届きませんでした。すべての復元経路は復元後のデータベースを外へ投影するようになりました——Pi を除く全管理対象アプリの live 設定(Pi の `models.json` は事実源のままで、次回起動時に逆方向へインポート)、アプリごとのプロンプトファイル、ランタイムのログレベル、トレイの使用量キャッシュ——そして復元された行の上に、ローカルの設定ファイルとユーザー自身のモデル価格の上書きを再適用します。1 つのアプリの失敗が残りを静かにスキップさせることはもうありません。([#6147](https://github.com/farion1231/cc-switch/pull/6147)、[#6129](https://github.com/farion1231/cc-switch/issues/6129)) + +### 使用量トレンドのツールチップとハイライトが年をまたいで一致 + +複数年にわたる範囲では、ホバーがある年の点をハイライトし、ツールチップは別の年を説明していました。チャートはローカライズされた MM/DD ラベルを X 軸のキーにしており、異なる年のバケットが 1 つのカテゴリ値を共有し、チャートライブラリのアクティブポイント検索は最初の一致を返します——ハイライトは早い年の点に吸い付き、ツールチップはカーソルに従っていました(描画された点そのものは常に正しい位置でした)。軸はバックエンドの完全なバケットタイムスタンプをキーにし、目盛りラベルとツールチップは別々に解決されます(範囲が年をまたぐ場合は年も表示)。([#6337](https://github.com/farion1231/cc-switch/pull/6337)、[#6302](https://github.com/farion1231/cc-switch/issues/6302)) + +### Volcengine Ark:Agent Plan プリセットが本当に Agent Plan を指すように + +Agent Plan の名を冠したプリセットが、肝心なところ——エンドポイントと招待リンク——で Coding Plan を指していました。2 つのプランはクォータを共有しない別々のサブスクリプションです。6 アプリで 2 つのプリセットに分割されました。Agent Plan は `/api/plan[/v3]`(Codex ではネイティブ Responses)、Coding Plan は従来の `/api/coding[/v3]` です。プランクォータ検出は Agent Plan エンドポイントを認識するよう広げられ、保存済みプロバイダに即時適用されます。プリセット自体は新規作成にのみ適用されます——旧プロバイダを持つ Agent Plan 契約者は再作成するか Base URL を編集してください。([#6070](https://github.com/farion1231/cc-switch/issues/6070)、[#6448](https://github.com/farion1231/cc-switch/issues/6448)) + +### 思考スイッチと推論レベルの方言修正の一括処理 + +- **ModelScope / Novita / Nvidia の思考方言**:3 つのアグリゲータプリセットはいずれも、どのプラットフォームも文書化していない Zhipu 式 `thinking:{type}` オブジェクトを宣言していました——ModelScope と Novita ではトグルが無効で、Nvidia NIM では注入フィールドが丸ごと拒否されえます。前 2 者は文書化された `enable_thinking` ブール値を送るようになり、Nvidia のスイッチは全面撤去——本当の制御はこのパラメータの届く範囲にありません。プラットフォーム推論テーブルに ModelScope の分岐が追加され、宣言のない手動作成の ModelScope プロバイダは即座に是正されます。 +- **StepFun の推論強度が step-3.7-flash に届く**:推論の分岐は 2603 サフィックスのモデルにしか effort を与えず、Codex で選んだレベルは step-3.7-flash では静かに破棄されていました。現在は low/medium/high をそのまま透過し、2603 系は 2 段階マッピングを維持、サフィックスなしの step-3.5-flash には意図的に effort フィールドを送りません——StepFun はこのモデルの強度制御を一切文書化していません。 +- **OpenCode Zen の推論強度がゲートウェイに届く**:ルーティングモードでは Codex で選んだレベルが選んだとおりに届いていませんでした——GLM/Kimi/MiMo のモデルではプロキシがベンダー推定にフォールバックし、レベルを落とし、ゲートウェイが無視する Zhipu 形のフィールドを送り、DeepSeek のモデルでは DeepSeek 方言に強制変換された値を送っていました。`opencode.ai` のプラットフォーム規則はトップレベルの `reasoning_effort` を送り、モデルごとに宣言されたレベルへクランプし、強度制御のないモデルには推測する代わりに何も送りません。既存プロバイダはモデル単位のレベル表を得るためプリセットの再追加が 1 回必要です。([#6123](https://github.com/farion1231/cc-switch/pull/6123)、[#6112](https://github.com/farion1231/cc-switch/issues/6112)) +- **SiliconFlow と ModelScope のプリセットが存在しないモデルを指していた**:ベンダーカタログ監査で、SiliconFlow プリセットが両サイトに存在しない MiniMax id を搭載しており(最初のリクエストが 400「Model does not exist」で失敗)、ModelScope プリセットが無料ルートで利用できない GLM id を指していることが判明。現在は `Pro/MiniMaxAI/MiniMax-M2.5`(.cn)、`MiniMaxAI/MiniMax-M3`(.com、実際の 1M ウィンドウ付き)、`ZhipuAI/GLM-5.2` を、これらのプロバイダを持つ 7 アプリすべてで搭載します。 + +### 使用量と価格の修正の一括処理 + +- **Chat 経路で DeepSeek のキャッシュヒットがゼロ計上**:DeepSeek 文書のフィールド `prompt_cache_hit_tokens` だけを転送し OpenAI 式フィールドへミラーしない中継業者では、キャッシュヒットが 0 と記録され、ヒットトークンを新規入力として課金しコストを過大計上していました。このフィールドは標準フォールバック連鎖の末尾に加わり、使用量パーサと合成された Codex 使用量の両方をカバーします。([#6126](https://github.com/farion1231/cc-switch/pull/6126)、[#6073](https://github.com/farion1231/cc-switch/issues/6073)) +- **Grok Build の会話が使用量フィールド欠落で失敗しないように**:Chat 上流がキャッシュトークンを報告しないターンはすべて「missing field `input_tokens_details`」で失敗していました——報告された GLM-5.2 上流は常に `cached_tokens: 0` を送るため、毎ターンです。Chat→Responses の使用量翻訳はキャッシュトークンがあるときだけこのオブジェクトを発出していましたが、Grok クライアントは必須としています。現在は常に発出され、ストリーミング経路も同様です。([#6423](https://github.com/farion1231/cc-switch/pull/6423)、[#6140](https://github.com/farion1231/cc-switch/issues/6140)) +- **CREDIT_LIMIT 改名後に Zhipu のクォータ階層が再表示**:Zhipu は中国本土エンドポイントのクォータ項目タイプを `TOKENS_LIMIT` から `CREDIT_LIMIT` に改名しましたが、パーサは旧値だけでフィルタし、全階層を落とし、パネルは空でした。両方の値を受け付けます。([#6160](https://github.com/farion1231/cc-switch/pull/6160)、[#6153](https://github.com/farion1231/cc-switch/issues/6153)) +- **Grok 4.5 のキャッシュ価格を修正、Grok 4.6 と DeepSeek の別名に価格を追加**:`grok-4.5` は grok-4.6 の $0.50 キャッシュ読み取り価格で登録されていました。実際の $0.30 に修正し、既存データベースには保護付き修復を適用します。`grok-4.6` は $2/$6、キャッシュ読み取り $0.50 で追加——基本価格です。xAI は 200K を超えるプロンプトで Grok 4.5/4.6 の全価格を倍にしますが、価格表に段階の列はないため、長コンテキストの Grok リクエストは請求のおよそ半分で表示されます。そして `deepseek-v4-flash-0731`——id 正規化が剥がせない 4 桁日付の変種で、どの価格行にも一致せず $0 で計上されていました——が独自の行を獲得。過去の $0 行は現行価格で遡及計上され、このモデルの過去合計は上昇します。 + +### その他の修正 + +- **ファイルが消えた Skill は更新可能と表示**:更新チェックはファイルシステムを一度も見ずにデータベースキャッシュのコンテンツハッシュを信じていたため、ファイルが消えた Skill(典型例はマシン間のデータベース復元——行は移りますがファイルは移りません)は永久に「更新なし」と報告し、唯一の回復手段はアンインストール後の再インストールでした。チェックはまず Skill のディレクトリの存在を確認します。ディレクトリの欠落は利用可能な更新として表示され、そのインストールがファイルを再構築します。対象はリポジトリからインストールした Skill です——ローカル作成の Skill は更新チェックの対象外のため、ファイル欠落は手動での再追加が必要です。 +- **OpenClaw の「既定に設定」がモデルを尋ね、フォールバックを保持**:既定への設定は常に最初のモデルを選び、`openclaw.json` にあるフォールバック連鎖を合成したもので置き換えていました。複数モデルのプロバイダには選択画面が表示され、書き込みは既存の既定モデルブロックへマージされ、フォールバックと未知キーを保持します。([#6201](https://github.com/farion1231/cc-switch/pull/6201)) +- **ユーザー所有の Codex `model_catalog_json` が上書きされないように**:プロバイダ切り替えは `~/.codex/config.toml` の `model_catalog_json` を無条件にアプリ生成のカタログへ向け直し、カスタムカタログのパスを破棄していました。ポインタは、欠落しているか既に CC Switch 自身のファイル名である場合にのみ取得されます。予防のみです——過去のバージョンに書き換えられたポインタは復元されません。「アップグレード時の注意」を参照してください。([#6087](https://github.com/farion1231/cc-switch/pull/6087)) +- **ミラーされた DeepSeek Codex カタログの山括弧テキストを復元**:内蔵の DeepSeek 公式 Codex カタログミラーは、タグ除去の前に HTML アンエスケープを適用して抽出されており、4 つのハーネス文字列内のリテラルな山括弧テキストがマークアップとして飲み込まれていました——`base_instructions` の指示文と markdown リンクの例、両モデルのメッセージテンプレートが損傷。ミラーは再びバイト単位で忠実になり、既存の DeepSeek ネイティブ Responses プロバイダは次回の切り替え時に自動で取得します。再保存は不要です。 + +--- + +## セキュリティ強化 + +### モデル取得のエラーが認証情報を映さないように + +失敗した「モデルを取得」呼び出しが API キーを可視のエラーメッセージへ反射することがあり、他所のマスキングも 8 文字以上の秘密にしか働きませんでした。取得エラーの本文は厳格な秘匿処理を通ります——API キーと、本リリースで新たに対応したカスタムヘッダー値を、1 文字まで隠します——全アプリのプロバイダフォームが対象です。取得自体も Pi 向けに形式対応になりました。認証ヘッダーはプロバイダの API 形式に従い、検証済みカスタムヘッダー(ヘッダーのみの認証を含む)に対応します。([#6064](https://github.com/farion1231/cc-switch/pull/6064)) + +--- + +## アップグレード時の注意 + +### 本リリースにはデータベースマイグレーションが含まれ、ダウングレードにはバックアップの復元が必要です + +スキーマは v16 から v17 に移行します(Pi インポーター用のセッション使用量重複排除台帳)。移行前にバックアップが自動作成されます。本バージョンを一度実行すると、旧版の CC Switch はデータベースを開けなくなります——ダウングレードにはそのバックアップの復元が必要です。 + +### Pi の初回起動は既存プロバイダのインポートと過去使用量の取り込みを行います + +Pi は既定で新しいアプリタブとして表示されます。初回起動時、`~/.pi/agent/models.json` に書かれた既存プロバイダが管理可能なカードとしてインポートされます。最初の使用量同期は発見可能なすべての Pi セッションを走査して過去の使用量を取り込むため、**ダッシュボードの合計が跳ね上がることがあります**。Pi 自身のログイン・既定プロバイダ・既定モデルには一切触れません。相対パスで設定された Pi の `sessionDir` は列挙できません——セッションブラウザと使用量インポートには絶対パスを設定してください。 + +### v3.19.2 の WSL ユーザーは直接アップグレードしてください + +v3.19.2 で WSL 上の設定ディレクトリを使っている場合、そのバージョンでは既存設定の更新・切り替えができません——本リリースへ直接アップグレードしてください。 + +### MSI の古いレジストリキーはクリーンアップされません + +v3.4.0 から v3.19.2 の間に MSI でインストールした Windows マシンには、アップグレード後も古い `HKCU\Software{{manufacturer}}{{product_name}}` キーが残ります。本修正はこれを削除しません。消したい場合は regedit で手動削除してください——このキーはインストールのキーパスとして登録されていたため、削除により一度だけ Windows Installer の修復プロンプトが出ることがあります。 + +### 一部の ChatGPT アカウントは再ログインが 1 回必要です + +本リリース以前に認証センターへサインインした ChatGPT アカウントは id_token 永続化より前のもので、「再ログインが必要」バッジが表示されます。プロバイダカードへ紐付ける前にもう一度サインインしてください。修正前の引き継ぎ復元バグに消されたログインも同様に復元されません——`codex login` を 1 回実行してください。 + +### フェイルオーバーキューの公式カードは除外されます + +組み込みの Codex 公式カードが自動フェイルオーバーキューにあった場合、現在は除外され、Auto モードは公式カードから開始しません。サードパーティの Codex プロバイダをプライマリに選んでください。 + +### WSL / exFAT では Codex 引き継ぎの停止が復元を拒否します + +WSL や exFAT の設定ディレクトリでは、Codex 引き継ぎの停止は、中途半端な auth ファイルを書くリスクを冒す代わりに、「ファイルシステムが安全な復旧に対応していません」という明確なエラーで拒否されます。何も削除されませんが、引き継ぎ前の認証情報が**書き戻されることもありません**——その後 `codex login` を再実行するか、安全性検査に対応したファイルシステムに Codex ディレクトリを置いてください。 + +### プリセットの変更は新規作成プロバイダにのみ適用されます(例外は下記) + +保存済みプロバイダは作成時の設定を保持します。本リリースでの対象:Volcengine Agent Plan のエンドポイント、ModelScope/Novita/Nvidia の思考方言、Kimi の推論強度、BytePlus のネイティブ Responses、SiliconFlow/ModelScope のモデル id 置換、OpenCode Go の直接接続と 1M ウィンドウ、事前設定された推論レベル、RunAPI の新ドメイン。プリセットから再作成する(または該当フィールドを編集する)ことで取得できます。**既存プロバイダに即時適用される例外**:Kimi のパススルー変更、保存宣言のないプロバイダへのプラットフォーム推論修正(ModelScope、StepFun、opencode.ai)、Volcengine Agent Plan エンドポイントのクォータ検出、修正済み DeepSeek ベンダーカタログ(次回切り替え時)。 + +### 書き換えられた `model_catalog_json` ポインタは手動で 1 回戻す必要があります + +過去のバージョンが `~/.codex/config.toml` の `model_catalog_json` を既に書き換えている場合、本リリースは元のポインタを復元しません——自分のファイルへ 1 回向け直せば、以後は触れられません。ユーザー所有のファイルを指している間、CC Switch のプロバイダ単位のモデル表(表示名・コンテキストウィンドウ・思考レベル)は Codex に届きません。 + +### Grok Build のフォーム保存は `api_backend` を固定します + +フォーム経由で既存の Grok Build プロバイダを保存すると、保存設定の `api_backend` が `responses` に固定されます——現在のプロバイダなら即座に live 設定へ書き込まれ、それ以外は次回そのプロバイダへ切り替えたときに反映されます。上流プロトコルは詳細 → 上流形式で設定してください。 + +### IME バグで壊れたテキストは 1 回編集し直してください + +本リリース以前に入力メソッドのバグで壊れたテキストは、データベースと live 設定に壊れたまま残ります——影響を受けたプロバイダの名前/キー/モデルのフィールドを 1 回編集し直してください。 + +### DeepSeek V4 のコスト表示は大幅に上がります + +ダッシュボードの DeepSeek V4 コストは今後、およそ入力 3 倍・出力 4.5〜4.7 倍・キャッシュ読み取り 5 倍(Flash)〜12 倍(Pro)になります。これはベンダーの新しいピーク価格であり、集計方法の変更ではありません。コストは記録時に固定されるため、過去は再計算されません——例外として、これまで無価格だった `deepseek-v4-flash-0731` の行は $0 から現行ピーク価格で遡及計上されるため、その過去合計は高めに表示されます。手動編集した価格には決して触れません。Gemini 3.7 Flash はベンダーが 2026 年まで掲示する導入価格で追加されます。 + +### バックアップと復元の挙動変更 + +旧バージョンでエクスポートした SQL バックアップは、以前の忠実度損失をそのまま持ちます——正確な往復に依存する場合は新しいバックアップをエクスポートしてください。切り詰められた、あるいはコアテーブルを欠く SQL ファイルは、旧バージョンでは受け入れられた可能性がある場面でも、インポート時に拒否されます。`.db` バックアップの復元は、Pi を除く全管理対象アプリの live 設定ファイルを復元後のデータベースから書き直します(従来はデータベースのみ変更)。WebDAV/S3 自動同期が有効な場合、プロジェクトプロファイルの編集もスナップショットのアップロードをキューに入れるようになりました。 + +### WebSearch の表現できない制約は明示的にエラーになります + +Responses API が表現できない制約を持つ Claude Code WebSearch リクエスト(`blocked_domains`、非直接の呼び出し元、`response_inclusion`、あるいはツールを強制しない Codex OAuth 上の `max_uses`)は、指定より広く検索する代わりに明示的なエラーで失敗します。Chat 形式の上流はいまもホスト型 WebSearch を提供できません。 + +### Kimi エンドポイントが思考関連の 400 を返し始めた場合 + +まず、再追加したプリセットが新たに送る `thinking` / `reasoning_effort` フィールドを確認してください——Moonshot のパラメータ文書と Codex 接続ガイドは kimi-k3 が `thinking` を受け付けるかで矛盾しており、プリセットは接続ガイドに従っています。「思考履歴を返すように」と要求する形の 400 だけが、撤去された履歴注入を指します。 + +--- + +## リスク通知 + +### 継続してお伝えしている注意事項 + +**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 は、これらの機能の利用に起因するアカウントの制限・警告・サービス停止について、一切の責任を負いません。 + +--- + +## 謝辞 + +本リリースの 69 コミットのうち 38 は 11 名の外部コントリビューターによるものです——3 つの主軸のすべてに外部の深い関与がありました。 + +### コード貢献 + +- @SaladDay さんに感謝します——19 コミット、本リリース最大のコントリビューターです。Pi の主軸全体([#6064](https://github.com/farion1231/cc-switch/pull/6064)、[#6463](https://github.com/farion1231/cc-switch/pull/6463))、Codex マルチアカウントの主軸全体([#3879](https://github.com/farion1231/cc-switch/pull/3879)、[#6535](https://github.com/farion1231/cc-switch/pull/6535)、[#6506](https://github.com/farion1231/cc-switch/pull/6506)、[#6537](https://github.com/farion1231/cc-switch/pull/6537))、10 PR に及ぶフォーム一貫性の磨き込み、Windows 起動ちらつきの修正([#6252](https://github.com/farion1231/cc-switch/pull/6252))、Grok Build 使用量フィールドの修正。 +- @YUZHEthefool さんに感謝します:バックアップと同期の二波の強化([#6146](https://github.com/farion1231/cc-switch/pull/6146)、[#6147](https://github.com/farion1231/cc-switch/pull/6147))——「修正」章のデータ信頼性の大きな 3 項目はこの仕事です。さらに Windows CLI 検出の刷新([#6284](https://github.com/farion1231/cc-switch/pull/6284))、モデル選択のファジー検索([#6285](https://github.com/farion1231/cc-switch/pull/6285)、[#6353](https://github.com/farion1231/cc-switch/pull/6353))、Zhipu CREDIT_LIMIT の修正、Grok Build フォームの整列も。 +- @allenxu09 さんに感謝します:v3.19.2 の WSL 書き込みリグレッションのホットフィックス([#6232](https://github.com/farion1231/cc-switch/pull/6232))と、実 WSL2 ファイルシステムでの CI カバレッジ([#6233](https://github.com/farion1231/cc-switch/pull/6233))——バグを直したうえで、それを世に出してしまったテストの穴も塞ぎました。 +- @Program120 さんに感謝します:WebSearch と Alpha Search のプロキシブリッジ([#5681](https://github.com/farion1231/cc-switch/pull/5681))——お一人で本リリースの第 3 の主軸を開通させました。 +- @stofancy さんに感謝します:Codex カタログのモデル単位思考レベル([#6228](https://github.com/farion1231/cc-switch/pull/6228))——本リリースの思考レベル一巡の土台です。 +- @zayokami さんに感謝します:OpenCode Zen の推論強度ルーティング([#6123](https://github.com/farion1231/cc-switch/pull/6123))、DeepSeek キャッシュヒットの計上([#6126](https://github.com/farion1231/cc-switch/pull/6126))、Grok Build の文言修正([#6511](https://github.com/farion1231/cc-switch/pull/6511))。 +- @yovinchen さんに感謝します:macOS 入力メソッドの破損修正とその強化([#6333](https://github.com/farion1231/cc-switch/pull/6333)、[#6507](https://github.com/farion1231/cc-switch/pull/6507))。 +- @Hexc01 さんに感謝します:使用量トレンドの複数年ずれの修正([#6337](https://github.com/farion1231/cc-switch/pull/6337))。 +- @misaka-myu さんに感謝します:ユーザー所有の `model_catalog_json` の尊重([#6087](https://github.com/farion1231/cc-switch/pull/6087))。 +- また、それぞれのプラットフォームのプリセットを貢献してくださった @hu-miao さんと @jiekouai さんにも感謝します([#6239](https://github.com/farion1231/cc-switch/pull/6239)、[#6356](https://github.com/farion1231/cc-switch/pull/6356))。 + +### 問題報告 + +- [#6188](https://github.com/farion1231/cc-switch/issues/6188) で WSL 書き込みリグレッションを報告してくださった @vxzhong さんに感謝します——os error 50 の正確な特定がホットフィックスの方向を直接定めました。 +- Windows CLI 検出の 5 issue 一族の皆さんに感謝します:@RonsonNamek さん([#6061](https://github.com/farion1231/cc-switch/issues/6061))、@gaoqiong001 さん([#6278](https://github.com/farion1231/cc-switch/issues/6278))、@lovelyhjqhs さん([#6047](https://github.com/farion1231/cc-switch/issues/6047))、@baoyu0 さん([#4366](https://github.com/farion1231/cc-switch/issues/4366))——@jiangliushi666 さんは [#4701](https://github.com/farion1231/cc-switch/pull/4701) で PATH 探索順序の問題をより早く指摘してくださいました。 +- 引き継ぎ復元が ChatGPT ログインを消す問題を報告してくださった @HyskoaMorroh さん([#6277](https://github.com/farion1231/cc-switch/issues/6277))、正確な再現手順で IME 破損を報告してくださった @CacinieP さん([#6308](https://github.com/farion1231/cc-switch/issues/6308))、起動時のちらつきを報告してくださった @FishV6A さん([#6182](https://github.com/farion1231/cc-switch/issues/6182))、MSI レジストリの誤書き込みを報告してくださった @Destiny4073 さん([#6283](https://github.com/farion1231/cc-switch/issues/6283))に感謝します。 +- @totoneei さん([#6302](https://github.com/farion1231/cc-switch/issues/6302))、@zju-zhanglu さん([#6153](https://github.com/farion1231/cc-switch/issues/6153))、@xiaoyu753 さん([#6073](https://github.com/farion1231/cc-switch/issues/6073))、@GengchenXU さん([#6140](https://github.com/farion1231/cc-switch/issues/6140))、@HOnnTaka さん([#6112](https://github.com/farion1231/cc-switch/issues/6112))、@Xiao0219 さん([#6171](https://github.com/farion1231/cc-switch/issues/6171))、@STEVENTAN100 さん([#6181](https://github.com/farion1231/cc-switch/issues/6181))、@20130101 さん([#6070](https://github.com/farion1231/cc-switch/issues/6070))、@leoncdq さん([#6448](https://github.com/farion1231/cc-switch/issues/6448))に感謝します——使用量・クォータ・レベルの一連の修正は、これらの報告から始まりました。 + +--- + +## ダウンロードとインストール + +[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.20.0-Windows.msi` | **推奨** - MSI インストーラ、自動更新対応 | +| `CC-Switch-v3.20.0-Windows-Portable.zip` | ポータブル版、解凍してすぐ使用、レジストリ不使用 | + +Windows ARM64 デバイスでは、ファイル名に `arm64` を含む成果物を選んでください。 + +### macOS + +| ファイル | 説明 | +| -------------------------------- | ----------------------------------------------------- | +| `CC-Switch-v3.20.0-macOS.dmg` | **推奨** - DMG インストーラ、Applications へドラッグ | +| `CC-Switch-v3.20.0-macOS.zip` | 解凍後 Applications へドラッグ、Universal Binary | +| `CC-Switch-v3.20.0-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.20.0-Linux-x86_64.AppImage` / `.deb` / `.rpm` +- `CC-Switch-v3.20.0-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` | diff --git a/docs/release-notes/v3.20.0-zh.md b/docs/release-notes/v3.20.0-zh.md new file mode 100644 index 000000000..7c269ae86 --- /dev/null +++ b/docs/release-notes/v3.20.0-zh.md @@ -0,0 +1,394 @@ +# CC Switch v3.20.0 + +> 这一版由三条结构性主线撑起:**Pi 成为第九个受管应用**——供应商、提示词、Skills、会话浏览与用量统计一站接入;**Codex 支持多个 ChatGPT 账号**——认证中心随便登几个,每张官方卡各绑各的,切换永不串账;**Claude Code 内置 WebSearch 在 GPT 路由下终于可用**。紧急修复也有一条:v3.19.2 在 WSL 路径上已有配置无法更新或切换,受影响用户请直接升级本版。同一批 Windows 修复还包括版本检测大修(五个 issue 一次修)、启动闪屏与 MSI 注册表垃圾键。本版**包含数据库迁移(v16 → v17)**,升级前自动备份,降级需还原备份。 + +**[English →](v3.20.0-en.md) | [日本語版 →](v3.20.0-ja.md)** + +--- + +## 重点内容:你现在可以 + +- **用 CC Switch 管理 Pi**:第九个受管应用([#6064](https://github.com/farion1231/cc-switch/pull/6064))。供应商表单是针对 Pi 原生 schema 的结构化编辑器,内置 58 个预设与 57 个模型的能力目录;提示词库、`SYSTEM.md` / `APPEND_SYSTEM.md` 编辑器、斜杠命令模板、Skills、会话浏览与安装升级一并接入。Pi 自己的登录、默认供应商与默认模型**永远不被触碰**。首启会导入 `models.json` 里已有的供应商,见[升级提醒](#pi-首次启动会导入既有供应商并回填历史用量)。 +- **在看板里看到 Pi 的会话用量**:逐模型的 token、成本、错误与中断轮次,独立的「Pi (Session)」来源与应用筛选;增量同步只解析文件新增部分([#6463](https://github.com/farion1231/cc-switch/pull/6463))。 +- **添加 Codex 官方供应商时直接选择已授权的 ChatGPT 账号**:认证中心登录任意多个账号,新建官方卡时下拉直选其一完成绑定;也可以照旧添加一张不绑定的空官方卡,跟随 Codex CLI 本地登录、读取本地的 access token。切换到绑定卡会写入该账号完整的令牌包——裸 `codex` CLI 也以该账号运行、且能自行续期。接管下的请求会校验账号一致性,绝不静默把账单记到另一个账号头上([#3879](https://github.com/farion1231/cc-switch/pull/3879)、[#6535](https://github.com/farion1231/cc-switch/pull/6535))。 +- **在 GPT 路由下使用 Claude Code 的内置 WebSearch**:搜索在上游执行、结果带引用返回、次数进用量;Codex 新客户端的 Alpha Search 端点也不再 404([#5681](https://github.com/farion1231/cc-switch/pull/5681))。 +- **从 v3.19.2 的 WSL 故障中脱困**:v3.19.2 在 `\\wsl.localhost` 路径上无法更新或切换已有配置([#6188](https://github.com/farion1231/cc-switch/issues/6188)),该版本内无任何绕过手段——请直接升级本版,并且 CI 从此在真实 WSL2 文件系统上跑测试([#6233](https://github.com/farion1231/cc-switch/pull/6233))。 +- **让 Windows 版本检测和你的终端看到的一致**:检测改为合并注册表 PATH(用户+机器)、扫描独立安装器目录、优先探测 PATH 默认项——应用内自更新后「未安装」、winget 装的 Claude Code 找不到、旧 npm shim 遮住新版本,五个 issue 一网打尽([#6284](https://github.com/farion1231/cc-switch/pull/6284))。 +- **给每个模型声明它真实支持的思考档位**:Codex 模型目录支持逐模型多选八个标准档位并指定默认值,各家预设按厂商文档预填了真实档位([#6228](https://github.com/farion1231/cc-switch/pull/6228))。 +- **信任你的备份**:SQL 备份逐值保真往返、截断文件导入前即被拒绝([#6146](https://github.com/farion1231/cc-switch/pull/6146));备份文件原子发布、恢复先在暂存库整体校验、`.db` 恢复会把各应用 live 配置一并重建,所有同步/恢复路径严格串行([#6147](https://github.com/farion1231/cc-switch/pull/6147))。 +- **在几百个模型里直接搜**:所有应用的模型下拉都换成了可输入过滤的组合框,按模型 id 和厂商名都能匹配([#6285](https://github.com/farion1231/cc-switch/pull/6285))。 +- **启动不再白/黑闪屏**:主题在页面绘制前同步应用,Windows 上窗口加载完成前保持隐藏([#6252](https://github.com/farion1231/cc-switch/pull/6252))。 + +--- + +## 使用攻略 + +本版改动集中在供应商管理与用量统计上,建议结合以下文档了解: + +- **[添加供应商](../user-manual/zh/2-providers/2.1-add.md)**:Pi 与新预设的入口。 +- **[用量统计](../user-manual/zh/4-proxy/4.4-usage.md)**:Pi 会话用量的来源与口径,以及 DeepSeek 调价对读数的影响。 +- **[请求路由](../user-manual/zh/4-proxy/4.2-routing.md)**:WebSearch 桥接生效的路由场景。 + +--- + +> [!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.20.0 横跨了几乎每个子系统,主线有三条。第一条是接入面扩张:Pi 成为第九个受管应用,从供应商编辑到会话用量全链路接入,并带来本版唯一的数据库迁移(v16 → v17,Pi 用量去重账本);Codex 侧则补上了呼声已久的多 ChatGPT 账号管理,官方卡从此可以逐卡绑定账号,且刻意退出自动故障转移——重试永远不会把账单记到另一个账号。第二条是代理能力:Claude Code 内置 WebSearch 桥接到 OpenAI Responses 与 Codex OAuth 后端,Codex 的 Alpha Search 端点注册为语义透传,「GPT 路由下没有网页搜索」成为历史。 + +第三条是把 Windows 与数据可靠性欠的账还上:v3.19.2 的 WSL 写入回归热修(并新增真实 WSL2 CI 覆盖)、版本检测按注册表 PATH 大修、启动闪屏消除、MSI 自 v3.4.0 起写入的垃圾注册表键修正;备份/同步经外部贡献者审计后两波加固——SQL 逐值保真、原子发布、暂存校验、严格串行。此外还有 Codex 思考档位体系的整轮梳理(逐模型档位+各厂真实档位预填+聚合平台方言修正)、一轮供应商表单一致性打磨、macOS 中日文输入法修复,以及 DeepSeek V4 按厂商新牌价重定价。 + +**发布日期**:2026-08-18 + +**更新规模**:69 commits | 284 files changed | +53,108 / -6,678 lines + +--- + +## 新功能 + +### Pi 成为第九个受管应用 + +Pi 以累加模式接入(与 OpenCode、Hermes 同类):供应商的启用与否等于其键是否存在于 `~/.pi/agent/models.json`,多个供应商共存。供应商表单是针对 Pi 原生 schema 的结构化编辑器——API 格式、逐模型的思考等级映射(Pi 的七个等级)、兼容键——内置 58 个预设(覆盖表单五种 API 格式中的四种)与一份人工复核过的 57 模型能力目录;原始 JSON 编辑器与「拉取模型」按钮兜底,既有节点里的未知字段原样保留。每次读改写都有内容版本校验,别的进程改过的文件会以冲突报错拒绝、绝不覆盖。 + +边界刻意划清并写进文档:CC Switch **绝不**把 Pi 的内置供应商物化进 models.json、**绝不**读写 Pi 的 `auth.json`、**绝不**碰 `defaultProvider` / `defaultModel`——Pi 自己的登录与模型选择归 Pi。供应商之外:提示词库把选中的一条写入 Pi 全局 `AGENTS.md`(已有的不匹配内容先自动备份成库条目)、`SYSTEM.md`(替换 Pi 基础提示词)与 `APPEND_SYSTEM.md` 各有专属编辑器、`~/.pi/agent/prompts/*.md` 斜杠命令模板管理、Skills 按「存在即启用」规则接入(同名但非 CC Switch 所有的 Skill 拒绝覆盖或删除)、JSONL 会话浏览器,以及设置 → 关于里的 Pi 安装与升级。Pi 没有原生 MCP 注册表,因此刻意不参与 MCP 同步;也没有代理接管、故障转移与托盘存在——代理与故障转移命令现在对所有无本地网关的应用显式拒绝,而不是写下一堆死配置。([#6064](https://github.com/farion1231/cc-switch/pull/6064)) + +### Pi 会话用量进入看板 + +新导入器读取 Pi 的会话文件,在独立的「Pi (Session)」来源下逐模型记录 token、成本、错误与中断轮次,带专属应用筛选。Pi 每条记录自带成本,为正时优先采用;缺失或全零则回退 CC Switch 的价格表。增量同步对每个文件的尾部做指纹,只解析新追加的字节;被改写或分叉的会话通过新的持久去重账本识别——`session_usage_dedup` 表,本版 v16 → v17 迁移的由来——该账本在明细行清理后仍存活,且保持设备本地(云同步排除、导入保留)。由于一个 Pi 会话可能混用 Anthropic 系与 OpenAI 系 API,含 Pi 的汇总带「缓存写不完整」的口径标注而非一个未加限定的数字。([#6463](https://github.com/farion1231/cc-switch/pull/6463)) + +### Codex:多个 ChatGPT 账号,逐卡绑定 + +认证中心可以持有任意数量的 ChatGPT(Codex OAuth)登录。**添加 Codex 官方供应商时,直接从已 OAuth 授权的账号里选一个完成绑定**——不必先建卡再回头配置;也可以沿用旧方式添加一张不绑定账号的空官方卡,它跟随 Codex CLI 自己的登录、读取本地的 access token。官方卡数量不限,两种方式的卡可以共存,绑定与解绑保留卡的身份、端点与健康历史。切换到绑定卡会把该账号**完整的令牌包**写入 `~/.codex/auth.json`——裸 `codex` CLI 也以该账号运行,且能在访问令牌过期后自行续期;CLI 轮转过的刷新令牌会在每次写入前被回采,重复切换绝不会用旧登录盖掉新登录。 + +账号选择器是带标签的下拉框,可直接跳转认证中心;账号状态**加载失败**时显示带重试的警告而不再冒充「未登录」,也不再在下次保存时静默解绑。登出与移除账号和供应商切换严格互斥;OAuth 请求超时从十分钟收紧到 30 秒;登出还会取消仍在网络往返中的设备登录——被放弃的登录流程无法再在后台悄悄完成并复活账号([#6506](https://github.com/farion1231/cc-switch/pull/6506))。接管下的请求会对照绑定账号校验:仍以另一个 ChatGPT 账号认证的 Codex 会话会得到「请重启 Codex」的明确报错,而不是静默把账单记到错误账号。([#3879](https://github.com/farion1231/cc-switch/pull/3879)、[#6535](https://github.com/farion1231/cc-switch/pull/6535)、[#6506](https://github.com/farion1231/cc-switch/pull/6506)) + +### Codex 模型目录:逐模型思考档位 + +Codex 供应商表单里的每个模型行现在可以声明其上游真实接受的思考档位——在八个标准档位(none 到 ultra)上多选,外加可选的默认档——生成的目录把它们带进 Codex 的选择器,不再继承基础模板的档位。未知值会被丢弃(笔误永远到不了 Codex),显式默认值会对照声明集校验,覆盖在原生 Responses 与 Chat 转换两条路径上都生效。代理转换层同时学会了 `ultra`:此前在路由供应商上选最深档会静默关闭扩展思考(Anthropic 路径)或丢掉 effort 参数,现在映射到上游合法的最深档。([#6228](https://github.com/farion1231/cc-switch/pull/6228)、[#6181](https://github.com/farion1231/cc-switch/issues/6181)) + +### 各厂预设按官方文档预填真实思考档位 + +预设现在带上各厂商实际文档化的档位——火山方舟 low/medium/high、DouBaoSeed minimal 到 high、混元 low/high、DeepSeek low/high/max、xAI Grok low/medium/high(无 none:思考关不掉)、智谱 GLM none/high 等——新建供应商的 Codex 选择器从此以事实起步;对智谱 GLM 来说,「关闭思考」终于能在 Codex 里选到。两个 Kimi 预设按 Moonshot 自家接入指南启用推理强度(顶层 `reasoning_effort`,只列网关接受的档位),Kimi For Coding 从一个模型扩到四个官方模型。百度千帆 Coding Plan 预设用平台文档化的 `thinking` 对象获得真实的思考开关。档位一律出自厂商文档或厂商自己的 Codex 目录,并收窄到真正行为有别的档——完全没有依据的模型保持不填。 + +### Claude Code WebSearch 与 Codex Alpha Search 走通本地代理 + +两条此前在代理上走死胡同的网页搜索路径打通了。Claude Code 内置 WebSearch 工具桥接到 OpenAI Responses 与 Codex OAuth 后端:搜索在上游执行,结果以成对的 Anthropic 搜索块返回、引用保留并合并、搜索次数计入用量。`max_uses` 在 Responses API 支持处用 `max_tool_calls` 原生限额;Codex OAuth 后端拒绝该参数,仅在请求强制使用该工具时以流中截断本地限额,未强制却带 `max_uses` 的请求显式报错。Responses API 无法表达的约束(`blocked_domains`、非直连调用方、`response_inclusion`、未知工具版本)同样显式报错,绝不悄悄放宽搜索范围。桥接只覆盖 Responses 转换路径——Chat Completions 上游仍不支持托管 WebSearch。另外,Codex 独立的 Alpha Search 端点注册为语义透传,带完整的供应商选择、鉴权、模型映射、重试与日志流水线,新版 Codex 客户端的 404 就此终结。Claude-in-Codex 路由攻略已三语更新:「GPT 路由下没有网页搜索」在这些路径上不再成立。([#5681](https://github.com/farion1231/cc-switch/pull/5681)、[#5363](https://github.com/farion1231/cc-switch/issues/5363)、[#5378](https://github.com/farion1231/cc-switch/issues/5378)) + +### 百度千帆 Token Plan 预设 + +千帆 Token Plan(个人版)——2026 年 7 月起替代 Coding Plan 面向新购用户——获得 Claude Code、Claude Desktop、Codex、OpenCode、OpenClaw 与 Hermes 六个应用的预设,走 `/tokenplan/personal` 端点。Codex 预设带六模型目录(DeepSeek V4 Pro / V4 Flash / V4 Flash 0731、GLM 5.2/5.1、Kimi K2.6),是首个思考开关与推理强度选择器都真实可用的千帆预设。密钥必须用 Token Plan 订阅的专属 key,而不是通用的千帆应用 key;老的 Coding Plan 预设为存量订阅保留。 + +### 模型选择器全面支持模糊搜索 + +供应商表单里所有「选模型」下拉——Claude Code(含 Copilot)、Claude Desktop 映射行、Codex、Gemini CLI、OpenCode、Hermes、OpenClaw 与 Pi——都换成了可输入过滤的组合框,按模型 id 和厂商名都能匹配,顺手把四份内联重复组件合而为一。对着返回几百个模型的供应商尤其好用。([#6285](https://github.com/farion1231/cc-switch/pull/6285)、[#6353](https://github.com/farion1231/cc-switch/pull/6353)) + +### 其他新增 + +- **接管开启确认动画**:为当前应用打开路由接管时头部品牌区播放一次性彩带——应用启动、切换应用或系统偏好「减少动态效果」时绝不触发。同一改动补上一个真实缺口:接管开关在初始代理状态加载完成前置灰,对未知状态的点击不再可能把接管拨错方向。([#6209](https://github.com/farion1231/cc-switch/pull/6209)) +- **Codex 表单 1M 上下文开关回归**:上游 Codex 重新接受 `model_context_window = 1000000`,四月隐藏的开关(连同配套的自动压缩阈值输入)回来了,写的还是原来那两个 config.toml 字段。 +- **新预设**:PPIO(厂商贡献)、JieKou AI(厂商贡献)、XycAi(合作伙伴)分别接入各自支持的应用。([#6239](https://github.com/farion1231/cc-switch/pull/6239)、[#6356](https://github.com/farion1231/cc-switch/pull/6356)) + +--- + +## 变更 + +### Codex 官方账号卡退出自动故障转移 + +官方 ChatGPT 卡不再被加入、列出或经由故障转移队列重试,官方路由上的所有错误类别一律不可重试——对着另一个供应商重试会把入站的 ChatGPT 授权用到别的账号头上。内置官方卡的存量队列行在读取时过滤。官方卡判定也不再只看类别标签:存了真实 API key 或显式第三方上游的卡按普通供应商对待,保留直连路径与故障转移资格。([#3879](https://github.com/farion1231/cc-switch/pull/3879)、[#6535](https://github.com/farion1231/cc-switch/pull/6535)) + +### Codex OAuth 配额显示逐卡可配置 + +绑定 ChatGPT 账号的卡获得与脚本类供应商相同的「配置用量查询」入口:配额页脚可以关闭、刷新间隔可改(此前硬编码五分钟且没有关闭开关),对话框的测试按钮查询的是**绑定的账号**而不是 CLI 恰好登录的账号,托盘也不再给账号绑定卡装饰全局订阅百分比。([#6537](https://github.com/farion1231/cc-switch/pull/6537)) + +### OpenCode Go 改为直连 + +OpenCode Go 网关原生提供 Anthropic Messages,但其 `/v1/messages` 只认 `x-api-key`、静默忽略 Bearer 头——Claude Code 预设改为把密钥存进 `ANTHROPIC_API_KEY` 并去掉 Chat 格式声明,Claude Code 直连网关,不再需要路由接管、不再显示「需要路由」徽章。Claude Desktop 依设计保持代理模式(它自己不能改模型名),但代理现在透传 Anthropic Messages 而不是转成 OpenAI Chat。Codex 侧预设还把 DeepSeek V4 系模型的上下文窗口填到 1,048,576,Codex 不再围着 128K 回退值自动压缩。([#6171](https://github.com/farion1231/cc-switch/issues/6171)、[#6196](https://github.com/farion1231/cc-switch/pull/6196)) + +### 供应商表单一致性打磨 + +一轮贡献者主导的全应用供应商对话框对齐:Grok Build 与 Claude Desktop 表单搬上与其他应用相同的玻璃卡片;子分区共享同一套左规线层级;空配置编辑器收缩到三行而不是空占 6–14 行;Hermes 与 OpenClaw 的模型编辑器改为可展开详情的紧凑行并补上无障碍标签(展开状态改用稳定行键,删除模型不再让错误的行保持展开);复选框统一为一个原生组件;Claude 表单的「API 格式」改名「上游格式」并逐选项说明哪些格式需要路由接管。另外,主面板供应商卡片上的合作伙伴星标已移除——合作伙伴标识只保留在预设选择器里。([#6198](https://github.com/farion1231/cc-switch/pull/6198)–[#6201](https://github.com/farion1231/cc-switch/pull/6201)、[#6203](https://github.com/farion1231/cc-switch/pull/6203)–[#6208](https://github.com/farion1231/cc-switch/pull/6208)) + +### Claude Desktop:连接模式改为下拉选择、两套模型列表互不覆盖 + +直连与模型映射改为带标签的下拉选择而不是开关;来回切换时各模式保留自己的模型行;直连模式的模型列表常驻显示、不再藏在「高级」折叠里;选择直连预设会预填其模型列表而不是丢弃。([#6208](https://github.com/farion1231/cc-switch/pull/6208)) + +### Grok Build 表单重建在 Codex 布局上 + +Grok Build 供应商对话框现在渲染与 Codex 共享的字段集——端点、密钥、默认模型、含上游格式/思考/User-Agent 的高级区——文案全程 Grok 化(一个 follow-up 抓住了对齐时漏进来的五处 Codex 措辞)。独立的「API Backend」与「客户端模型档案」输入框移除:客户端一律讲 Responses——Chat 或 Anthropic 上游需要转换时对着本地代理、否则直连上游——上游协议经高级 → 上游格式表达;经表单保存会把存储配置的 `api_backend` 钉为 `responses`,当前供应商立即写入 live 配置、其余供应商在下次切换时生效——见升级提醒。([#6427](https://github.com/farion1231/cc-switch/pull/6427)、[#6511](https://github.com/farion1231/cc-switch/pull/6511)) + +### Kimi 上游改为干净透传 + +应 Moonshot 方面要求,代理不再向 Kimi/Moonshot 端点的工具调用历史注入占位思考块、也不再发出非标准的 `reasoning_content` 字段——其网关已不再要求思考回放,注入的占位符反而扰乱模型思维链。Kimi 路由上的工具调用历史原样转发(代理流水线其余部分不变),对存量供应商立即生效。DeepSeek 与 MiMo 保留该行为——那是文档明载的服务端要求。 + +### DeepSeek V4 按新峰值档牌价重定价、Gemini 3.7 Flash 播种 + +DeepSeek 于 2026-08-16 引入峰谷计价并大幅上调:`deepseek-v4-flash`(及其 `-0731`、`deepseek-chat`、`deepseek-reasoner` 别名)的内置价从每百万 token 输入/输出 $0.14/$0.28 调至 **$0.44/$1.32**、缓存读取 $0.014;`deepseek-v4-pro` 从 $0.435/$0.87 调至 **$1.32/$3.96**、缓存读取 $0.044。价格表没有时段维度,**刻意录入峰值档**——高峰时段(北京 9:00–12:00、14:00–18:00)与工作时间重合;一天中其余十七个小时的用量读数因此约为实际账单的两倍。守护式修复会迁移仍持有旧内置价的数据库;你自己改过的价格绝不触碰。`gemini-3.7-flash` 按介绍价 $0.75/$3.75(缓存读取 $0.075)播种,2027 年起恢复牌价;`gemini-3.6-flash` 未调整——它没有拿到促销价。 + +### 其他变更 + +- **BytePlus 预设切换到原生 Responses**:BytePlus 自家 Codex 指南在预设所用端点上配置 `wire_api = "responses"`,预设遂与境内的火山兄弟预设一致声明原生 Responses,并预填文档化的 low/medium/high 档位。 +- **Codex 表单移除 Goal 模式开关**:codex-cli 0.147.0 起默认启用 goals,开关已具误导性——取消勾选会删掉配置行、进而回落为开启,界面显示关闭而功能仍在。现在无需任何配置;你此前写下的 `goals = true` 留在 config.toml 里,无副作用。 +- **项目 Profile 变更触发自动同步**:WebDAV/S3 自动同步的触发表从未加入 `profiles` 表,Profile 编辑只有蹭到其他表变更才会上云;两份传输各自的触发表合并为一份共享清单并纳入 profiles。([#6147](https://github.com/farion1231/cc-switch/pull/6147)) +- **合作伙伴清单维护**:RunAPI 预设迁移到其新域名 `runapi.host`(预设类型支持处保留旧域名作后备端点);PPIO 列为项目赞助商。 + +--- + +## 修复 + +### Windows:WSL 路径上无法更新配置(v3.19.2 回归) + +v3.19.2 把 Windows 原子写切换到 `ReplaceFileW`,而 WSL 文件系统以 `ERROR_NOT_SUPPORTED` (50) 拒绝它——rename 回退只在 NotFound 时触发,于是 `\\wsl.localhost` / `\\wsl$` 路径上任何替换已有 live 配置的写入都直接失败:存量供应商无法更新或切换(只有配置文件的首次创建——缺失目标本就触发回退——仍然可用)。错误 50 现在落入 WSL 接受的 rename 路径。仅 v3.19.2 受影响;该版本内无任何绕过手段,受影响用户请直接升级。([#6232](https://github.com/farion1231/cc-switch/pull/6232)、[#6224](https://github.com/farion1231/cc-switch/issues/6224)、[#6219](https://github.com/farion1231/cc-switch/issues/6219)、[#6188](https://github.com/farion1231/cc-switch/issues/6188)、[#6247](https://github.com/farion1231/cc-switch/issues/6247)) + +### Windows:CLI 检测终于和终端看到的一致 + +版本检测此前依赖继承的进程 PATH 加一份硬编码目录清单——且探测顺序还是错的。三种可见故障、各有一个成因:应用内自更新后重启的进程只继承机器 PATH、丢掉用户 PATH,用户安装的 CLI 显示「未安装」,直到从开始菜单完整重启([#6061](https://github.com/farion1231/cc-switch/issues/6061));winget 装的 Claude Code、独立安装器装的 Codex 与自定义 npm prefix 的目录从未被扫描([#6278](https://github.com/farion1231/cc-switch/issues/6278)、[#6047](https://github.com/farion1231/cc-switch/issues/6047)、[#4366](https://github.com/farion1231/cc-switch/issues/4366));硬编码目录先于 PATH 默认项探测,过期的 `%APPDATA%\npm` shim 遮住 PATH 上实际更新的安装——「更新了但还显示旧版本」([#4701](https://github.com/farion1231/cc-switch/pull/4701))。检测现在把注册表 PATH(用户+机器,展开 `%VAR%`)合并进有效搜索路径,扫描独立安装器目录,经显式的 `where.exe` 调用优先探测 PATH 默认项(跳过 Microsoft Store 应用别名、绝不搜索当前目录),并把同一份合并 PATH 喂给安装冲突诊断与锚定升级。([#6284](https://github.com/farion1231/cc-switch/pull/6284)) + +### 启动不再白/黑闪屏 + +窗口在主题类应用之前就被显示,未着色的页面先画了一帧。内联的预绘制脚本现在在包加载前同步应用持久化主题(全平台),Windows 上窗口还会保持隐藏直到页面加载完成。([#6252](https://github.com/farion1231/cc-switch/pull/6252)、[#6182](https://github.com/farion1231/cc-switch/issues/6182)) + +### Windows 安装包不再写入垃圾注册表键 + +WiX 模板里的 `Software\{{manufacturer}}\{{product_name}}` 用了单反斜杠,被 Handlebars 当作转义序列吞掉——自 v3.4.0 起每个 MSI 都在创建字面量的 `HKCU\Software{{manufacturer}}{{product_name}}` 键而不是预期路径。两处反斜杠已加倍,与模板里其他键对齐。已装机器上的存量垃圾键不会被清理——见升级提醒。([#6283](https://github.com/farion1231/cc-switch/issues/6283)) + +### 代理接管恢复不再抹掉官方 ChatGPT 登录 + +接管的恢复备份是接管开始时的快照;如果你在接管期间跑过 `codex login`,每次恢复——停止接管、退出应用、崩溃恢复——都会用登录前的快照盖掉新登录,启动时的自动重接管还让这次抹除每次重启都重演。恢复现在会仲裁:live 登录材料永远胜出(只有 Codex 自己能推进它,必然比快照新),备份里的第三方 API key 降级写进 config.toml 保留而不是砸掉 auth.json。被早期版本毁掉的登录不会被恢复——跑一次 `codex login` 即可。([#6277](https://github.com/farion1231/cc-switch/issues/6277)) + +### 环境检查不再在「全部升级」或冲突诊断时挂死 + +v3.19.2 携带的一次重构把 PATH 探测的登录 shell 放进仍持有控制终端的后台进程组:从终端启动的实例上,作业控制以 SIGTTIN 停住 shell、无限期的等待永不返回——整个预检冻结。即便在不可能发生这种情况的场景(正常启动的构建没有控制终端),该路径也完全没有超时,Windows 亦然——一个挂住的探测(阻塞的 `.zshrc`、不退出的 `--version`)同样冻结整轮检查。探测现在跑在完全分离的会话里、stdin 置空、10 秒硬超时并杀掉整棵进程树;丢失的探测只降级该工具的报告而不是挂死整轮,按钮在探测阶段显示加载指示而不是看似无视点击。([#5522](https://github.com/farion1231/cc-switch/pull/5522) 的回归) + +### macOS 输入法不再打乱供应商表单 + +使用中文/日文输入法快速输入时,供应商表单字段会间歇性地重复与乱序——报告中的复现里 12 个字符膨胀到 1,396 个。受控输入在输入法仍持有组字区间时把父状态写回 DOM,供应商键字段甚至对每个组字中间态都跑小写化清洗。共享的 IME 安全输入组件现在把组字文本留在本地直到提交、只对成品文本做归一化、并在组字中途失焦时强制提交待定文本(WebKit 的窗口切换路径根本不发 `compositionend`)。应用到所有应用共享的名称/备注/官网字段与 Hermes、OpenClaw、OpenCode 的字段集——腐坏被报告的位置。已存坏的值不会自愈——重新编辑一次即可。([#6308](https://github.com/farion1231/cc-switch/issues/6308)、[#6333](https://github.com/farion1231/cc-switch/pull/6333)、[#6507](https://github.com/farion1231/cc-switch/pull/6507)) + +### SQL 备份逐值保真、截断导入被拒绝 + +SQL 导出/导入循环的四处缺陷:TEXT 值含非 UTF-8 字节时导出中止、含 NUL 字节时语句被静默截断;REAL 值丢失存储类别(无穷、负零、整数值 REAL);AUTOINCREMENT 高水位从存活行重推导而不是保留;恢复后数据库的 `auto_vacuum` 模式被降级、下次启动以整库 VACUUM 重建来修补。四处全部修复。校验还移到了建表之前:截断的 SQL 文件——或缺少 CC Switch 核心表的文件——现在带着原库不动被拒绝,此前 schema 迁移可能凭空造出缺失的表、让残缺数据顶替你的数据库。没有供应商或 MCP 的真实导出现在可以导入而不是被拒。([#6146](https://github.com/farion1231/cc-switch/pull/6146)) + +### 备份原子发布、恢复先在暂存库校验、全流程严格串行 + +备份此前在复制任何页之前就以最终文件名创建、复制结果被忽略——一次被打断的复制变成一个看似有效的备份文件。备份现在在临时文件里构建、完整性校验通过后才发布且不覆盖同名文件。恢复在触碰 live 数据库前先在暂存库校验整个镜像——完整性、schema 表、迁移——损坏或更新 schema 的备份干净地失败而不是替换到一半才发现;保留策略现在同时保护正在恢复的备份与新鲜的安全快照。并发侧:WebDAV 与 S3 此前各持各的锁、两种传输可以同时恢复,手动导入与 `.db` 恢复完全无锁,Skills 文件与其镜像的数据库行之间也没有共享锁。一把全局同步锁现在端到端串行化所有路径,Skills 状态锁让行与文件同进退,自动同步抑制从下载真正开始时才启动——排队等待期间的本地编辑不再被静默吞掉。会话日志读取游标也从云快照中排除:它们是绝对的本地文件位置,导入别的机器的游标会让本机用量摄取失步。([#6147](https://github.com/farion1231/cc-switch/pull/6147)、[#6129](https://github.com/farion1231/cc-switch/issues/6129)) + +### 恢复备份现在会重建依赖数据库的一切 + +恢复 `.db` 备份此前只改数据库——每个应用的 live 配置保持恢复前内容,直到下次手动切换供应商;SQL 导入与云下载后的收尾例程还跑在一个一次性状态对象上、缓存失效谁也够不着。所有恢复路径现在把恢复后的数据库向外投影——除 Pi 外每个受管应用的 live 配置(Pi 的 `models.json` 仍是事实源、下次启动反向导入)、各应用提示词文件、运行时日志级别与托盘用量缓存——并在恢复行之上重新应用你本地的设置文件与用户自改的模型定价;一个应用失败不再静默跳过其余。([#6147](https://github.com/farion1231/cc-switch/pull/6147)、[#6129](https://github.com/farion1231/cc-switch/issues/6129)) + +### 用量趋势图跨年时高亮与提示框终于一致 + +跨多年的区间上,悬停会高亮一个年份的点、提示框却描述另一个年份:图表用本地化的 MM/DD 文本作 X 轴键,不同年份的桶共享同一分类值,图表库的活动点查找返回首个匹配——高亮吸到早年份的点、提示框跟着光标走(绘制的点本身从来没错)。X 轴现在以后端完整的桶时间戳为键,刻度标签与提示框分别解析(跨年区间显示年份)。([#6337](https://github.com/farion1231/cc-switch/pull/6337)、[#6302](https://github.com/farion1231/cc-switch/issues/6302)) + +### 火山方舟:Agent Plan 预设终于指向 Agent Plan + +以 Agent Plan 命名的预设在关键处指向 Coding Plan——端点与邀请链接——而两个计划是配额不互通的独立订阅。现拆分为六应用各两个预设:Agent Plan 走 `/api/plan[/v3]`(Codex 上原生 Responses)、Coding Plan 走原有 `/api/coding[/v3]`。计划配额检测放宽为识别 Agent Plan 端点,对存量供应商立即生效;预设本身作用于新建供应商——持有旧供应商的 Agent Plan 订阅者请重建或修改 Base URL。([#6070](https://github.com/farion1231/cc-switch/issues/6070)、[#6448](https://github.com/farion1231/cc-switch/issues/6448)) + +### 思考开关与推理档位的一批方言修正 + +- **ModelScope / Novita / Nvidia 的思考开关方言**:三个聚合平台预设都声明了它们谁也没文档化的智谱式 `thinking:{type}` 对象——ModelScope 与 Novita 上开关无效,Nvidia NIM 上注入字段可能被整体拒绝。前两家改发文档化的 `enable_thinking` 布尔值;Nvidia 的开关整个撤下——真正的控制不在该参数可及之处。平台推断表新增 ModelScope 分支,无存储声明的手建 ModelScope 供应商立即得到纠正。 +- **StepFun 推理强度到达 step-3.7-flash**:推断分支此前只给 2603 后缀模型 effort,Codex 里选的档位对 step-3.7-flash 被静默丢弃;现在原样透传 low/medium/high,2603 系保持两档映射,无后缀的 step-3.5-flash 刻意不发 effort 字段——StepFun 没有为它文档化任何强度控制。 +- **OpenCode Zen 推理档位到达网关**:路由模式下 Codex 里选的档位从未按原样到达网关——GLM/Kimi/MiMo 模型上代理回落到模型厂商启发式、丢档位、发网关不认的智谱式字段,DeepSeek 模型上发的是 DeepSeek 方言强转后的值。`opencode.ai` 平台规则现在发顶层 `reasoning_effort`,按各模型声明的档位钳制,无强度控制的模型不发而不是瞎猜。存量供应商需重加一次预设携带逐模型档位表。([#6123](https://github.com/farion1231/cc-switch/pull/6123)、[#6112](https://github.com/farion1231/cc-switch/issues/6112)) +- **SiliconFlow 与 ModelScope 预设指向不存在的模型**:厂商目录盘点发现 SiliconFlow 预设携带两站都没有的 MiniMax id(首个请求即 400「Model does not exist」),ModelScope 预设指向其免费通道不可用的 GLM id。现改为 `Pro/MiniMaxAI/MiniMax-M2.5`(.cn)、`MiniMaxAI/MiniMax-M3`(.com,真实 1M 窗口)与 `ZhipuAI/GLM-5.2`,覆盖七个应用。 + +### 用量与定价的一批修正 + +- **DeepSeek 缓存命中在 Chat 路径被计为零**:只转发 DeepSeek 文档字段 `prompt_cache_hit_tokens`、不镜像进 OpenAI 式字段的中转商,其缓存命中被记为 0、命中 token 按新输入计价高估成本。该字段现居标准回退链末位,用量解析与合成的 Codex 用量都覆盖。([#6126](https://github.com/farion1231/cc-switch/pull/6126)、[#6073](https://github.com/farion1231/cc-switch/issues/6073)) +- **Grok Build 对话不再因缺用量字段失败**:Chat 上游不报缓存 token 的每一轮都以「missing field `input_tokens_details`」失败——报告中的 GLM-5.2 上游恒发 `cached_tokens: 0`,即每轮必炸。Chat→Responses 用量翻译此前只在有缓存 token 时发出该对象,而 Grok 客户端要求它必在;现在恒发出,流式路径同样。([#6423](https://github.com/farion1231/cc-switch/pull/6423)、[#6140](https://github.com/farion1231/cc-switch/issues/6140)) +- **智谱配额层级在 CREDIT_LIMIT 改名后重新出现**:智谱把境内端点的配额条目类型从 `TOKENS_LIMIT` 改名 `CREDIT_LIMIT`,解析器只认旧值、丢掉全部层级、面板空白。两个值现在都接受。([#6160](https://github.com/farion1231/cc-switch/pull/6160)、[#6153](https://github.com/farion1231/cc-switch/issues/6153)) +- **Grok 4.5 缓存价修正;Grok 4.6 与一个 DeepSeek 别名补价**:`grok-4.5` 被错播成 grok-4.6 的 $0.50 缓存读取价,修正为实际的 $0.30 并守护式修复存量库。`grok-4.6` 按 $2/$6、缓存读取 $0.50 播种——基础档:xAI 对超过 200K 提示的 Grok 4.5/4.6 全费率翻倍而价格表没有档位列,长上下文 Grok 请求的读数约为账单一半。`deepseek-v4-flash-0731`——id 归一器剥不掉的 4 位日期变体、匹配不到任何价格行、一直按 $0 计费——获得自己的行;其历史 $0 行按现行价回填,该模型历史合计因此上升。 + +### 其他修复 + +- **文件丢失的 Skill 显示为可更新**:更新检查此前只信数据库缓存的内容哈希、从不看文件系统——文件没了的 Skill(典型场景:跨机数据库恢复只搬行不搬文件)永远报「无更新」,唯一出路是卸载重装。检查现在先确认 Skill 目录存在;缺目录显示为可更新、安装即重建文件。覆盖仓库安装的 Skill——本地创建的 Skill 不做更新检查,文件缺失仍需手动重加。 +- **OpenClaw「设为默认」会询问模型并保留你的后备链**:设为默认此前总是取首个模型、并用合成链替换 `openclaw.json` 里已有的后备链。多模型供应商现在弹出选择器,写入合并进既有默认模型块、保留后备链与未知键。([#6201](https://github.com/farion1231/cc-switch/pull/6201)) +- **用户自有的 Codex `model_catalog_json` 不再被覆盖**:切换供应商此前无条件把 `~/.codex/config.toml` 的 `model_catalog_json` 指向应用生成的目录、丢弃自定义目录路径。指针现在只在缺失或已是 CC Switch 自有文件名时才认领。仅防今后——被早期版本改写过的指针不会被还原,见升级提醒。([#6087](https://github.com/farion1231/cc-switch/pull/6087)) +- **镜像的 DeepSeek Codex 目录恢复尖括号文本**:内置的 DeepSeek 官方 Codex 目录镜像提取时先做了 HTML 反转义再剥标签,四个 harness 字符串里的字面尖括号文本被当标记吞掉——`base_instructions` 里的一句指令与一个 markdown 链接示例、两个模型的消息模板都被损坏。镜像恢复逐字节保真,存量 DeepSeek 原生 Responses 供应商在下次切换时自动拾取、无需重存。 + +--- + +## 安全加固 + +### 模型拉取报错不再回显凭据 + +失败的「拉取模型」调用可能把 API key 反射进可见的错误信息,其他位置的脱敏也只对 8 个字符以上的密钥生效。拉取错误体现在经过严格脱敏——API key 与本版新支持的自定义请求头值,短至 1 个字符也隐藏——覆盖所有应用的供应商表单。拉取本身还为 Pi 变得格式感知:凭据头随供应商的 API 格式走,支持校验过的自定义请求头、包括仅请求头认证。([#6064](https://github.com/farion1231/cc-switch/pull/6064)) + +--- + +## 升级提醒 + +### 本版包含数据库迁移,降级需还原备份 + +schema 从 v16 迁移到 v17(Pi 导入器的会话用量去重账本),迁移前自动创建备份。本版运行过一次后,旧版 CC Switch 会拒绝打开数据库——降级需还原该备份。 + +### Pi 首次启动会导入既有供应商并回填历史用量 + +Pi 默认作为新应用页签出现。首启时 `~/.pi/agent/models.json` 里已写入的供应商被导入为可管理卡片;首次用量同步扫描所有可发现的 Pi 会话并回填历史用量,**看板总数可能跳涨**。Pi 自己的登录、默认供应商与默认模型永不触碰。配置为相对路径的 Pi `sessionDir` 无法枚举——会话浏览与用量导入请设绝对路径。 + +### v3.19.2 的 WSL 用户请直接升级 + +如果你在 v3.19.2 上使用 WSL 托管的配置目录,该版本无法更新或切换已有配置——请直接升级到本版。 + +### MSI 存量垃圾注册表键不会被清理 + +从 v3.4.0 到 v3.19.2 之间任何 MSI 安装过的 Windows 机器,升级后仍保留过期的 `HKCU\Software{{manufacturer}}{{product_name}}` 键;本修复不删除它。想清掉请用 regedit 手动删除——注意删除可能触发一次性的 Windows Installer 修复弹窗,因为它曾被注册为安装的键路径。 + +### 部分 ChatGPT 账号需要重登一次 + +本版之前登录进认证中心的 ChatGPT 账号早于 id_token 持久化,会显示「需要重新登录」徽章;绑定到供应商卡之前请重登一次。被修复前的接管恢复缺陷抹掉的 ChatGPT 登录同样不会被找回——跑一次 `codex login` 即可。 + +### 故障转移队列里的官方卡被移出 + +如果内置的 Codex 官方卡在你的自动故障转移队列里,它现在会被过滤,Auto 模式不会从官方卡启动;请选一个第三方 Codex 供应商作为主选。 + +### WSL / exFAT 上停止 Codex 接管改为拒绝恢复 + +在 WSL 或 exFAT 配置目录上,停止 Codex 接管现在以明确的「文件系统不支持安全恢复」报错拒绝执行,而不是冒险写出半份 auth 文件。不会删除任何东西,但接管前的凭据也**不会被写回**——之后请重跑 `codex login`,或把 Codex 目录放在支持安全探测的文件系统上。 + +### 预设改动只作用于新建供应商(例外见文末) + +存量供应商保留创建时的配置。本版涉及:火山 Agent Plan 端点、ModelScope/Novita/Nvidia 思考方言、Kimi 推理强度、BytePlus 原生 Responses、SiliconFlow/ModelScope 模型 id 替换、OpenCode Go 直连与 1M 窗口、预填的推理档位、RunAPI 新域名。重新从预设创建(或手动改相应字段)即可获得。**立即对存量供应商生效的例外**:Kimi 透传变更、无存储声明供应商的平台推断修正(ModelScope、StepFun、opencode.ai)、火山 Agent Plan 端点的配额检测、DeepSeek 官方目录修复(下次切换时)。 + +### 被改写过的 `model_catalog_json` 指针需要手动指回一次 + +早期版本已改写过 `~/.codex/config.toml` 里 `model_catalog_json` 的用户,本版不会还原你原来的指针——手动指回你自己的文件一次,此后它不再被动。指向用户自有文件期间,CC Switch 的逐供应商模型表(显示名、上下文窗口、推理档位)不会到达 Codex。 + +### Grok Build 保存表单会钉住 `api_backend` + +经表单保存存量 Grok Build 供应商会把其存储配置的 `api_backend` 钉为 `responses`——当前供应商立即写入 live 配置,其余供应商在下次切换到它时生效;上游协议改经高级 → 上游格式设置。 + +### IME 缺陷已存坏的文本需要重新编辑 + +本版之前被输入法缺陷弄坏的文本仍留在数据库与 live 配置里——把受影响的供应商名称/密钥/模型字段重新编辑一次即可。 + +### DeepSeek V4 成本读数将显著上升 + +看板中 DeepSeek V4 今后的成本大约:输入 3 倍、输出 4.5–4.7 倍、缓存读取 5 倍(Flash)到 12 倍(Pro)——这是厂商新的峰值档牌价,不是统计口径变化。成本在记录时冻结,历史不会重新计价——例外是此前无价的 `deepseek-v4-flash-0731` 行从 $0 按现行峰值价回填,这些历史合计会偏高。你手动改过的价格永不触碰。Gemini 3.7 Flash 按厂商标注持续到 2026 年底的介绍价播种。 + +### 备份与恢复行为变化 + +早期版本导出的 SQL 备份保留其原有的保真损失——依赖精确往返请导出一份新备份。截断或缺核心表的 SQL 文件现在在导入时被拒绝(早期版本可能会接受);恢复 `.db` 备份现在会按恢复后的数据库重写除 Pi 外所有受管应用的 live 配置(此前只改数据库)。启用 WebDAV/S3 自动同步后,项目 Profile 的编辑现在也会排队上传快照。 + +### WebSearch 不可表达的约束显式报错 + +Claude Code WebSearch 请求携带 Responses API 无法表达的约束时(`blocked_domains`、非直连调用方、`response_inclusion`、或未强制工具时在 Codex OAuth 上带 `max_uses`),现在显式报错而不是搜得比要求更宽;Chat 格式上游仍不支持托管 WebSearch。 + +### Kimi 端点升级后若报思考类 400 + +先检查重加预设后新发送的 `thinking` / `reasoning_effort` 字段——Moonshot 的参数文档与其 Codex 接入指南对 kimi-k3 是否接受 `thinking` 说法相反,预设按接入指南执行。只有「要求回传思考历史」形态的 400 才指向已移除的历史注入。 + +--- + +## 风险提示 + +### 沿用的提示 + +**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 不对因使用这些功能而导致的任何账号限制、警告或服务暂停承担责任。 + +--- + +## 致谢 + +这一版 69 个提交里有 38 个来自 11 位外部贡献者——本版的三条主线全部有外部贡献者的深度参与。 + +### 代码贡献 + +- 感谢 @SaladDay——19 个提交,本版最大贡献者:Pi 整条主线([#6064](https://github.com/farion1231/cc-switch/pull/6064)、[#6463](https://github.com/farion1231/cc-switch/pull/6463))、Codex 多账号整条主线([#3879](https://github.com/farion1231/cc-switch/pull/3879)、[#6535](https://github.com/farion1231/cc-switch/pull/6535)、[#6506](https://github.com/farion1231/cc-switch/pull/6506)、[#6537](https://github.com/farion1231/cc-switch/pull/6537))、十个 PR 的表单一致性打磨、Windows 启动闪屏修复([#6252](https://github.com/farion1231/cc-switch/pull/6252))与 Grok Build 用量字段修复。 +- 感谢 @YUZHEthefool:备份与同步两波加固([#6146](https://github.com/farion1231/cc-switch/pull/6146)、[#6147](https://github.com/farion1231/cc-switch/pull/6147))——「修复」章节的三大数据可靠性条目尽出于此;还有 Windows CLI 检测大修([#6284](https://github.com/farion1231/cc-switch/pull/6284))、模型选择器模糊搜索([#6285](https://github.com/farion1231/cc-switch/pull/6285)、[#6353](https://github.com/farion1231/cc-switch/pull/6353))、智谱 CREDIT_LIMIT 与 Grok Build 表单对齐。 +- 感谢 @allenxu09:v3.19.2 WSL 写入回归的热修([#6232](https://github.com/farion1231/cc-switch/pull/6232))与真实 WSL2 文件系统的 CI 覆盖([#6233](https://github.com/farion1231/cc-switch/pull/6233))——修完还把同类缺陷的测试缺口补上了。 +- 感谢 @Program120:WebSearch 与 Alpha Search 的代理桥接([#5681](https://github.com/farion1231/cc-switch/pull/5681)),一个人打通了本版第三条主线。 +- 感谢 @stofancy:Codex 目录逐模型推理档位([#6228](https://github.com/farion1231/cc-switch/pull/6228))——本版思考档位整轮梳理的地基。 +- 感谢 @zayokami:OpenCode Zen 推理档位路由([#6123](https://github.com/farion1231/cc-switch/pull/6123))、DeepSeek 缓存命中统计([#6126](https://github.com/farion1231/cc-switch/pull/6126))与 Grok Build 文案修正([#6511](https://github.com/farion1231/cc-switch/pull/6511))。 +- 感谢 @yovinchen:macOS 输入法腐坏修复及其加固([#6333](https://github.com/farion1231/cc-switch/pull/6333)、[#6507](https://github.com/farion1231/cc-switch/pull/6507))。 +- 感谢 @Hexc01:用量趋势图跨年错位修复([#6337](https://github.com/farion1231/cc-switch/pull/6337))。 +- 感谢 @misaka-myu:尊重用户自有 `model_catalog_json`([#6087](https://github.com/farion1231/cc-switch/pull/6087))。 +- 也感谢 @hu-miao 与 @jiekouai 分别贡献各自平台的预设([#6239](https://github.com/farion1231/cc-switch/pull/6239)、[#6356](https://github.com/farion1231/cc-switch/pull/6356))。 + +### 问题反馈 + +- 感谢 @vxzhong 在 [#6188](https://github.com/farion1231/cc-switch/issues/6188) 对 WSL 写入回归的报告——os error 50 的精确定位直接框定了热修方向。 +- 感谢 Windows CLI 检测五 issue 家族的各位:@RonsonNamek([#6061](https://github.com/farion1231/cc-switch/issues/6061))、@gaoqiong001([#6278](https://github.com/farion1231/cc-switch/issues/6278))、@lovelyhjqhs([#6047](https://github.com/farion1231/cc-switch/issues/6047))、@baoyu0([#4366](https://github.com/farion1231/cc-switch/issues/4366))——@jiangliushi666 更早在 [#4701](https://github.com/farion1231/cc-switch/pull/4701) 就指出了 PATH 探测顺序问题。 +- 感谢 @HyskoaMorroh 报告接管恢复抹掉 ChatGPT 登录([#6277](https://github.com/farion1231/cc-switch/issues/6277))、@CacinieP 以精确复现报告输入法腐坏([#6308](https://github.com/farion1231/cc-switch/issues/6308))、@FishV6A 报告启动闪屏([#6182](https://github.com/farion1231/cc-switch/issues/6182))、@Destiny4073 报告 MSI 注册表错写([#6283](https://github.com/farion1231/cc-switch/issues/6283))。 +- 感谢 @totoneei([#6302](https://github.com/farion1231/cc-switch/issues/6302))、@zju-zhanglu([#6153](https://github.com/farion1231/cc-switch/issues/6153))、@xiaoyu753([#6073](https://github.com/farion1231/cc-switch/issues/6073))、@GengchenXU([#6140](https://github.com/farion1231/cc-switch/issues/6140))、@HOnnTaka([#6112](https://github.com/farion1231/cc-switch/issues/6112))、@Xiao0219([#6171](https://github.com/farion1231/cc-switch/issues/6171))、@STEVENTAN100([#6181](https://github.com/farion1231/cc-switch/issues/6181))、@20130101([#6070](https://github.com/farion1231/cc-switch/issues/6070))与 @leoncdq([#6448](https://github.com/farion1231/cc-switch/issues/6448))——用量、配额与档位的一整批修正都始于这些报告。 + +--- + +## 下载与安装 + +访问 [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.20.0-Windows.msi` | **推荐** - MSI 安装包,支持自动更新 | +| `CC-Switch-v3.20.0-Windows-Portable.zip` | 便携版,解压即用,不写入注册表 | + +Windows ARM64 设备请选择文件名中带 `arm64` 标识的对应制品。 + +### macOS + +| 文件 | 说明 | +| -------------------------------- | --------------------------------------------- | +| `CC-Switch-v3.20.0-macOS.dmg` | **推荐** - DMG 安装包,拖入 Applications 即可 | +| `CC-Switch-v3.20.0-macOS.zip` | 解压后拖入 Applications,Universal Binary | +| `CC-Switch-v3.20.0-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.20.0-Linux-x86_64.AppImage` / `.deb` / `.rpm` +- `CC-Switch-v3.20.0-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` |