#17385

fix(deepseek): require reasoning_content presence on DeepSeek thinking-mode replay turns

Openfidelixopened 2d ago

Summary

When using DeepSeek models (e.g. deepseek-flash, deepseek-v4.1-flash) in thinking mode, multi-turn conversations where prior assistant messages lack reasoning_content (such as when switching targets or when clients omit the field) fail with: [400]: The reasoning_content in the thinking mode must be passed back to the API. (request_id: ...)

Root Cause

  1. open-sse/config/providers/registry/deepseek/index.ts: deepseekProvider lacks requiresReasoningContentEcho: true.
  2. open-sse/utils/reasoningPlaceholder.ts: requiresReasoningContentPresence checks xiaomi-mimo and opencode-*, but omits deepseek.

Fix

  • Enable requiresReasoningContentEcho: true on deepseekProvider.
  • Include deepseek in requiresReasoningContentPresence so the placeholder is injected on replay cache misses.

Activity

0

No activity yet.