From 5e57b1ecf14da66a1c27c0b26740faeb8b674d99 Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 11 Oct 2026 23:26:46 +0800 Subject: [PATCH] chore(release): v4.0.9 --- CHANGELOG.md | 39 +++++++++++++++++++++++++++++++++++++++ package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 5 files changed, 43 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 575c82838..9d6cd4cad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,45 @@ All notable changes to CC Switch will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.0.9] - 2026-10-11 + +The fifth patch release on the 4.0 stable line. Codex threads that carry tool results with no matching call, such as the create_thread receipt the Codex desktop app injects into new threads, no longer fail on strict Chat upstreams (HTTP 400) or xAI native Responses (HTTP 422). Clients that cannot reach the host's loopback, such as Claude Desktop sessions in WSL2, can be given a separate connection address for local routing. Fetched models are now picked in a dialog that can also remove them and shows each model's parameters, Codex can set a default sub-agent model and reasoning effort, and the provider forms move field explanations into help tips. Other fixes cover OpenAI-format Claude upstreams receiving `x-api-key`, aggregation compatibility switches, the UI language on cold start, macOS local network access and flicker when opening the provider editor. + +**Stats**: 33 commits | 85 files changed | +5948 insertions | -1416 deletions + +### Added + +- **Connection Address for Local Routing** (#7878, fixes #7877): The proxy URL written into client configs, including Claude Desktop's gateway URL, was always derived from the listen address with `0.0.0.0` written as `127.0.0.1`, so clients outside the host's loopback (Claude Desktop sessions in WSL2 NAT mode) got an unreachable address. Settings > Local routing gains an optional "Connection address", stored in the device-local `~/.cc-switch/settings.json` so cloud sync never carries it to another machine. When set it replaces the host in every proxy URL written to clients; saving rewrites routed clients without restarting the service and is safe to retry. +- **Model Picker Dialog**: The fetched-model picker was an inline box under the model list that could only add models. It is now a dialog opened from the list header in Claude Code Aggregation, both Codex model list layouts, OpenCode and MiniMax Code. A successful fetch opens it; afterwards the button reads "Select models" and reopens it without fetching, with a refresh button inside. A checkbox means "in the list": configured models start checked and unchecking removes their rows on Apply, Cancel changes nothing, surviving rows keep their order and fields, and new picks are appended. Configured models the provider did not return are listed in their own group so they can be removed too; in Codex, removing the default model's row moves the default to the new first row. The dialog has search, select all / none for the visible models, a selected-only filter and a count, and shows each model's context window, reasoning and image input from the same lookup the parameter fill uses (same-endpoint preset, then models.dev by endpoint, then the vendor's entry), so picks are filled without the "parameters filled, please check" toast. The "fetched N models" toast is dropped where the dialog opens. +- **Codex Sub-agent Model and Reasoning Effort**: The Codex provider form gains a sub-agent model field and a reasoning effort picker, written to `[agents] default_subagent_model` and `default_subagent_reasoning_effort`. Clearing a value removes the key and an emptied `[agents]` table goes with it; switching providers swaps both keys and leaves the rest of `[agents]` alone. In Aggregation mode the keys are not written, since the row names the default provider's model and would send sub-agents of a main agent on another provider back to the default one. A model outside the provider's model list is flagged with an offer to add it. Hidden for Grok Build, official cards and the aggregation layout. +- **New Provider Presets**: SoruxGPT, IKunCode, RunToken, BotCF, YYLX and TokenFlux (Claude Code, Claude Desktop, Codex, OpenCode, OpenClaw, Hermes, Pi, Grok Build and, except BotCF, Gemini CLI), plus OpenModel as a sponsor across ten apps. + +### Changed + +- **Codex Model List Comes First and Its First Row Is the Default**: The model list sat collapsed in the advanced options below the default model it feeds. It now follows the connection fields, is named "Model list" as in the Aggregation layout, and its first row is the default model, replacing the separate default model field. Renaming or removing the first row updates the model; an older card whose default sits further down shows that row first without counting as an edit. Cards without a list keep the default model field, since a list row would shrink Codex's built-in `/model` menu to the listed entries; adding the first row to an empty list seeds it with the current default. +- **No More Stars in Aggregation Model Lists**: The star column and "make default" action in the Claude Code and Codex Aggregation model lists are gone; a help tip next to "Model list" says the first row is the default. A Codex direct card whose default model is another row shows that row first in the Aggregation layout for display only. +- **Form Explanations Move into Help Tips**: The Claude Code, Codex and Aggregation forms keep only consequences on the page (restart Codex after changing the model list, a max output above the real limit returns 400, settings that only apply in routing and Aggregation modes); what a field is and when to use it sits behind the "?" after its name. The full URL toggle moves into the advanced options (a provider with it on opens with the section expanded). The legacy provider fields notice is one sentence, and Claude Desktop's model mode hint now simply says to use Direct for native Claude models and Model Mapping for third-party ones such as DeepSeek or Kimi. +- **Form Hints Follow the App's Actual Mode**: The full form now knows whether the app is in direct mode. When the upstream format needs conversion it warns that saving the in-use card breaks requests, or that other cards need routing first; the Claude fallback model explanation describes the main model in direct mode. Wording that no longer matched behavior is fixed, the Codex default model field shows in the aggregation layout when the list is empty, fields the backend ignores on managed-account cards are hidden, and 12 unused codexConfig strings are removed. + +### Fixed + +- **Unmatched Tool Results Broke Codex Threads on Chat Upstreams** (#8136, fixes #7196, #4741): Codex history can carry tool results with no matching tool call, most notably the create_thread receipt the Codex desktop app injects into a new thread (a `function_call_output` whose `call_id` is null). The Responses-to-Chat conversion emitted them as `role=tool`, so strict Chat upstreams such as DeepSeek and OpenCode Zen rejected every request in that thread with HTTP 400. Unmatched `function_call_output` / `custom_tool_call_output` / `tool_search_output` items now become a marked user message, held until the current run of tool results ends so `role=tool` messages stay contiguous; media is sent as image parts rather than base64 text, and reasoning attachment is unchanged. Paired tool outputs convert exactly as before. +- **Call-id-less Tool Outputs Broke Codex Threads on xAI** (refs #7074): Codex Desktop injects `function_call_output` receipts (create_thread, automation_update, heartbeat, cross-thread messages) with only an `fco_` id. xAI's native Responses API rejects the whole request with 422 (missing field `call_id`), and since the receipt stays in history the thread never recovers. The xAI-only compat layer now rewrites these items into user messages with the same marker the Chat bridge uses, keeping text and image parts. Items with a `call_id` and other upstreams are untouched. +- **OpenAI-format Claude Upstreams Received `x-api-key`**: Claude routing picked the auth header from the env var name alone, so a provider with `ANTHROPIC_API_KEY` and an OpenAI Chat or Responses upstream sent `x-api-key`, which those protocols reject. OpenAI formats now always use `Authorization: Bearer`; Anthropic Messages upstreams keep the env var semantics. The form no longer shows the auth field for those formats (Copilot cards keep it). +- **Aggregation Used Only the Default Provider's Compatibility Switches**: Picking another member's model in Claude aggregation could send features that member rejects. Switches of all publishing members are now merged by kind: disabling experimental betas, Artifact or the auto mode server applies when any member asks for it; tool search, always-on effort and fine-grained tool streaming stay on only when every member turns them on. Extra body, thinking and window switches still follow the default provider. +- **UI Language on Cold Start**: The first-screen language came from a localStorage cache of the saved setting. When the cache was empty or stale (dev and release builds use different WebView origins, WebView data was cleared, `~/.cc-switch` was copied to a new machine) the UI showed the system language until a page that loads settings was opened. Settings are now fetched once during bootstrap and the saved language applied. +- **macOS Could Not Reach LAN API Endpoints** (#7213, fixes #7109): `Info.plist` now declares `NSLocalNetworkUsageDescription`, so macOS shows the local network permission prompt. The request that triggers the prompt may still fail; retry after allowing. +- **Flicker When Opening the Provider Editor** (#8145, fixes #8141): The edit panel opened on a loading page before the initial projection arrived. It now waits for the projection, keeping the same fade as the add panel. + +### Docs + +- Flatpak build docs pass `--bundles` to the Tauri CLI instead of Cargo (#8132) and explain skipping updater artifacts without a signing key. + +### Upgrade notes + +- **No database schema change** (still 20). +- New presets only affect newly added providers. + ## [4.0.8] - 2026-10-10 The fourth patch release on the 4.0 stable line. Codex aggregation works for users who only installed the Codex desktop app, and when the official model list is unavailable the notice now says why and clears itself once the list is back. Model fetching in the Claude, Codex, Grok Build and OpenCode forms sends the configured request headers, Settings > Data gains an "Open log" button, and dark-mode text is less glaring. diff --git a/package.json b/package.json index bdaa3ba37..449a1c31a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cc-switch", - "version": "4.0.8", + "version": "4.0.9", "description": "All-in-One Assistant for Claude Code, Codex & Gemini CLI", "type": "module", "scripts": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 5f8f8ea69..89e652dc4 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -758,7 +758,7 @@ dependencies = [ [[package]] name = "cc-switch" -version = "4.0.8" +version = "4.0.9" dependencies = [ "anyhow", "arboard", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 639385762..36a566c88 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cc-switch" -version = "4.0.8" +version = "4.0.9" description = "All-in-One Assistant for Claude Code, Codex & Gemini CLI" authors = ["Jason Young"] license = "MIT" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index cc385d6eb..b1b055f8b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "CC Switch", - "version": "4.0.8", + "version": "4.0.9", "identifier": "com.ccswitch.desktop", "build": { "frontendDist": "../dist",