Skip to content

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io

13.2 KB
Raw Blame

CC Switch v4.0.46

This release adds Routing, failover and Aggregation modes to Antigravity: as with Claude Code and Codex, requests can be forwarded through local routing with usage recorded, the next provider takes over automatically when one fails, and the models of several providers can go into one agy model list. Antigravity's Routing and Aggregation modes don't yet convert to and from the OpenAI Responses and Anthropic Messages formats; that will come later. Antigravity models can now have a display name, context window, output limit and reasoning levels, and in Routing you switch the thinking effort right in agy's model menu. The Global Proxy in Settings now covers every program CC Switch starts: opening a terminal, installing and upgrading tools, MCP connectivity checks and login terminals all use it.

Fixes include: the cache hit rate dropping to zero when Claude Code uses Gemini models through an OpenAI-compatible relay, Claude Code dropping thinking blocks after model mapping, Codex compacting the context early with an explicit model list, a terminal popping up when Antigravity quota is checked in the background on Windows, Antigravity official cards not showing quota by default, Claude Code requests with long attachments losing their latency and first-token time, WorkBuddy "Fetch Models" dropping image models, and several problems when adding Antigravity accounts.

⚠️ Antigravity's Direct mode doesn't support reasoning levels for third-party models yet: in Direct mode agy doesn't send a thinking effort to gateway models, so the level you pick has no effect. To set reasoning levels for models from third-party platforms (such as Gemini models through a relay), turn on Routing or Aggregation mode.


New

Antigravity Routing mode

The "Routing" tab at the top of the app page now supports Antigravity too. Once you enter Routing, CC Switch points the gateway in ~/.gemini/config/config.json at local routing, and CC Switch forwards agy's requests to the routed provider:

  • Switching providers doesn't change the file: with the Gemini native (genai) protocol, routing answers the model list itself, so switching between providers of the same protocol only changes the route and leaves config.json alone; the next request goes to the new provider. With the OpenAI-compatible protocol the model list is still written.
  • Which cards can be routed: official cards can't be the route (per the user agreement); cards without an API Key and cards with a CA certificate can only connect directly as well.
  • Usage: Gemini native requests have their usage recorded by routing, as the same row the session log import produces, so nothing is counted twice; OpenAI-compatible requests are still imported from the session logs.
  • Antigravity Desktop reads the model list only at startup, so after entering or leaving Routing or changing models, restart the desktop app to see the change.

Antigravity failover

In Routing mode you can turn on failover and queue providers, as with Claude Code and Codex: when the routed provider fails, requests go to the next one in the queue automatically. A gateway can use only one protocol, so only cards that speak the routed provider's protocol and can serve as the route can join the queue; if the route later moves to the other protocol, members on a different protocol are marked "Other protocol" and skipped during failover.

Antigravity Aggregation mode

The "Aggregation" tab at the top of the app page now supports Antigravity too: other providers' models appear in agy's model picker with a ccs- prefix, and whichever model you pick, the request goes to that provider, with no need to go back to CC Switch and switch. Only cards that speak the default provider's protocol and can serve as the route are accepted; when the default provider moves to the other protocol, members on the old protocol stay in the list, but their models aren't published for now.

Antigravity model options

Each model in the Antigravity form can expand "More options" to set a display name, context window, max output and reasoning levels. When you pick a model from the list or type a model ID, the context window, output limit and reasoning levels are filled in from models.dev.

  • Why set the context window: agy only knows the context windows of the Gemini, GPT and Claude families; other models (such as DeepSeek, Kimi or Qwen) fail on the first turn without one, and with only a context window set the output limit is just 4096 tokens. Saving checks for what agy rejects: a model it does not recognize without a context window, an output limit without a context window, or a context window smaller than twice the output limit.
  • Reasoning levels: agy can't change a gateway model's thinking effort while it's running, so in Routing and Aggregation modes the model is published as one variant per level you pick, such as deepseek-flash@max, shown as "DeepSeek Flash (Max)". When routing receives the request, it strips @max and rewrites it to the matching thinking effort before forwarding. Antigravity Desktop merges a model's levels into one row and switches between them in a "Thinking effort" submenu. A model with levels picked is published only as its variants, and the default model points at the default level picked on the first row.
  • The form can also edit the gateway's custom request headers.

The tray follows the Apps page order

After you reorder apps on the "Apps" page, the tray menu and quick panel show them in the same order.

THB in usage statistics

