ZCode 报错信息 报错摘要 Provider rejected the model request. TraceID: 2723c799-91d1-404c...

2026年07月21日 11:53 24.29 秒 success

错误信息

ZCode 报错信息 报错摘要 Provider rejected the model request. TraceID: 2723c799-91d1-404c-84fd-f7e1947afb0b 报错详情 Turn execution failed provider=fdb45189-e7a1-4f6b-ad37-f8a8ffa03cf2 model=deepseek-v4-pro request=ceb50103-e9de-4e44-a8f8-4eb8a1ab8a07 reason=invalid_request status=400 retryable=false status_code=400, The `reasoning_content` in the thinking mode must be passed back to the API. (request id: 202607210350163470149538268d9d6Z2XNBP17) (request id: 20260721035012325708946c14228f5mbXiJcMO)

AI 解决方案

🔍 错误分析

1. 🌐 错误翻译


原文:The `reasoning_content` in the thinking mode must be passed back to the API. (request id: 202607210350163470149538268d9d6Z2XNBP17) (request id: 20260721035012325708946c14228f5mbXiJcMO)
译文:在思考模式下,`reasoning_content`(推理内容)必须传回给 API。

2. 🎯 原因分析


  • 根本原因:调用 deepseek-v4-pro 模型时启用了思考模式(thinking mode),但没有按要求将 reasoning_content 字段传回给 API。

  • 错误位置:API 请求参数验证阶段,缺少或未正确配置 reasoning_content 相关参数。

  • 上下文:当使用支持思考/推理能力的模型时,API 要求客户端必须显式处理推理内容,而非仅接收最终回答。
  • 3. 💡 解决方案


    确保在请求中正确传递 reasoning_content 参数,具体需根据 API 文档确认参数结构。以常见请求格式为例,参考以下修复后的代码:

    ``代码语言
    // 示例:添加 reasoning_content 相关参数(具体参数名以API文档为准)
    {
    "model": "deepseek-v4-pro",
    "messages": [
    {
    "role": "user",
    "content": "你的提问内容"
    }
    ],
    "enable_thinking": true, // 启用思考模式
    "reasoning_content": "请传入推理过程内容,或设置为true由模型自动生成并回传" // 按需传递推理内容
    }
    `

    > 注:若 API 要求 reasoning_content 为模型自动生成的字段,无需手动赋值,需确保请求中包含该参数声明(如设为 true),而非直接省略该字段。请严格参照 ZCode 平台对 deepseek-v4-pro 模型的参数文档调整字段名称和格式。

    4. 🛡️ 预防措施


  • 参数校验:调用支持思考/推理能力的模型前,仔细核对 API 文档中关于 reasoning_content` 等必选参数的要求,确保请求参数完整且格式正确。

  • 工具辅助:使用 Postman 等 API 调试工具,逐字段验证请求参数,避免遗漏必填项;也可通过平台提供的参数校验接口提前检测参数合法性。