kshitijk4poor
5cbbade24c
fix(streaming): zero-event guard parity for the anthropic_messages path
...
The chat_completions path raises EmptyStreamError when a stream yields
no chunks and no finish_reason (#64420 ). _call_anthropic() had no
equivalent, and the eventless failure surfaces differently by client:
- Real Anthropic SDK: no message_start means no final-message snapshot,
so get_final_message() raises a bare AssertionError — not in the
retry loop's transient set, so it burned no retries and surfaced raw.
- OpenAI-compat shims: may fabricate a contentless Message with no
stop_reason (or return None), flowing out as a 'successful' empty turn.
Track whether any stream event arrived and normalize both shapes to
EmptyStreamError, giving the anthropic path the same transient retry
budget in the shared _call() retry loop. A real completed response
always carries a stop_reason, so the guard cannot fire on legitimate
turns (including eventless mocks with stop_reason='end_turn').
Follow-up to #64420 .
2026-07-15 10:58:36 +05:30
..
2026-07-07 04:09:35 -07:00
2026-07-05 13:42:46 -07:00
2026-07-06 04:58:07 -07:00
2026-07-14 21:36:32 -07:00
2026-05-28 00:20:11 -07:00
2026-07-14 03:23:19 -07:00
2026-07-14 16:51:35 +05:30
2026-07-14 11:46:40 -07:00
2026-07-12 00:26:49 -07:00
2026-05-15 14:00:01 -07:00
2026-07-14 21:08:22 -07:00
2026-05-18 10:14:38 -07:00
2026-07-14 17:19:46 +05:30
2026-06-15 05:25:17 -07:00
2026-06-19 01:53:32 +05:30
2026-07-05 14:00:20 -07:00
2026-05-17 04:04:15 -07:00
2026-05-29 04:22:27 -07:00
2026-07-15 10:58:36 +05:30
2026-07-11 12:09:27 +05:30
2026-07-14 02:19:40 +05:30
2026-07-09 20:03:11 -07:00
2026-06-29 09:18:10 -04:00
2026-07-14 02:19:40 +05:30
2026-07-01 13:36:50 +05:30
2026-07-01 02:43:49 -07:00
2026-07-14 02:19:40 +05:30
2026-07-14 21:46:41 -07:00
2026-07-14 17:09:40 +05:30
2026-07-02 13:17:41 -07:00
2026-07-13 23:20:48 +05:30
2026-07-02 13:17:41 -07:00
2026-06-12 08:51:10 +00:00
2026-07-05 13:42:46 -07:00
2026-07-10 18:32:32 +05:30
2026-07-10 19:14:06 +05:30
2026-07-11 03:51:38 -07:00
2026-07-15 10:58:36 +05:30
2026-07-14 17:09:40 +05:30
2026-07-13 22:26:19 -07:00
2026-04-28 06:46:45 -07:00
2026-06-03 12:00:27 -07:00
2026-06-18 22:13:07 -07:00
2026-05-13 22:31:28 -07:00
2026-07-05 03:15:03 -07:00
2026-07-11 05:59:42 -07:00
2026-05-16 17:59:32 -07:00
2026-05-28 00:20:11 -07:00
2026-07-14 16:47:33 +05:30
2026-06-30 16:56:01 -07:00
2026-07-05 00:59:35 -07:00
2026-07-01 16:25:48 -05:00
2026-06-30 15:16:21 -05:00
2026-04-28 12:27:36 -07:00
2026-04-30 23:03:54 -07:00
2026-05-11 16:49:13 -07:00
2026-07-09 03:21:54 +05:30
2026-06-21 12:03:46 -07:00
2026-06-19 15:23:41 +08:00
2026-06-25 12:24:34 -05:00
2026-07-14 21:08:22 -07:00
2026-07-01 04:07:46 -07:00
2026-07-15 00:09:24 +05:30
2026-05-27 00:43:32 -07:00
2026-06-13 05:51:41 -07:00
2026-05-08 14:27:40 -07:00
2026-07-05 23:00:34 +05:30
2026-06-23 08:01:50 +00:00
2026-05-10 07:09:28 -07:00
2026-05-12 20:49:20 -07:00
2026-07-05 03:14:55 -07:00
2026-07-14 06:48:53 -07:00
2026-07-09 14:35:14 +05:30
2026-07-10 05:41:59 -05:00
2026-07-09 15:04:14 +05:30
2026-07-05 13:58:19 -07:00
2026-07-11 05:41:58 -07:00
2026-07-07 11:57:01 +05:30
2026-06-02 20:23:09 +00:00
2026-06-19 07:34:15 -07:00
2026-07-07 02:32:32 -07:00
2026-07-05 14:48:11 -07:00
2026-07-14 16:41:21 +05:30
2026-06-28 05:28:45 -07:00
2026-07-09 02:41:24 +05:30
2026-06-13 21:14:32 -07:00
2026-07-02 04:51:56 +05:30
2026-05-28 04:53:27 -07:00
2026-07-01 04:55:15 -07:00
2026-07-14 06:48:53 -07:00
2026-05-05 04:33:38 -07:00
2026-06-25 19:00:48 -07:00
2026-06-30 17:28:33 -07:00
2026-07-01 04:18:48 -07:00
2026-07-14 21:46:41 -07:00
2026-07-14 11:53:05 -07:00
2026-05-19 00:12:12 -07:00
2026-07-11 05:41:58 -07:00
2026-07-07 15:12:49 -07:00
2026-05-25 01:41:19 -07:00
2026-07-14 02:59:39 +05:30
2026-05-24 18:04:54 -07:00
2026-07-14 02:59:39 +05:30
2026-07-14 03:32:45 +05:30
2026-07-14 03:32:46 +05:30
2026-07-01 05:25:33 -07:00
2026-07-10 00:47:51 +05:30
2026-06-24 23:03:45 -05:00
2026-07-12 04:32:52 -07:00
2026-06-30 00:59:29 -05:00
2026-07-02 06:07:56 +05:30
2026-07-14 02:59:39 +05:30
2026-07-14 02:59:39 +05:30
2026-07-06 02:42:24 -07:00
2026-07-06 04:38:17 -07:00