Skip to content

[BUG] DeepSeek v4-pro reasoning mode breaks with "reasoning_content must be passed back" error #16135

@chrisliu87

Description

@chrisliu87

Description
When switching to DeepSeek v4-pro model in Hermes and disabling reasoning with /reasoning none,
the model throws an HTTP 400 error that blocks further API calls.

Steps to Reproduce
1. Start Hermes chat session with Claude or default model
2. Type: /model deepseek-v4-pro
3. Type: /reasoning none
4. Send any message (e.g., "hi")

Expected Behavior
DeepSeek v4-pro should work without reasoning, allowing normal conversation to proceed.

Actual Behavior
API call fails with:

Error: HTTP 400: The reasoning_content in the thinking mode must be passed back to the API.
{'message': 'The reasoning_content in the thinking mode must be passed back to the API.',
'type': 'invalid_request_error', 'param': None, 'code': 'invalid_request_error'}


The agent then falls back to deepseek-v4-flash, which fails with the same error.

Root Cause Analysis
The error suggests that Hermes is not properly handling the reasoning_content field
in the conversation history when communicating with DeepSeek's thinking mode API.
Even with /reasoning none set, there appears to be stale reasoning state that
DeepSeek API expects to be echoed back.

Workaround
- Use /new to start a fresh session (loses conversation context)
- Stick with Claude or other providers that don't have this issue

Environment
- Hermes version: v2026.4.25+ (latest)
- Provider: DeepSeek
- Model: deepseek-v4-pro (and deepseek-v4-flash)
- OS: WSL (Windows Subsystem for Linux)

Additional Context
This blocks the use of DeepSeek for multi-turn conversations in Hermes while
preserving conversation history.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/agentCore agent loop, run_agent.py, prompt builderprovider/deepseekDeepSeek APItype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions