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

相关推荐
码哥字节13 小时前
我写了 200 行 CLAUDE.md,Claude 全忽略了——Karpathy 只用了四条
ai 编程工具·claude code·agent skills
码哥字节1 天前
一周 30k+ stars 的 Skill 生态,3 个仓库代表 3 种工程师哲学
claude code·agent skills
码哥字节2 天前
我把整个代码库喂给 Claude Code,工具超 50 个就静默丢失,这个坑太阴了
mcp·claude code·ai编程工具
qq_369224337 天前
Windows全系通用!ntdll.dll文件丢失、报错、闪退问题的完整排查与修复教程
windows·dll·dll修复·dll丢失·dll错误
摇滚侠7 天前
IDEA 创建 Java 项目 手动整合 SSM 框架
java·ide·intellij-idea
霸道流氓气质7 天前
Trae IDE 新手入门指南
ide
阿米亚波7 天前
【Windows】QEMU 启动 openEuler aarch64/arm64 架构系统 + 离线软件源
linux·windows·经验分享·笔记·架构·arm
caimouse7 天前
Reactos 第 10 章 网络操作 — 10.3.1 NIC驱动
网络·windows
初圣魔门首席弟子7 天前
Node.js 详细介绍(知识库版)
windows·qt·node.js·知识库
恒云客7 天前
vibe coding实践
claude code