(#9966, closes #9958)

Thai baht (THB) is now available as a display currency.


Changes

The Global Proxy covers all subprocesses

(see #10119)

The Global Proxy in Settings used to apply only to CC Switch's own requests. Command-line tools in a terminal only read environment variables such as HTTPS_PROXY, not the system proxy, so they went direct when the user's shell didn't set one, and agy couldn't reach Google without TUN mode. The Global Proxy is now passed to every program CC Switch starts:

  • Open Terminal: when you open a terminal from a card or resume a session in a terminal, the client gets the Global Proxy. agy also gets SOCKS5 proxies; other clients get only HTTP(S) proxies and skip local addresses, so local routing still connects directly. When a card configures its own proxy, the card wins; a proxy you set yourself in your shell config file also takes precedence. When the proxy address carries a user name and password, resumed sessions don't get the proxy, because the command is shown in the terminal.
  • Installing and upgrading tools: install and upgrade scripts on the "Apps" page get the proxy, so both npm and the official install scripts use it.
  • MCP connectivity checks: locally started MCP servers get the proxy (npx and uvx download on first run) unless their own environment variables set one; HTTP / SSE checks now use the Global Proxy, and local addresses still connect directly.
  • Login terminals: the CodeBuddy login and Hermes dashboard terminals get the proxy too.

Per-model Fast and Lite for Codex

(#10039, see #9695)

Each model in the Codex model list can now set Fast and Lite on its own; both are off by default:

  • Fast: when on, this model can use the Fast speed tier in Codex, including in Aggregation mode. The card's old "Keep official Fast tier" switch is gone; cards that had it on turn Fast on for their GPT models the next time you open the form.
  • Lite: when on, Codex requests this model in the Responses Lite format, and usage is counted as including past reasoning, so the context is no longer compacted early, before it's full, because past reasoning was estimated twice. Only relays that forward to official ChatGPT accounts accept this format.

The settings are kept when the model catalog is regenerated.

Antigravity cards show the endpoint

Antigravity Key cards no longer show the gateway's default model in the subtitle; like Claude Code and Codex, they show the note, website or endpoint. Official cards bound to an account show only the account.

Signing in to Antigravity through the desktop app when the CLI isn't installed

(#10122, #10127)

When you click "Add account" in "Accounts" and Antigravity Desktop is installed but agy isn't, the desktop app opens so you can sign in there, and CC Switch doesn't clear or change the current login; a login already in the keychain that hasn't been added yet is added directly. On Windows only agy.exe is recognized, and it is started directly in the preferred terminal instead of through a temporary .bat; it also starts when the user directory contains characters such as &, ( or ).


Fixes

  • The cache hit rate dropped to zero when Claude Code used Gemini models through an OpenAI-compatible relay (#10125, see #10090): Claude Code inserts system messages mid-conversation, and the relay moved them all into Gemini's system instruction, rewriting the start of the prompt every turn. When sending to Gemini models, mid-conversation system messages are now sent as user messages, in both the OpenAI Chat and Responses formats.
  • Claude Code dropped thinking blocks after model mapping (#10108, see #5578): when the upstream returned the mapped model name, Claude Code dropped earlier signed thinking blocks. The model name in responses is now changed back to the one the client requested; requests sent upstream are unchanged, and usage is still recorded with the real upstream model.
  • A terminal popped up when Antigravity quota was checked in the background on Windows (#10124, closes #10123)
  • Antigravity official cards didn't show quota by default: after the tray moved to listing provider cards in 4.0.45, official cards with no saved usage settings (including the one imported on first launch) showed no quota in the tray or on the card. Official quota is now queried by default: bound cards query their account, and unbound cards follow agy's current login; cards where you turned it off still aren't queried.
  • Claude Code requests with long attachments lost their latency and first-token time (#10149, closes #9954): when a lot of attachment data was written between a request and its reply, usage imported from session logs had no latency or first-token time. When the request start cannot be found, CC Switch now reads further back once and looks again.
  • WorkBuddy "Fetch Models" dropped image models (see #10129): since 4.0.44, "Fetch Models" filters out image, video and other non-chat models, so a relay's image models (such as gpt-image) could no longer be picked in WorkBuddy. WorkBuddy no longer filters them; other apps are unchanged.
  • Several problems when adding Antigravity accounts (#10102, closes #10099): on macOS and Linux, the wait ends as soon as agy exits in the terminal, and the original login is restored (Windows still waits until sign-in or timeout); the login terminal gets the Global Proxy on all platforms; Ghostty is brought to the front when it's already open; agy is found even when PATH is set only in shell config files; and the metadata agy 1.5 leaves after /logout is no longer taken as signed in.
  • Resuming Oh My Pi sessions in Warp failed: Warp's launch script now uses exec env.

Thanks

Thanks to @allenxu09 (Gemini relay caching, response model name, CI speed-up), @fightingnoble (per-model Fast and Lite for Codex), @codexvn (response model name), @jimpablo (Antigravity login terminal), @funkpopo (Antigravity Desktop sign-in), @z570093689 (no terminal for background quota checks on Windows), @awakenginexe (THB), @YUZHEthefool (CI speed-up), @The-Minion-oOo (timing for requests with long attachments) for their contributions.

Thanks to @niruiqing, @kingys1992, @Leafseaquiet, @ref4rain, @NovumOrbis, @PHOENIX-collab-bot for issue reports and reproduction details.

For the full technical details, see the CHANGELOG.