openclaw - 💡(How to fix) Fix [Bug]: DeepSeek V4-pro 400 error via opencode-go: reasoning_content passthrough regression in v2026.4.26 [2 comments, 3 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#74394Fetched 2026-04-30 06:24:24
View on GitHub
Comments
2
Participants
3
Timeline
4
Reactions
2
Author
Timeline (top)
commented ×2closed ×1cross-referenced ×1

Multi-turn conversations with DeepSeek V4 models via OpenCode-Go are failing with HTTP 400. This occurs when thinking is enabled (and intermittently when disabled if the provider still returns a reasoning field).

Error Message

Error Log

'13:46:46 [agent/embedded] embedded run failover decision: runId=52c61bf4-99d1-4874-bbb8-efa9188228eb stage=assistant decision=surface_error reason=format from=opencode-go/deepseek-v4-flash profile=sha256:0c6f568f3b65 rawError=400 Error from provider (DeepSeek): The reasoning_content in the thinking mode must be passed back to the API.'

Root Cause

Repro Steps

  1. Configure an agent with opencode-go/deepseek-v4-pro.
  2. Execute a multi-turn task (e.g., a tool-calling flow or long analysis).
  3. The second turn fails because OpenClaw does not include the previous reasoning_content in the history payload.
RAW_BUFFERClick to expand / collapse

Environment

  • OpenClaw Version: 2026.4.26 (aa36ee6)
  • Provider: opencode-go
  • Model: deepseek-v4-pro / deepseek-v4-flash
  • Environment: Arch Linux Chroot (arm64)

Description

Multi-turn conversations with DeepSeek V4 models via OpenCode-Go are failing with HTTP 400. This occurs when thinking is enabled (and intermittently when disabled if the provider still returns a reasoning field).

Error Log

'13:46:46 [agent/embedded] embedded run failover decision: runId=52c61bf4-99d1-4874-bbb8-efa9188228eb stage=assistant decision=surface_error reason=format from=opencode-go/deepseek-v4-flash profile=sha256:0c6f568f3b65 rawError=400 Error from provider (DeepSeek): The reasoning_content in the thinking mode must be passed back to the API.'

Repro Steps

  1. Configure an agent with opencode-go/deepseek-v4-pro.
  2. Execute a multi-turn task (e.g., a tool-calling flow or long analysis).
  3. The second turn fails because OpenClaw does not include the previous reasoning_content in the history payload.

This appears to be a regression or an incomplete fix for the previous reasoning_content preservation logic.

extent analysis

TL;DR

The issue can likely be fixed by modifying OpenClaw to include the previous reasoning_content in the history payload for multi-turn conversations with DeepSeek V4 models.

Guidance

  • Verify that the reasoning_content is being returned by the provider in the first turn and check how it's being handled in the OpenClaw code.
  • Investigate the previous reasoning_content preservation logic to see if it's incomplete or if there's a regression that's causing the issue.
  • Check the OpenClaw documentation to see if there are any configuration options or workarounds for preserving the reasoning_content in multi-turn conversations.
  • Test the issue with different models (e.g., deepseek-v4-pro vs deepseek-v4-flash) to see if the problem is specific to one model.

Example

No code snippet is provided as the issue doesn't contain enough information about the specific code changes required.

Notes

The issue seems to be related to a regression or incomplete fix in the OpenClaw code, and the solution will likely involve modifying the code to properly handle the reasoning_content in multi-turn conversations.

Recommendation

Apply a workaround by modifying the OpenClaw code to include the previous reasoning_content in the history payload, as this is the most direct way to address the issue.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: DeepSeek V4-pro 400 error via opencode-go: reasoning_content passthrough regression in v2026.4.26 [2 comments, 3 participants]