Problem
When using DeepSeek API with Anthropic-compatible endpoint (https://api.deepseek.com/anthropic), Hermes fails with:
HTTP 400: The content[].thinking in the thinking mode must be passed back to the API.
Root Cause
In agent/anthropic_adapter.py (line ~1659), when reasoning_config.enabled = False:
if reasoning_config.get("enabled") is not False and "haiku" not in model.lower():
# sets thinking parameter
The code skips setting the thinking parameter when disabled, but DeepSeek API requires explicit thinking: {"type": "disabled"} to turn off thinking mode. Without this parameter, DeepSeek defaults to thinking mode enabled.
Expected Behavior
When reasoning_config.enabled = False, Hermes should send:
kwargs["thinking"] = {"type": "disabled"}
Workaround
Currently, users must either:
- Modify source code locally (lost on upgrade)
- Use OpenAI-compatible endpoint instead
Environment
- Hermes Agent: latest (main branch)
- Provider: DeepSeek API
- Endpoint:
https://api.deepseek.com/anthropic
- Model: deepseek-v4-flash (and other DeepSeek models)
Related
DeepSeek API documentation: https://api-docs.deepseek.com/quick_start/pricing
Problem
When using DeepSeek API with Anthropic-compatible endpoint (
https://api.deepseek.com/anthropic), Hermes fails with:Root Cause
In
agent/anthropic_adapter.py(line ~1659), whenreasoning_config.enabled = False:The code skips setting the
thinkingparameter when disabled, but DeepSeek API requires explicitthinking: {"type": "disabled"}to turn off thinking mode. Without this parameter, DeepSeek defaults to thinking mode enabled.Expected Behavior
When
reasoning_config.enabled = False, Hermes should send:Workaround
Currently, users must either:
Environment
https://api.deepseek.com/anthropicRelated
DeepSeek API documentation: https://api-docs.deepseek.com/quick_start/pricing