Wesley Simplicio
68854cdcdb
fix(agent): extract thinking from content-list blocks for DeepSeek V4 Pro
...
DeepSeek V4 Pro returns thinking content as typed blocks inside the
content array rather than as a top-level reasoning_content field:
[{"type": "thinking", "thinking": "..."}, {"type": "output", ...}]
_extract_reasoning only handled content as a plain string, so the
thinking text was silently dropped. On the next turn the session was
replayed without the thinking block, causing:
HTTP 400: The content[].thinking in the thinking mode must be
passed back to the API.
Fix: when content is a list and no structured reasoning field was
found, scan for items with type=='thinking' and accumulate their
'thinking' (or 'text') value into reasoning_parts. Structured fields
(reasoning, reasoning_content, reasoning_details) still take priority
so existing provider behaviour is unchanged.
Closes #21944
2026-05-09 13:36:12 -07:00
..
2026-04-07 17:19:07 -07:00
2026-04-17 14:21:22 -07:00
2026-05-04 01:41:51 -07:00
2026-05-01 18:39:12 +05:30
2026-04-17 12:32:03 -07:00
2026-05-04 05:06:33 -07:00
2026-04-07 17:19:07 -07:00
2026-04-07 17:19:07 -07:00
2026-04-07 17:19:07 -07:00
2026-04-19 11:23:00 -07:00
2026-04-29 04:56:55 -07:00
2026-04-19 22:43:09 -07:00
2026-04-23 02:30:05 -07:00
2026-04-23 13:59:32 -07:00
2026-04-27 08:35:50 -07:00
2026-04-24 03:10:19 -07:00
2026-04-29 23:18:55 -07:00
2026-04-30 14:07:22 -07:00
2026-05-09 12:28:42 -07:00
2026-04-25 08:21:14 -07:00
2026-04-26 19:07:18 -07:00
2026-04-07 17:19:07 -07:00
2026-04-25 08:21:14 -07:00
2026-04-17 12:32:03 -07:00
2026-04-20 05:12:10 -07:00
2026-04-07 17:19:07 -07:00
2026-05-08 14:55:40 -07:00
2026-04-19 11:23:00 -07:00
2026-04-27 08:35:50 -07:00
2026-04-17 12:32:03 -07:00
2026-04-24 03:04:42 -07:00
2026-04-17 12:32:03 -07:00
2026-04-30 23:04:23 -07:00
2026-04-30 11:18:39 -07:00
2026-04-13 10:50:24 -07:00
2026-05-07 08:35:10 -07:00
2026-04-17 14:21:22 -07:00
2026-04-17 14:21:22 -07:00
2026-05-08 11:07:38 -07:00
2026-04-27 06:27:59 -07:00
2026-05-02 02:09:46 -07:00
2026-04-07 17:19:07 -07:00
2026-04-20 23:20:33 -07:00
2026-04-15 22:05:21 -07:00
2026-05-04 12:37:28 -07:00
2026-04-24 05:02:58 -07:00
2026-05-05 05:00:05 -07:00
2026-04-07 17:19:07 -07:00
2026-05-09 12:48:03 -07:00
2026-04-18 22:50:55 -07:00
2026-04-29 04:57:22 -07:00
2026-05-07 08:35:10 -07:00
2026-04-07 17:19:07 -07:00
2026-04-10 03:44:43 -07:00
2026-04-17 12:32:03 -07:00
2026-04-24 05:35:43 -07:00
2026-05-08 03:22:11 -07:00
2026-05-09 12:48:19 -07:00
2026-04-29 23:23:50 -07:00
2026-04-13 10:50:24 -07:00
2026-04-07 17:19:07 -07:00
2026-04-24 15:06:41 -07:00
2026-04-24 05:32:08 -07:00
2026-04-28 21:11:48 -07:00
2026-04-27 12:37:33 -07:00
2026-04-22 18:34:25 -07:00
2026-05-09 13:36:12 -07:00
2026-04-16 16:36:33 -07:00
2026-04-07 17:19:07 -07:00
2026-04-07 17:19:07 -07:00
2026-04-20 22:18:49 -07:00
2026-04-25 09:51:39 -07:00
2026-04-24 15:03:07 -07:00
2026-04-28 11:33:07 -07:00
2026-04-07 17:19:07 -07:00
2026-04-22 18:12:42 -07:00
2026-04-10 05:52:45 -07:00
2026-04-24 05:35:43 -07:00
2026-04-28 03:50:51 -07:00
2026-04-17 12:32:03 -07:00
2026-05-04 05:00:37 -07:00
2026-05-04 05:06:33 -07:00
2026-04-30 20:43:15 -07:00
2026-04-30 16:26:26 -07:00
2026-04-15 15:03:28 -07:00
2026-04-27 06:27:59 -07:00