diff --git a/pkg/providers/openai_compat/provider.go b/pkg/providers/openai_compat/provider.go index c3733ce3a..be3e77a43 100644 --- a/pkg/providers/openai_compat/provider.go +++ b/pkg/providers/openai_compat/provider.go @@ -270,6 +270,10 @@ func filterDeepSeekReasoningTurn(messages []Message) []Message { } cloned := msg + // DeepSeek thinking-mode replay only requires reasoning_content for + // turns that participate in a tool interaction round. For plain + // assistant turns between two user messages, the docs say the API will + // ignore reasoning_content on replay, so we strip it here. if cloned.Role == "assistant" && strings.TrimSpace(cloned.ReasoningContent) != "" && !hasToolInteraction { cloned.ReasoningContent = "" }