When a DeepSeek-V4.1-Flash request uses thinking mode and includes tools, treat assistant-message serialization as part of the tool-loop contract—not as optional transcript cleanup.
The official announcement, captured on September 10, 2026, identifies deepseek-flash as the API identifier for V4.1-Flash. The history rules below come from the thinking-mode guide, whose examples use that identifier. This linkage is a snapshot, not a permanent version pin.
The provider documentation says that reasoning_content from all previous turns must be sent back on subsequent tools-bearing requests. That includes an assistant turn that did not emit a tool call. Omitting that field in this path is documented to cause an HTTP 400 response.
A robust client should therefore keep two explicit history policies:
- Tools present: preserve each assistant message’s
content,reasoning_content, and anytool_callsfields when appending it to the next request. After a tool result, retain the preceding assistant reasoning exactly as returned before continuing the loop. - Tools absent: do not assume the same requirement applies. The documentation says previous
reasoning_contentdoes not need to be passed back in ordinary multi-turn requests, and supplied reasoning is ignored rather than concatenated into context.
This split is a useful boundary for request builders: the presence of tools, not whether a particular turn happened to call one, determines the history serializer. It also gives failure handling a concrete check—before retrying a tools-bearing request, verify that every prior assistant turn still carries its returned reasoning field. The requirement is documented behavior, not a locally reproduced error, so clients should log the serialization decision and avoid presenting the 400 condition as a reliability benchmark.