Windows vscode Claude Code + DeepSeek V4

安装claude code

bat 复制代码
npm install -g @anthropic-ai/claude-code

added 2 packages in 39s
npm notice
npm notice New major version of npm available! 10.9.4 -> 11.16.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.16.0
npm notice To update run: npm install -g npm@11.16.0
npm notice

查看claude 是否安装成功

bat 复制代码
claude
Welcome to Claude Code v2.1.161
..........................................................

     *                                       █████▓▓░
                                 *         ███▓░     ░░
            ░░░░░░                        ███▓░
    ░░░   ░░░░░░░░░░                      ███▓░
   ░░░░░░░░░░░░░░░░░░░    *                ██▓░░      ▓
                                             ░▓▓███▓▓░
 *                                 ░░░░
                                 ░░░░░░░░
                               ░░░░░░░░░░░░░░░░
       █████████                                        *
      ██▄█████▄██                        *
       █████████      *
.......█ █   █ █..........................................

 Unable to connect to Anthropic services

 Failed to connect to api.anthropic.com: ERR_BAD_REQUEST

 Please check your internet connection and network settings.

 Note: Claude Code might not be available in your country. Check supported countries at
 https://anthropic.com/supported-countries

第一步安装已经成功

powershell中配置使用claude code

bat 复制代码
10_UserManual> $env:ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"
10_UserManual> $env:ANTHROPIC_AUTH_TOKEN="你的DeepSeek_API_Key"
10_UserManual> $env:ANTHROPIC_MODEL="deepseek-v4-pro"
10_UserManual> $env:ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-v4-pro"
10_UserManual> $env:ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-v4-pro"
10_UserManual> $env:ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4-flash"
10_UserManual> $env:CLAUDE_CODE_SUBAGENT_MODEL="deepseek-v4-flash"

再次运行claude code

bat 复制代码
Welcome to Claude Code v2.1.161
..........................................................

     *                                       █████▓▓░
                                 *         ███▓░     ░░
            ░░░░░░                        ███▓░
    ░░░   ░░░░░░░░░░                      ███▓░
   ░░░░░░░░░░░░░░░░░░░    *                ██▓░░      ▓
                                             ░▓▓███▓▓░
 *                                 ░░░░
                                 ░░░░░░░░
                               ░░░░░░░░░░░░░░░░
       █████████                                        *
      ██▄█████▄██                        *
       █████████      *
.......█ █   █ █..........................................

 Let's get started.

 Choose the text style that looks best with your terminal
 To change this later, run /theme

   1. Auto (match terminal)
 ❯ 2. Dark mode ✔
   3. Light mode
   4. Dark mode (colorblind-friendly)
   5. Light mode (colorblind-friendly)
   6. Dark mode (ANSI colors only)
   7. Light mode (ANSI colors only)

 ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
  1  function greet() {
  2 -  console.log("Hello, World!");
  2 +  console.log("Hello, Claude!");
  3  }
bat 复制代码
Welcome to Claude Code v2.1.161
..........................................................

     *                                       █████▓▓░
                                 *         ███▓░     ░░
            ░░░░░░                        ███▓░
    ░░░   ░░░░░░░░░░                      ███▓░
   ░░░░░░░░░░░░░░░░░░░    *                ██▓░░      ▓
                                             ░▓▓███▓▓░
 *                                 ░░░░
                                 ░░░░░░░░
                               ░░░░░░░░░░░░░░░░
       █████████                                        *
      ██▄█████▄██                        *
       █████████      *
.......█ █   █ █..........................................

 Security notes:

 1. Claude can make mistakes.
    You're responsible for Claude's actions and should always
    review them, especially when running code.

 2. Due to prompt injection risks, only use it with code you trust
    Learn more: https://code.claude.com/docs/en/security

 Press Enter to continue...
bat 复制代码
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 Accessing workspace:

 Y:\10_UserManual

 Quick safety check: Is this a project you created or one you trust? (Like your own code, a well-known open source project, or work from your team). If not, take a moment to review what's in this folder first.

 Claude Code'll be able to read, edit, and execute files here.

 Security guide

 ❯ 1. Yes, I trust this folder
   2. No, exit

 Enter to confirm · Esc to cancel

测试是否与大模型连接成功

bat 复制代码
╭─── Claude Code v2.1.161 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                         │ Tips for getting started                                                                                                                                 │
│              Welcome back!              │ Run /init to create a CLAUDE.md file with instructions for Claude                                                                                        │
│                                         │ ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │
│                 ▐▛███▜▌                 │ What's new                                                                                                                                               │
│                ▝▜█████▛▘                │ `OTEL_RESOURCE_ATTRIBUTES` values are now included as labels on metric datapoints, so you can slice usage metrics by custom dimensions like team or repo │
│                  ▘▘ ▝▝                  │ `claude agents` rows now show `done/total` before the detail when work is fanned out; peek shows the longest-running item                                │
│                                         │ `/mcp` now collapses claude.ai connectors you've never signed in to behind a "Show unused connectors" row                                                │
│   deepseek-v4-pro · API Usage Billing   │ /release-notes for more                                                                                                                                  │
│    Y:\01_项目文档\广核\10_UserManual    │                                                                                                                                                          │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

   Opus 4.8 is now available! · /model to switch

❯ hello, 你是deepseek吗?

  Thought for 1s (ctrl+o to expand)

● 你好!不是的,我是 Claude Code,由 Anthropic 开发的 AI 编程助手。虽然当前会话的运行模型是 deepseek-v4-pro,但我本身是 Claude------Anthropic 的官方 CLI 工具。

  简单来说:
  - Claude Code 是工具/框架(由 Anthropic 构建)
  - deepseek-v4-pro 是本次会话底层使用的模型

  有什么我可以帮你的吗?

✻ Cooked for 3s

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ 
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ? for shortcuts · ← for agents

vscode 中配置claude code

下载Claude Code for VS Code

这里先不管,不用登录

打开vscode配置

json 复制代码
{
            "name": "ANTHROPIC_BASE_URL",
            "value": "https://api.deepseek.com/anthropic"
        },
        {
            "name": "ANTHROPIC_AUTH_TOKEN",
            "value": "你的DeepSeek Key"
        },
        {
            "name": "ANTHROPIC_API_KEY",
            "value": "sk-128ffba23fda40198b33b5d75bf60d01"
        },
        {
            "name": "ANTHROPIC_MODEL",
            "value": "deepseek-v4-pro"
        },
        {
            "name": "CLAUDE_CODE_SUBAGENT_MODEL",
            "value": "deepseek-v4-flash"
        }

重启vscode

相关推荐
XUHUOJUN17 小时前
Windows 2025架构深度分析之Stretch Cluster 延迟工程现实
windows·microsoft·架构·azure local
love530love18 小时前
将 ChatCut MCP 插件从 Codex 桌面应用移植到 WorkBuddy —— 完整适配实录
ide·人工智能·windows·视频剪辑·ai agent
works cart19 小时前
windows常用命令
windows
浩浩测试一下20 小时前
windows 加壳工具代码实现02 - 加壳界面实现MFC
windows·mfc·免杀·加壳器·pe应用
老谷子.AI原始技术20 小时前
《Claude Code 工程化实战》第 21 讲 Headless 模式与 CI/CD 集成
ci/cd·claude code
小李不困还能学21 小时前
PyCharm下载安装与配置教程
ide·python·pycharm
知福致福1 天前
vscode连接远程服务器登录codex插件一直卡在gpt图标页,不跳转浏览器登录
服务器·vscode·gpt
A小调的码农1 天前
OPENOCD+MSYS+VSCODE:从“灯不亮“到“终于亮了“
ide·vscode·stm32·单片机·编辑器
AI的探索之旅1 天前
让 Claude Code 直接操刀画原理图和 PCB:VSCode 插件接外部 API 全流程
linux·ide·vscode·嵌入式硬件·编辑器
崖边看雾1 天前
记录Python学习——第一章环境安装下载(Windows)
windows·python·学习·pycharm