首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在WorkBuddy中配置DeepSeek V4模型后调用报400错误(reasoning_content未正确回传),如何解决?

在WorkBuddy中配置DeepSeek V4模型后调用报400错误(reasoning_content未正确回传),如何解决?

提问于 2026-04-25 00:31:59
回答 1关注 3查看 446

问题描述:

DeepSeek 于 2026年4月24日发布了 V4 系列模型(deepseek-v4-pro / deepseek-v4-flash)。在 WorkBuddy 自定义模型配置中添加 V4 模型后,调用时报以下错误:

代码语言:javascript
复制
Error Code: 400
Message: The `reasoning_content` in the thinking mode must be passed back to the API.

原因分析:

DeepSeek V4 默认开启思考模式(thinking mode),API 返回中会包含 reasoning_content 字段。根据 DeepSeek 官方文档(https://api-docs.deepseek.com/zh-cn/guides/thinking_mode):

  1. 当模型进行**工具调用(tool_calls)**时,reasoning_content 必须在后续所有轮次中完整回传给 API
  2. 未正确回传会导致 400 错误

WorkBuddy 在处理 DeepSeek 供应商的 tool call 时,似乎没有正确保存和回传 reasoning_content 字段,导致后续请求缺少该字段。

复现步骤:

  1. 在 models.json 中添加 deepseek-v4-pro 或 deepseek-v4-flash(vendor: DeepSeek)
  2. 在 WorkBuddy 中选择该模型发起对话
  3. 触发工具调用(如搜索、文件操作等)
  4. 第二轮请求即报 400 错误

环境信息:

  • WorkBuddy 最新版本
  • Windows 11
  • DeepSeek V4 API(2026-04-24 发布)

临时解决方案:

  • supportsReasoning 设为 false 无法绕过(客户端可能硬编码了思考模式处理)
  • 旧模型 deepseek-chat / deepseek-reasoner 暂时正常(但将于 2026-07-24 下线)

期望: 希望 WorkBuddy 尽快适配 DeepSeek V4 的 reasoning_content 回传逻辑,否则 7 月旧模型下线后将无法使用 DeepSeek。

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档