Claude Code cannot be applied in VS Code
Quick fix
Remove old Claude Code proxy settings in VS Code, then toggle Apply to Claude Code plugin in cc-switch again.
Symptom
Section titled “Symptom”无法应用于claude code for VS CodeCannot be applied to claude code for VS Code
When using the Claude Code plugin in VS Code, leftover proxy or relay settings for other models, such as Zhipu GLM, in VS Code settings.json can override the cc-switch proxy settings and prevent the plugin from using the cc-switch reverse proxy. Some users also see upstream_error when using Antigravity Manager, usually because cc-switch still contains a specified model field or Antigravity itself is misconfigured.
Remove the old proxy settings for claude code for vscode in VS Code, or uninstall and reinstall the plugin.
In cc-switch, turn off Apply to claude code plugin, then turn it on again to refresh the configuration.
Check or create the Claude configuration file and ensure primaryApiKey is set correctly.
// C:\Users\你的用户名\.claude\config.json{"primaryApiKey": "crs"}If requests return upstream_error, remove the specified model field from the cc-switch configuration and check the Antigravity Manager configuration.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- Why does it work in Windows Terminal but not in VS Code?
- Windows Terminal reads the cc-switch proxy settings directly, while the VS Code plugin may read old proxy settings left in its own settings.json, such as a Zhipu GLM relay setting, causing cc-switch to be ignored.
- What should I do if upstream_error keeps occurring after configuring Antigravity Manager?
- Try removing the specified model field from the cc-switch configuration. If the problem remains, check the Antigravity Manager configuration. You can first configure gemini-cli to test whether the link works.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.