hermes - 💡(How to fix) Fix Bug: DeepSeek V4 Pro thinking content not persisted in session (HTTP 400 on multi-turn)

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…

Root Cause

DeepSeek V4 Pro returns thinking content inside the content array:

{
  "choices": [{
    "message": {
      "content": [
        {"type": "thinking", "thinking": "..."},
        {"type": "output", "output": "..."}
      ]
    }
  }]
}

However, Hermes transport code only looks for reasoning_content field in the message object — it does not parse content array items with type: thinking.

Result: Thinking content is never saved to session. On the next turn, when the session is replayed, the thinking block is missing → DeepSeek API returns 400.

Code Example

HTTP 400: The content[].thinking in the thinking mode must be passed back to the API.

---

{
  "choices": [{
    "message": {
      "content": [
        {"type": "thinking", "thinking": "..."},
        {"type": "output", "output": "..."}
      ]
    }
  }]
}
RAW_BUFFERClick to expand / collapse

Bug Description

When using DeepSeek V4 Pro with thinking mode enabled, multi-turn conversations fail with:

HTTP 400: The content[].thinking in the thinking mode must be passed back to the API.

Root Cause

DeepSeek V4 Pro returns thinking content inside the content array:

{
  "choices": [{
    "message": {
      "content": [
        {"type": "thinking", "thinking": "..."},
        {"type": "output", "output": "..."}
      ]
    }
  }]
}

However, Hermes transport code only looks for reasoning_content field in the message object — it does not parse content array items with type: thinking.

Result: Thinking content is never saved to session. On the next turn, when the session is replayed, the thinking block is missing → DeepSeek API returns 400.

Reproduction

  1. Set up a profile with DeepSeek V4 Pro and thinking enabled
  2. Send a first message → succeeds, thinking appears in response
  3. Send a second message → fails with HTTP 400

Expected Behavior

Thinking content from content[].thinking should either:

  • Be persisted to session (so it is replayed in next turn), or
  • Be converted to reasoning_content field before session storage

Environment

  • Hermes v0.13.0 (v2026.5.7)
  • Provider: deepseek (DeepSeek V4 Pro)
  • OS: Linux (WSL)

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