deepseek-400-thinking-troubleshoot

Diagnoses and fixes DeepSeek HTTP 400 errors caused by reasoning mode and api_mode incompatibility.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill deepseek-400-thinking-troubleshoot-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deepseek-400-thinking-troubleshoot
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/devops/deepseek-400-thinking-troubleshoot
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill deepseek-400-thinking-troubleshoot-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? DeepSeek API returns HTTP 400 errors when reasoning/thinking mode is enabled because the anthropic_messages api_mode fails to round-trip the reasoning_content field on subsequent assistant messages. This Skill pinpoints the root cause and walks you through the exact configuration fix. ## Core Features & Use Cases - Root Cause Diagnosis: Explains why DeepSeek requires reasoning_content on every assistant message after thinking tokens appear, and why anthropic_messages format breaks this. - Guided Config Fix: Provides concrete commands to inspect and update api_mode and reasoning_effort in the Hermes config, including the often-missed custom provider level. - Verification Steps: Shows how to confirm base_url ends with /v1 and validate the fix with a session reset. - Use Case: Your Hermes agent suddenly throws HTTP 400 after enabling reasoning_effort on a DeepSeek-backed custom provider; this Skill identifies the api_mode mismatch and restores working thinking mode. ## Quick Start Ask the assistant to troubleshoot why DeepSeek returns HTTP 400 errors when thinking mode is enabled and apply the recommended api_mode fix.

Frequently Asked Questions about deepseek-400-thinking-troubleshoot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does DeepSeek return HTTP 400 when thinking mode is enabled?

DeepSeek requires reasoning_content to be passed back on every assistant message after the model first outputs thinking tokens. When api_mode is anthropic_messages, this field is lost in format translation, so the next request fails with HTTP 400.

How do I fix DeepSeek 400 errors in Hermes config?

Set api_mode to chat at both the top-level model config and the custom provider level using hermes config set. Ensure base_url ends with /v1, then run /reset to start a new session and verify the error is gone.

Can I keep reasoning_effort enabled with DeepSeek?

Yes, reasoning_effort can stay at high or any level as long as api_mode is set to chat. The OpenAI-compatible chat format round-trips DeepSeek's reasoning_content correctly, so thinking mode and message format do not conflict.

Does changing only the top-level model.api_mode fix the issue?

No, changing only the top-level model.api_mode is not enough. The custom provider's own api_mode field, such as gcp_dpsk.api_mode, must also be set to chat, since that is the setting that actually governs the request format.

When should I use anthropic_messages api_mode instead of chat?

Use anthropic_messages only for Anthropic's own models like Claude. DeepSeek and custom providers forwarding DeepSeek APIs should use chat mode, which is the standard OpenAI-compatible format with a /v1 base_url.