openclaw - 💡(How to fix) Fix [Bug]: [Bug] DeepSeek V4/Reasoner 模型在多轮对话切换或 Telegram 环境下报错 400: reasoning_content missing [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#71372Fetched 2026-04-26 05:13:27
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
cross-referenced ×2closed ×1commented ×1labeled ×1

错误提示: [agent/embedded] embedded run agent end: runId=8bea32c4-e762-469c-b09a-23a0b2d9703d isError=true model=deepseek-v4-pro provider=deepseek error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 The reasoning_content in the thinking mode must be passed back to the API.

在使用 DeepSeek 具备思考能力的模型(如 deepseek-v4-pro)时,API 严格要求历史对话记录中必须包含并回传 reasoning_content。 目前的现象是: 模型切换故障:在不执行 /new 的情况下,从其他模型切换到 DeepSeek V4,由于之前的上下文缺少 reasoning_content 字段,导致 API 报错:The reasoning_content in the thinking mode must be passed back to the API. Telegram 适配层丢字段:在 Telegram 连续对话中,OpenClaw 似乎没有正确持久化或回传 Assistant 角色的 reasoning_content 字段。

Error Message

[agent/embedded] embedded run agent end: runId=8bea32c4-e762-469c-b09a-23a0b2d9703d isError=true model=deepseek-v4-pro provider=deepseek error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 The reasoning_content in the thinking mode must be passed back to the API. [agent/embedded] embedded run agent end: runId=8bea32c4-e762-469c-b09a-23a0b2d9703d isError=true model=deepseek-v4-pro provider=deepseek error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 The reasoning_content in the thinking mode must be passed back to the API. [agent/embedded] embedded run agent end: runId=8bea32c4-e762-469c-b09a-23a0b2d9703d isError=true model=deepseek-v4-pro provider=deepseek error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 The reasoning_content in the thinking mode must be passed back to the API.

Root Cause

错误提示: [agent/embedded] embedded run agent end: runId=8bea32c4-e762-469c-b09a-23a0b2d9703d isError=true model=deepseek-v4-pro provider=deepseek error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 The reasoning_content in the thinking mode must be passed back to the API.

在使用 DeepSeek 具备思考能力的模型(如 deepseek-v4-pro)时,API 严格要求历史对话记录中必须包含并回传 reasoning_content。 目前的现象是: 模型切换故障:在不执行 /new 的情况下,从其他模型切换到 DeepSeek V4,由于之前的上下文缺少 reasoning_content 字段,导致 API 报错:The reasoning_content in the thinking mode must be passed back to the API. Telegram 适配层丢字段:在 Telegram 连续对话中,OpenClaw 似乎没有正确持久化或回传 Assistant 角色的 reasoning_content 字段。

Code Example

[agent/embedded] embedded run agent end: runId=8bea32c4-e762-469c-b09a-23a0b2d9703d isError=true model=deepseek-v4-pro provider=deepseek error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 The `reasoning_content` in the thinking mode must be passed back to the API.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

错误提示: [agent/embedded] embedded run agent end: runId=8bea32c4-e762-469c-b09a-23a0b2d9703d isError=true model=deepseek-v4-pro provider=deepseek error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 The reasoning_content in the thinking mode must be passed back to the API.

在使用 DeepSeek 具备思考能力的模型(如 deepseek-v4-pro)时,API 严格要求历史对话记录中必须包含并回传 reasoning_content。 目前的现象是: 模型切换故障:在不执行 /new 的情况下,从其他模型切换到 DeepSeek V4,由于之前的上下文缺少 reasoning_content 字段,导致 API 报错:The reasoning_content in the thinking mode must be passed back to the API. Telegram 适配层丢字段:在 Telegram 连续对话中,OpenClaw 似乎没有正确持久化或回传 Assistant 角色的 reasoning_content 字段。

Steps to reproduce

在 Telegram 中与 OpenClaw 对话。或者没有使用的 v4的多伦对话。(我是使用gpt的聊天对话) 使用 deepseek-v3 发送一条消息。 切换模型至 deepseek-v4-pro (不执行 /new)。 再次发送消息,出现报错。

Expected behavior

他应该能自动完成 reasoning_content 字段的填充 ,而不是每次要/new

Actual behavior

[agent/embedded] embedded run agent end: runId=8bea32c4-e762-469c-b09a-23a0b2d9703d isError=true model=deepseek-v4-pro provider=deepseek error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 The reasoning_content in the thinking mode must be passed back to the API.

OpenClaw version

v2026.4.23

Operating system

macos

Install method

docker

Model

deepseek-v4-pro/deepseek-v4-flash

Provider / routing chain

webchat/telegram->gateway

Additional provider/model setup details

No response

Logs, screenshots, and evidence

[agent/embedded] embedded run agent end: runId=8bea32c4-e762-469c-b09a-23a0b2d9703d isError=true model=deepseek-v4-pro provider=deepseek error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 The `reasoning_content` in the thinking mode must be passed back to the API.

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue can be fixed by ensuring the reasoning_content field is properly passed back to the API when switching to the DeepSeek V4 model.

Guidance

  • Verify that the reasoning_content field is being correctly persisted and passed back to the API in the Telegram conversation flow.
  • Check the OpenClaw code to ensure it is correctly handling the reasoning_content field when switching between models.
  • Consider adding a default or empty reasoning_content field when switching to the DeepSeek V4 model to prevent API errors.
  • Review the API documentation to ensure that the reasoning_content field is being passed in the correct format and location.

Example

No code example is provided as the issue does not contain sufficient information about the codebase.

Notes

The issue seems to be related to the handling of the reasoning_content field when switching between models, specifically when using the DeepSeek V4 model. The exact cause and solution may depend on the specific implementation details of the OpenClaw code and the API.

Recommendation

Apply a workaround to ensure the reasoning_content field is properly passed back to the API when switching to the DeepSeek V4 model, such as adding a default or empty field. This will prevent API errors and allow the conversation to continue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

他应该能自动完成 reasoning_content 字段的填充 ,而不是每次要/new

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING