rodricksz4h5
7299015092
fix(agent): track image rejections per model across a fallback chain
...
The first head stored a single rejecting (provider, model) and kept the
turn-global `_vision_supported` as the recovery guard. In a fallback
chain that fails: model A rejects images and retries text-only, a later
error activates model B, the restart rebuilds api_messages from history
so B receives the images, and when B rejects them too the branch is
skipped because `_vision_supported` is already False — the request
falls through to generic error handling. Recording B also overwrote A,
so A was no longer treated as text-only on later turns.
`_image_rejecting_models` is now a set of every rejecting model, and it
is also the guard: each model's first rejection runs the recovery and a
repeat rejection from the same model still falls through, so the retry
cannot loop. image_model_key() names the key in one place.
Adds a test for the two-model sequence (fails on the previous head) and
one pinning that a repeat rejection from the same model does not retry.
Thanks to @ehz0ah for the review.
(cherry picked from commit 225fd76ccf90cd3ec509a9327f725ac02d996f24)
2026-09-21 21:43:51 +05:30
..
2026-09-20 18:54:24 -07:00
2026-09-18 10:22:14 -07:00
2026-09-19 16:20:29 +05:30
2026-09-20 14:29:39 -07:00
2026-09-20 00:35:04 -07:00
2026-09-21 21:43:51 +05:30
2026-09-20 16:31:10 -07:00
2026-09-19 12:38:55 -07:00
2026-09-20 12:49:40 -07:00
2026-09-20 12:49:40 -07:00
2026-09-19 09:56:12 -07:00
2026-09-17 08:53:15 -07:00
2026-09-20 13:22:30 -07:00
2026-09-17 08:45:46 -07:00
2026-09-17 09:07:51 -07:00
2026-09-19 02:37:36 -07:00
2026-09-17 09:11:38 -07:00
2026-09-19 10:25:30 -07:00
2026-09-19 09:28:45 -07:00
2026-09-20 12:09:47 -07:00
2026-09-19 12:30:32 -07:00
2026-09-20 12:09:47 -07:00
2026-09-20 00:35:04 -07:00
2026-09-20 14:29:39 -07:00
2026-09-20 17:00:43 -07:00
2026-09-19 09:53:48 -07:00
2026-09-19 09:53:48 -07:00
2026-09-19 09:53:48 -07:00
2026-09-20 14:29:39 -07:00
2026-09-19 09:28:13 -07:00
2026-09-19 10:52:11 -07:00
2026-09-19 20:44:24 -07:00
2026-09-19 20:44:24 -07:00
2026-09-20 15:27:11 -07:00
2026-09-20 15:50:49 -07:00
2026-09-21 01:04:16 -07:00
2026-09-16 17:17:47 -07:00
2026-09-19 10:28:34 -07:00
2026-09-20 19:45:30 -07:00
2026-09-21 21:34:44 +05:30
2026-09-19 09:52:18 -07:00
2026-09-19 10:44:26 -07:00
2026-09-19 09:40:56 -07:00
2026-09-19 09:37:23 -07:00
2026-09-19 21:24:05 -07:00
2026-09-20 13:22:30 -07:00
2026-09-18 20:55:24 -07:00
2026-09-20 14:02:17 +05:30
2026-09-19 09:20:54 -07:00
2026-09-19 12:30:32 -07:00
2026-09-16 17:48:48 -07:00
2026-09-18 10:03:04 -07:00
2026-09-20 15:28:21 -07:00
2026-09-19 10:54:43 -07:00
2026-09-20 17:00:43 -07:00
2026-09-18 10:08:58 -07:00
2026-09-20 10:50:27 -07:00
2026-09-17 13:52:36 +05:30
2026-09-19 20:56:31 -07:00
2026-09-21 10:04:32 +05:30
2026-09-18 13:01:12 -04:00
2026-09-16 17:48:17 -07:00
2026-09-18 09:21:42 -07:00
2026-09-15 19:03:33 -07:00
2026-09-21 21:43:51 +05:30
2026-09-20 15:26:34 -07:00
2026-09-18 20:56:35 -07:00
2026-09-20 15:51:19 -07:00
2026-09-20 14:29:39 -07:00
2026-09-19 21:08:09 -07:00
2026-09-19 00:53:26 -07:00
2026-09-18 01:43:35 +05:30
2026-09-17 12:28:25 +05:30
2026-09-19 09:21:18 -07:00
2026-09-19 10:56:19 -07:00
2026-09-16 11:06:06 -07:00
2026-09-17 09:03:29 -07:00
2026-09-18 09:56:28 -07:00
2026-09-21 01:04:37 -07:00
2026-09-18 10:22:14 -07:00
2026-09-15 06:16:38 -07:00
2026-09-20 14:02:17 +05:30
2026-09-19 10:20:55 -07:00
2026-09-20 16:03:38 -07:00
2026-09-19 09:57:53 -07:00
2026-09-18 09:58:12 -07:00
2026-09-19 23:38:49 -07:00
2026-09-19 23:42:20 -07:00
2026-09-16 17:10:13 -07:00
2026-09-19 09:49:39 -07:00
2026-09-18 10:22:47 -07:00
2026-09-15 19:23:53 -07:00
2026-09-17 20:56:27 +05:30
2026-09-19 10:38:30 -07:00
2026-09-20 10:16:51 -07:00
2026-09-20 11:27:39 -07:00
2026-09-18 12:51:22 -07:00
2026-09-20 15:50:26 -07:00
2026-09-18 10:22:47 -07:00
2026-09-18 01:43:35 +05:30
2026-09-19 12:21:39 -07:00
2026-09-20 10:51:03 -07:00
2026-09-18 01:43:35 +05:30
2026-09-16 06:27:23 -05:00
2026-09-20 14:09:57 -07:00
2026-09-21 21:34:44 +05:30
2026-09-18 10:03:04 -07:00
2026-09-18 10:03:04 -07:00
2026-09-20 18:24:07 -07:00
2026-09-20 12:36:34 +05:30
2026-09-20 17:00:43 -07:00
2026-09-21 21:43:51 +05:30
2026-09-20 12:52:07 -07:00
2026-09-21 10:04:32 +05:30
2026-09-18 01:43:35 +05:30
2026-09-20 20:13:33 -07:00
2026-09-16 17:48:17 -07:00
2026-09-19 10:54:43 -07:00
2026-09-19 12:12:04 +05:30
2026-09-20 14:09:57 -07:00
2026-09-20 15:26:34 -07:00
2026-09-18 01:43:35 +05:30
2026-09-19 00:59:27 -07:00
2026-09-18 01:43:35 +05:30
2026-09-18 09:49:14 -07:00
2026-09-19 12:38:55 -07:00
2026-09-21 21:43:51 +05:30
2026-09-19 00:04:42 -07:00
2026-09-19 10:47:48 -07:00
2026-09-19 00:04:42 -07:00
2026-09-19 12:38:55 -07:00
2026-09-18 09:21:42 -07:00
2026-09-18 01:43:35 +05:30
2026-09-18 01:43:35 +05:30
2026-09-19 10:51:40 -07:00
2026-09-17 18:36:10 -07:00
2026-09-20 14:29:39 -07:00
2026-09-20 10:21:52 -07:00
2026-09-20 10:23:04 -07:00
2026-09-19 09:51:12 -07:00