What this error means
deepseek-reasoner requires the prior reasoning_content on follow-up turns and rejects successive same-role messages.
How to fix it
- Echo the assistant reasoning_content back on the next turn
- Never send two user or two assistant messages in a row
- Strip reasoning_content only for non-reasoner models
Example error message
{
"error": {
"message": "The reasoning_content in the thinking mode must be passed.",
"code": 400
}
}Frequently asked
Do normal chat models need reasoning_content?
No. Only the reasoner enforces it; sending it to a plain chat model can itself error.