codez
|
9daa0620a6
|
fix(agent): ordering fix in _copy_reasoning_content_for_api — cross-provider reasoning isolation
Fix logic-ordering bug where normalized_reasoning promotion returns
before the DeepSeek/Kimi needs_empty_reasoning guard, causing
cross-provider reasoning content (MiniMax → DeepSeek) to leak into
reasoning_content and trigger HTTP 400.
Changes:
- Reorder branching: existing reasoning_content check first
- Add 'not has_reasoning' guard so poisoned histories (no reasoning)
still get '' injected for DeepSeek/Kimi
- Healthy same-provider reasoning promotion path unchanged
Refs: #15250, #15213
|
2026-04-26 02:04:52 +08:00 |
|