Commit 41eb35a
committed
fix(provider): preserve reasoning_content on second interleaved pass
When the interleaved transform runs on subsequent requests (after DB
round-trip), content parts no longer contain reasoning blocks (they were
extracted on the first pass). The unconditional [field]: reasoningText
overwrites the previously correct providerOptions.reasoning_content with
empty string, causing DeepSeek 400: 'The reasoning_content in the thinking
mode must be passed back to the API.'
Fix: set [field]: reasoningText first, then spread existing providerOptions
so that preserved values from DB take priority over empty reasoningText.
Closes #24442 (co-discovered with @claudianus)1 parent a4373c8 commit 41eb35a
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
211 | 215 | | |
212 | 216 | | |
213 | 217 | | |
214 | 218 | | |
215 | 219 | | |
216 | 220 | | |
217 | | - | |
218 | 221 | | |
| 222 | + | |
219 | 223 | | |
220 | 224 | | |
221 | 225 | | |
| |||
0 commit comments