can1357
0a099af4ab
fix(ai): persist final tool-call args on output_item.done finalization
...
The per-delta streaming-parse throttle (parseStreamingJsonThrottled) can
skip the last partial re-parse of a tool-call's arguments. For OpenAI
Responses and Codex streams that finalize a function_call via
response.output_item.done WITHOUT a trailing
response.function_call_arguments.done event, the handler built a fresh
toolCall with the authoritative full-buffer parse for the emitted
toolcall_end event but never wrote those args back to the block stored in
output.content. The persisted assistant message therefore retained the
last throttled partial parse (often {}), so subsequent tool execution and
history replay used stale/empty arguments.
Write the authoritative final args onto the persisted block before
dropping the streaming bookkeeping in both handlers.
Also update the stale codex idle-timeout test: bc7afc143 began stripping
partialJson/lastParseLen on finalization, but its expectation still
required partialJson: "" on a block finalized via output_item.done.
Tests: add regression coverage in both providers driving throttled deltas
that finalize via output_item.done with no args.done event, asserting the
persisted block carries the full parsed arguments and no streaming
internals. Verified both fail without the source fix.
2026-05-31 05:37:52 +02:00
..
2026-01-09 12:10:03 +01:00
2026-05-17 04:02:09 +02:00
2026-05-02 01:06:53 +02:00
2026-03-04 02:09:12 +01:00
2026-05-26 07:48:30 +02:00
2026-05-30 15:58:26 +02:00
2026-05-29 06:42:47 +02:00
2026-05-19 18:18:26 +09:00
2026-05-28 02:23:01 +02:00
2026-05-29 07:19:11 +02:00
2026-05-26 03:59:13 +02:00
2026-03-09 15:40:39 +01:00
2026-04-30 05:56:32 +02:00
2026-05-30 18:08:51 +02:00
2026-05-27 14:42:54 +02:00
2026-04-26 03:58:56 +02:00
2026-05-26 08:55:57 +02:00
2026-05-16 18:33:25 +02:00
2026-05-12 04:09:33 +02:00
2026-05-31 05:37:52 +02:00
2026-05-16 20:44:07 +02:00
2026-05-25 20:21:31 +02:00
2026-05-25 20:29:30 +02:00
2026-05-17 04:02:09 +02:00
2026-05-17 01:10:25 +02:00
2026-05-17 04:02:09 +02:00
2026-05-17 01:10:25 +02:00
2026-05-28 02:56:54 +02:00
2026-05-17 04:02:09 +02:00
2026-05-30 18:08:51 +02:00
2026-05-26 20:51:03 +02:00
2026-05-17 01:10:25 +02:00
2026-05-17 03:05:57 +02:00
2026-05-30 18:08:51 +02:00
2026-05-26 03:59:13 +02:00
2026-05-28 00:35:15 +02:00
2026-05-16 20:44:07 +02:00
2026-05-16 23:25:10 +02:00
2026-05-26 05:32:47 +02:00
2026-05-30 18:08:51 +02:00
2026-05-25 20:11:31 +02:00
2026-05-26 03:59:13 +02:00
2026-05-26 20:22:25 +02:00
2026-05-17 06:56:07 +00:00
2026-05-17 02:36:43 +02:00
2026-05-17 02:36:43 +02:00
2026-05-15 15:16:50 +02:00
2026-02-26 09:16:56 +01:00
2026-03-06 12:34:57 +01:00
2026-05-17 04:09:08 +02:00
2026-05-04 15:20:26 +02:00
2026-05-26 08:55:57 +02:00
2026-05-30 18:08:51 +02:00
2026-05-27 16:25:27 +00:00
2026-05-26 22:26:46 +02:00
2026-05-06 21:42:10 +02:00
2026-05-20 17:31:07 +09:00
2026-05-20 17:32:33 +09:00
2026-04-26 12:37:37 +02:00
2026-04-18 22:32:51 +02:00
2026-03-20 23:15:11 +01:00
2026-05-17 04:02:09 +02:00
2026-05-30 09:09:26 +00:00
2026-04-09 18:47:08 +02:00
2026-04-09 18:47:08 +02:00
2026-04-26 12:37:37 +02:00
2026-05-12 04:09:33 +02:00
2026-05-28 02:56:54 +02:00
2026-05-26 03:59:13 +02:00
2026-05-17 02:36:43 +02:00
2026-01-24 00:03:52 +01:00
2026-05-31 04:45:57 +02:00
2026-05-16 19:04:09 +02:00
2026-05-27 19:26:05 +00:00
2026-05-15 14:46:54 +02:00
2026-04-23 21:02:14 +02:00
2026-05-30 18:08:51 +02:00
2026-05-25 12:18:35 +02:00
2026-04-30 05:23:20 +02:00
2026-05-04 15:20:26 +02:00
2026-05-15 14:46:54 +02:00
2026-05-22 19:39:29 -06:00
2026-04-30 04:51:23 +02:00
2026-05-01 11:57:04 -03:00
2026-05-30 03:59:36 +02:00
2026-05-02 07:49:02 +02:00
2026-05-04 15:20:26 +02:00
2026-05-06 17:13:11 +02:00
2026-05-15 14:46:54 +02:00
2026-05-09 04:20:34 +02:00
2026-05-26 04:50:01 +02:00
2026-05-09 03:11:18 +02:00
2026-05-10 05:01:52 +02:00
2026-05-09 03:11:18 +02:00
2026-05-09 03:11:19 +02:00
2026-05-20 00:22:06 +08:00
2026-05-20 15:46:25 +09:00
2026-05-20 16:04:44 +00:00
2026-05-22 15:53:56 +09:00
2026-05-25 19:08:00 +00:00
2026-05-26 11:44:31 +02:00
2026-05-26 23:59:51 +00:00
2026-05-02 06:59:25 +02:00
2026-03-08 00:00:59 +01:00
2026-02-27 12:43:46 +01:00
2026-05-26 15:27:06 +02:00
2026-05-20 07:34:25 +00:00
2026-05-29 06:42:47 +02:00
2026-04-28 18:12:05 +02:00
2026-02-19 11:51:27 -03:00
2026-03-20 23:15:11 +01:00
2026-05-25 14:06:22 +02:00
2026-05-14 04:36:19 +02:00
2026-04-15 07:43:14 +02:00
2026-05-13 01:57:48 +02:00
2026-05-20 22:28:04 +00:00
2026-04-23 21:02:14 +02:00
2026-05-31 05:37:52 +02:00
2026-05-16 23:25:10 +02:00
2026-05-17 09:28:59 +00:00
2026-05-30 18:08:51 +02:00
2026-05-22 16:06:33 +09:00
2026-05-29 06:06:58 +00:00
2026-05-07 18:09:59 +02:00
2026-05-26 16:49:11 +02:00
2026-05-27 15:20:55 +02:00
2026-04-09 18:47:08 +02:00
2026-05-25 21:22:09 +03:00
2026-05-25 14:06:30 +02:00
2026-05-16 00:12:47 +02:00
2026-05-27 18:41:46 +02:00
2026-05-21 17:35:04 +09:00
2026-05-31 04:49:20 +02:00
2026-05-17 04:09:08 +02:00
2026-05-15 09:16:38 +02:00
2026-04-30 05:23:20 +02:00
2026-05-12 04:09:33 +02:00
2026-05-26 14:44:13 +02:00
2026-05-25 20:03:32 +02:00
2026-05-30 04:34:44 +02:00
2026-05-16 19:04:09 +02:00
2026-03-03 22:52:41 +01:00
2026-02-28 20:47:41 +01:00
2026-05-19 04:39:27 +00:00
2026-05-16 20:22:39 +02:00
2026-05-26 20:36:15 +02:00
2026-05-20 17:31:07 +09:00
2026-05-17 03:47:45 +02:00
2026-05-28 02:56:54 +02:00
2026-05-29 13:45:40 +02:00
2026-05-29 05:54:22 +00:00
2026-05-29 06:56:29 +02:00
2026-05-26 23:59:51 +00:00
2026-04-30 05:23:20 +02:00
2026-05-15 23:46:23 +02:00
2026-05-15 14:46:54 +02:00
2026-05-04 15:20:26 +02:00
2026-05-15 14:46:54 +02:00
2026-05-30 06:12:18 +08:00
2026-05-09 10:11:52 +08:00
2026-05-27 20:45:33 -07:00
2026-05-29 06:56:29 +02:00
2026-05-27 19:01:11 +02:00
2026-05-27 15:01:20 +00:00
2026-04-30 05:23:20 +02:00
2026-05-25 14:06:22 +02:00
2026-03-05 00:24:26 +08:00
2026-03-05 00:24:26 +08:00
2026-05-29 06:06:58 +00:00