How to Connect Claude Code to SiliconFlow in VSCode: Switch Between DeepSeek-V4-Flash and GLM-5.1 at Low Cost

This guide explains how to route Claude Code to SiliconFlow with CC Switch, so you can use models like DeepSeek-V4-Flash, GLM-5.1, and Kimi in VSCode at lower cost. It addresses the high barrier of official subscriptions and the friction of switching models. Keywords: Claude Code, CC Switch, SiliconFlow.

The technical specification snapshot outlines the stack at a glance

Parameter Details
Core language Node.js 18+, JavaScript
Integration protocol Anthropic-style API forwarded through a local proxy
IDE environment VSCode 1.98.0+
Core tools Claude Code CLI, Claude Code extension, CC Switch
Model provider SiliconFlow
Available models DeepSeek-V4-Flash, GLM-5.1, Kimi-K2.5, Qwen3-8B
Deployment method Local proxy routing with no changes to project code
Core dependencies Homebrew or shell install script, API Key
Open-source project CC Switch (distributed via GitHub Releases)

This setup reduces official subscription costs and improves model-switching efficiency

Claude Code excels at understanding project context, editing code through diffs, generating tests, and explaining complex logic. However, its official subscription is not ideal for every developer, especially those who only want to validate a workflow.

CC Switch adds value by redirecting Claude Code requests to third-party model platforms. You still interact with Claude Code in VSCode the same way you always have, but the underlying model can be switched to DeepSeek, GLM, or Kimi through SiliconFlow.

You should verify CLI and editor versions before preparing the environment

Before you begin, prepare at least four items: VSCode 1.98.0+, Node.js 18+, Claude Code CLI, and a SiliconFlow account. Claude Code CLI is currently recommended for native installation, and the npm-based method is no longer preferred.

# macOS: install Claude Code through Homebrew
brew install --cask claude-code

# Universal method: install script for Windows / Linux / macOS
curl -fsSL https://claude.ai/install.sh | bash

# Verify that the installation succeeded
claude

These commands install Claude Code CLI and verify that it is available.

SiliconFlow provides a unified API key and multi-model access

After registering for SiliconFlow, complete identity verification first. The original article notes that new users usually receive trial credits, which makes the platform especially suitable for low-cost technical validation.

Then create an API key in the console. This key is not bound to a single model. Instead, it can access every model supported by the platform, so you do not need to request a new key when switching between DeepSeek-V4-Flash, GLM-5.1, or Kimi-K2.5.

You should choose available models based on context length and coding ability

Model Model ID Best for
DeepSeek-V4-Flash deepseek-ai/DeepSeek-V4-Flash Large context windows, general coding, and reasoning
GLM-5.1 Pro/zai-org/GLM-5.1 Coding tasks, code understanding, and completion
Kimi-K2.5 Pro/moonshotai/Kimi-K2.5 Long-document analysis and ultra-long context
Qwen3-8B Qwen/Qwen3-8B Lightweight testing and long-term low-cost usage
API endpoint: https://api.siliconflow.cn
Authentication: Bearer API Key
Model switching: update the model field only

This shows that SiliconFlow is fundamentally a unified model gateway rather than a single-model service.

CC Switch is the key layer that connects Claude Code and SiliconFlow

CC Switch handles local proxying, provider management, and model switching. Its main advantage is not that it replaces Claude Code, but that it reuses the Claude Code workflow.

Installation differs by platform: Windows uses .msi, macOS supports Homebrew, and Linux supports .deb, Arch packages, or AppImage. After installation, make sure the top application switcher is set to Claude.

You only need to fill in three key fields when configuring the provider

When you add a new provider in CC Switch and choose the SiliconFlow preset, the API endpoint is usually filled in automatically. Focus on confirming the API key, the primary model, and the enabled status.

# macOS: install CC Switch
brew tap farion1231/ccswitch && brew install --cask cc-switch

# Debian/Ubuntu installation example
sudo dpkg -i cc-switch_*.deb

This step installs CC Switch itself and does not invoke any model.

The recommended configuration flow is as follows:

  1. Open CC Switch and switch to Claude.
  2. Click + in the upper-right corner to add a provider.
  3. Select the SiliconFlow preset.
  4. Paste your API key.
  5. Change the default model to your target model, such as deepseek-ai/DeepSeek-V4-Flash.
  6. Click the one-click setup option and save.
  7. Click Enable on the provider card.

Successful VSCode integration depends on the local proxy staying online

Many integration failures are not caused by an extension installation problem. Instead, CC Switch is often not running in the background. Although the Claude Code extension is installed in VSCode, its ability to call a third-party model depends entirely on whether the local proxy successfully intercepts and forwards requests.

So after installing the VSCode extension, do not immediately suspect the configuration file. First check whether the SiliconFlow provider card in CC Switch is enabled.

You can complete extension installation and connectivity checks directly from the command line

# Install the Claude Code VSCode extension
code --install-extension anthropic.claude-code

# Start the CLI and test the currently connected model
claude
# After entering interactive mode, type: Please describe the model and capabilities you are using

These commands verify that both the VSCode extension and the CLI are connected through the same routing chain.

A code refactoring scenario shows the practical value of this setup directly

The original example demonstrates a traditional JavaScript function: it first loops through users to filter those older than 18, then uses nested loops to sort them by name. That implementation is moderately readable, but the sorting logic is verbose.

After selecting the code in VSCode and sending a refactoring request to Claude Code, the model can use project context to produce a more modern ES6+ version and present the proposed changes as a diff. This is one reason Claude Code is more suitable for engineering workflows than a plain chat tool.

// Filter adult users from the array and sort them by name in ascending order
const getUsers = (users) =>
  users
    .filter(({ age }) => age > 18) // First filter users older than 18
    .sort(({ name: a }, { name: b }) => a.localeCompare(b)); // Then sort by name

This code replaces nested loops with a declarative chained style, improving readability and maintainability.

The image in the original page serves primarily as decorative site content rather than a technical screenshot

AI Visual Insight: This image appears to be a community entry point or promotional banner. It does not show a configuration screen, execution result, or network topology, so it does not carry critical technical information and can be ignored during technical reading.

This integration method is better for low-cost validation than for fully replacing the official service

Its strengths are fast setup, broad model coverage, and low switching cost. It is especially useful when you want to evaluate how different Chinese-language models perform on code explanation, refactoring, completion, and long-document analysis.

That said, you should also recognize its limits: third-party platforms may respond more slowly during peak usage, and model behavior will differ from official Claude models. If your team depends heavily on native Anthropic capabilities or a stable SLA, this setup works better as a supplemental path than as a full replacement.

FAQ

Q1: How long do trial credits usually last?

A: According to the source material, new SiliconFlow users often receive some trial credits. For everyday code Q&A, refactoring, and explanation tasks, they can often support several weeks of testing, depending on request frequency and context length.

Q2: Why can’t I call the model even though the extension is installed?

A: The most common cause is not the VSCode extension itself. Usually, CC Switch is not running or the SiliconFlow provider is not enabled. Check the local proxy status first, then verify that the API key and model name are correct.

Q3: Does CC Switch only support Claude Code?

A: No. The original material indicates that it can also manage Codex, Gemini CLI, OpenCode, OpenClaw, and other AI coding tools, making it suitable as a unified routing and multi-model switching layer.

Core summary

This article reconstructs the complete workflow for connecting Claude Code to SiliconFlow through CC Switch, covering environment setup, API key configuration, VSCode integration, model switching, and a code refactoring example. It helps developers use models such as DeepSeek-V4-Flash, GLM-5.1, and Kimi at lower cost.