Summary
PR #15749 (merged) introduced a regression where assistant messages with both
and a valid field get their reasoning content overwritten
with an empty string when using DeepSeek or Kimi thinking mode.
Root Cause
In , #15749 reordered the logic so that the
check (step 2) runs before the field
promotion (step 3). This means:
- A message has and
- Step 2 sees + DeepSeek provider → injects → returns early
- Step 3 (promote to ) is never reached
- The valid reasoning content is lost
Expected Behavior
The field should be promoted to before any
empty-string fallback is applied. The empty-string injection should only happen
when there is no explicit AND no field to promote.
Reproduction
Proposed Fix
Reorder the steps in :
- Preserve explicit
- Promote field → (healthy path)
- DeepSeek/Kimi fallback: inject for messages lacking both
- Clean up non-string
This fix is already included in #15478 (rebased on latest main).
Related
/cc @alt-glitch @OutThisLife
Summary
PR #15749 (merged) introduced a regression where assistant messages with both
and a valid field get their reasoning content overwritten
with an empty string when using DeepSeek or Kimi thinking mode.
Root Cause
In , #15749 reordered the logic so that the
check (step 2) runs before the field
promotion (step 3). This means:
Expected Behavior
The field should be promoted to before any
empty-string fallback is applied. The empty-string injection should only happen
when there is no explicit AND no field to promote.
Reproduction
Proposed Fix
Reorder the steps in :
This fix is already included in #15478 (rebased on latest main).
Related
/cc @alt-glitch @OutThisLife