【Claude】Win11系统VSCode环境中Claude+Deepseek报错的全自动解决方式

一、灵子

2026-05-29报错完整信息:

API Error: 400 Failed to deserialize the JSON body into the target type: messages1.role: unknown variant `system`, expected `user` or `assistant` at line 1 column 560

因为要解决这个报错我查了很多国内外的帖子,但大多数都是提问求助的没有多少给出solution的,给出solution的我也看不懂(bushi),内耗了好久之后终于想到了另一个办法,用终端接opencode或者codex,让他们操作电脑帮我解决问题不就好了。

所以这里以opencode的加载和配置为例记录一下,如果各位有报错没配置明白的就直接让opencode/codex全自动帮忙吧。

二、配置

2.1、部署opencode

opencode官网:Go | OpenCode

win11系统下安装只需要一行代码,在管理员模式的powershell下,运行:

bash 复制代码
npm install -g opencode-ai

其他系统或同系统其他的安装方式,进官网简介查看即可:

配置好以后重启管理员模式下的powershell,输入opencode并回车:

2.2、连接订阅的API

在opencode对话框中输入/connect回车。

在光标search里输入deepseek:

回车输入你的Deepseek-v4-pro的API-Key,输入完回车:

选deepseek-v4-pro:

就可以运行opencode了,之后你就像使用Claude一样使用它帮你解决问题就行了。

相关推荐
用户5191495848454 小时前
HP Sound Research SECOMNService 权限提升漏洞利用工具
人工智能·aigc
newbe365248 小时前
对接 Reasonix 1.x 跑通 DeepSeek V4:ACP 模型选择器接入实战
gpt·claude·chatglm (智谱)
Awu12271 天前
⚡从零开发 Agent CLI(二):CLI 框架搭建与子命令路由
人工智能·aigc
Awu12271 天前
⚡从零开发 Agent CLI(三):终端样式改造——从 console.log 到交互式 Ink UI
aigc·ai编程
草帽lufei1 天前
下班后把活交给AI,定时器让它晚上继续干活
aigc·ai编程
阿祖zu1 天前
别再优化 RAG 了,适配 Agent 的 LLM Wiki 知识库理念
前端·后端·aigc
墨风如雪1 天前
AI 火了,人人都想开源,GitHub 没你想的那么复杂
aigc
保持清醒的坐标系1 天前
3份配置喂给7个AI编程助手,直接抄
claude
leeyi1 天前
Document 组件:把文件喂给 AI 之前,必须先做这三步
aigc·agent·ai编程
newbe365241 天前
如何使用 Upptime 免费搭建自己的状态站点
gpt·claude·chatglm (智谱)