Skip to content

[Bug]: DeepSeek v4-pro: 400 "reasoning_content must be passed back" with thinking=disabled #74374

Description

@simmssun-hashh

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

When using deepseek-v4-pro with thinking:disabled via extra_body, conversations intermittently fail with:

400 The reasoning_content in the thinking mode must be passed back to the API.

The error occurs because DeepSeek occasionally returns reasoning_content in its response even when thinking is disabled. OpenClaw stores this in the conversation history, and on the next request, DeepSeek rejects the payload because reasoning_content from previous messages must be passed back consistently.

Steps to reproduce

Configure extra_body: {thinking: {type: "disabled"}} for deepseek-v4-pro
Have a multi-turn conversation
DeepSeek intermittently returns reasoning_content in a response
The next message in the conversation fails with 400
Restarting the gateway clears the in-memory session cache and temporarily resolves it
Configuration (both files have extra_body set correctly)

models.json:
"id": "deepseek-v4-pro"
"extra_body": {"thinking": {"type": "disabled"}}

openclaw.json (agents.defaults.models):
"deepseek/deepseek-v4-pro": {
"params": {
"thinking": false,
"extra_body": {"thinking": {"type": "disabled"}}
}
}

Expected behavior

OpenClaw should strip reasoning_content from assistant messages in the conversation history before sending to DeepSeek when thinking is disabled. Alternatively, detect reasoning_content in history and auto-enable thinking mode for consistency.

Actual behavior

400 The reasoning_content in the thinking mode must be passed back to the API.

OpenClaw version

OpenClaw: 2026.3.28 (f9b1079)

Operating system

Debian 12 (bookworm), kernel 5.19.17

Install method

docker

Model

deepseek-v4-pro

Provider / routing chain

deepseek

Additional provider/model setup details

No response

Logs, screenshots, and evidence

{"event":"embedded_run_agent_end","isError":true,
"error":"400 The reasoning_content in the thinking mode must be passed back to the API.",
"model":"deepseek-v4-pro","provider":"deepseek"}

Two occurrences within 4 minutes (13:05 and 13:09 UTC, 2026-04-29).

Impact and severity

No response

Additional information

Environment
OpenClaw: 2026.3.28 (f9b1079)
Provider: deepseek
Model: deepseek-v4-pro
Channel: feishu / websocket
Workaround

Restarting the gateway clears in-memory session cache and stops error recurrence until DeepSeek returns reasoning_content again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions