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

相关推荐
2601_961194021 小时前
化学教资科三真题答案
linux·windows·ubuntu·pdf·centos·gnu
码哥字节2 小时前
筛完 1400+ Skills,这 5 个让 Claude Code 效率提升 3 倍
claude code·agent-browser·superpowers
Fly feng2 小时前
windows pnp/power status Manager(设备 电源状态介绍)
windows·pnp/power
元Y亨H2 小时前
Windows蓝屏错误0x00000124 (硬件错误) 完整排查笔记
windows
曲幽2 小时前
你的FastAPI又在服务器上“跑不起来”了?来,今天咱把打包这件事彻底聊透
linux·windows·python·docker·fastapi·web·pyinstaller·nssm·services
_可乐无糖3 小时前
踩完坑之后的总结:Windows安装docker
运维·windows·docker·容器
玖釉-3 小时前
Vulkan 示例解析:pipelines.cpp 如何在一个 Render Pass 中切换多条 Graphics Pipeline
c++·windows·算法·图形渲染
chushiyunen3 小时前
localwp+wordpress个人建站
windows
Irene19914 小时前
在 VSCode WSL 中安装 Docker 插件(Docker 插件连接 WSL)
vscode·docker