Ethan
aef7f15510
fix(coderd/x/chatd): only retry without drop_block when it's rejected ( #30821 )
...
In #29792 , once a provider and model had accepted `drop_block`, any 400
on a request with it retried once without it, since I didn't know what
error a provider returns for an unsupported beta. That turned out to
hide real errors. On dogfood, a chat replaying some very tall
screenshots hit Anthropic's many-image limit:
```
messages.9.content.43.image.source.base64.data: At least one of the image dimensions exceed max allowed size for many-image requests: 3000 pixels
```
The retry without `drop_block` then hit the stale thinking block, so the
chat failed with the binding error instead, and the image error only
showed up in a warn log.
To fix, we'll only retry without `drop_block` when the 400 is a known
rejection of the field or its beta, and otherwise return the error as is
and keep the hint. The catch is that if a provider rejects the beta with
an error we don't recognise, chats on that model will see it until a
restart clears the hint, rather than us recovering.
Claude Code (as of 2.1.300) does the same on Anthropic's own API, Claude
Platform on AWS included: it only retries without the beta when the 400
names it or the `block_binding` field. On Bedrock, Vertex and Mantle it
also retries on any 400 it doesn't otherwise recognise, which we could
copy if that catch turns out to matter.
The oversized screenshots are a separate problem, since chatd doesn't
resize images at all.
2026-10-15 14:39:21 +11:00
..
2026-07-14 13:50:25 +01:00
2026-10-06 22:50:28 +02:00
2026-09-17 19:26:18 +02:00
2026-09-21 12:26:09 +02:00
2026-08-05 22:41:17 +02:00
2026-10-13 07:57:56 +00:00
2026-09-29 18:46:41 -07:00
2026-10-13 13:49:12 +02:00
2026-10-14 22:39:00 +02:00
2026-09-28 09:25:01 +00:00
2026-10-13 13:49:12 +02:00
2026-10-14 14:00:19 +11:00
2026-10-13 13:49:12 +02:00
2026-10-14 14:55:29 -07:00
2026-07-02 11:22:56 +01:00
2026-10-13 23:03:08 +02:00
2026-08-25 16:57:27 +07:00
2026-07-29 11:39:12 +00:00
2026-08-27 10:22:33 +02:00
2026-08-27 10:22:33 +02:00
2026-09-28 09:25:01 +00:00
2026-10-01 16:42:51 +02:00
2026-10-01 16:42:51 +02:00
2026-10-01 16:42:51 +02:00
2026-10-01 16:42:51 +02:00
2026-10-14 14:00:19 +11:00
2026-10-11 12:10:59 +02:00
2026-10-01 16:40:24 +02:00
2026-10-01 16:40:24 +02:00
2026-10-01 16:40:24 +02:00
2026-09-30 11:53:57 -05:00
2026-10-13 22:57:46 +02:00
2026-10-14 14:00:19 +11:00
2026-08-20 20:54:52 +00:00
2026-09-05 11:39:10 +02:00
2026-10-13 17:13:36 +00:00
2026-09-18 15:24:15 +10:00
2026-10-14 14:00:19 +11:00
2026-10-14 14:00:19 +11:00
2026-05-08 02:07:33 +10:00
2026-07-20 19:49:19 +02:00
2026-09-21 21:28:45 +02:00
2026-10-13 13:49:12 +02:00
2026-10-13 13:49:12 +02:00
2026-08-20 20:54:52 +00:00
2026-08-24 11:20:26 +01:00
2026-10-12 09:53:45 +11:00
2026-09-02 13:38:14 +02:00
2026-09-02 13:38:14 +02:00
2026-09-02 13:38:14 +02:00
2026-09-14 10:51:22 +02:00
2026-09-14 10:51:22 +02:00
2026-08-24 15:36:32 -07:00
2026-10-02 12:58:53 +00:00
2026-10-14 14:55:29 -07:00
2026-10-14 14:55:29 -07:00
2026-05-20 01:37:38 +02:00
2026-10-13 13:49:12 +02:00
2026-09-30 11:53:58 -05:00
2026-08-26 13:33:13 +02:00
2026-10-11 12:10:59 +02:00
2026-10-11 12:10:59 +02:00
2026-10-13 17:13:36 +00:00
2026-06-17 10:20:47 +00:00
2026-10-13 13:49:12 +02:00
2026-10-11 19:57:49 +02:00
2026-10-05 11:47:24 -07:00
2026-08-05 22:41:17 +02:00
2026-10-14 14:00:19 +11:00
2026-10-12 09:53:45 +11:00
2026-09-25 18:51:55 +10:00
2026-10-12 09:53:45 +11:00
2026-09-26 21:39:40 +02:00
2026-06-22 19:26:34 -06:00
2026-10-13 13:49:12 +02:00
2026-08-26 11:57:56 -06:00
2026-10-11 19:57:49 +02:00
2026-10-11 19:57:49 +02:00
2026-06-16 12:35:40 +00:00
2026-08-30 13:09:17 +02:00
2026-09-14 10:51:22 +02:00
2026-08-18 19:12:47 +02:00
2026-10-05 12:52:10 -04:00
2026-10-05 12:52:10 -04:00
2026-10-05 12:52:10 -04:00
2026-09-14 10:51:22 +02:00
2026-10-13 13:49:12 +02:00
2026-10-13 13:49:12 +02:00
2026-10-12 09:53:44 +11:00
2026-10-12 09:53:44 +11:00
2026-09-30 11:53:58 -05:00
2026-09-18 15:22:02 +01:00
2026-09-30 11:53:58 -05:00
2026-10-13 13:49:12 +02:00
2026-10-11 19:57:49 +02:00
2026-10-11 19:57:49 +02:00
2026-10-13 17:13:36 +00:00
2026-07-29 11:39:12 +00:00
2026-09-30 12:20:03 +02:00
2026-10-13 16:45:44 +07:00
2026-10-13 16:45:44 +07:00
2026-09-26 21:39:40 +02:00
2026-10-13 13:49:12 +02:00
2026-10-13 13:49:12 +02:00
2026-10-02 12:58:53 +00:00
2026-10-12 09:53:44 +11:00
2026-09-21 15:58:18 +02:00
2026-09-28 09:25:01 +00:00
2026-09-28 09:25:01 +00:00
2026-10-01 16:42:51 +02:00
2026-07-29 11:39:12 +00:00
2026-09-30 11:53:58 -05:00
2026-09-30 11:53:58 -05:00
2026-09-30 11:53:58 -05:00
2026-07-29 11:39:12 +00:00
2026-09-28 09:25:01 +00:00
2026-09-28 09:25:01 +00:00
2026-10-02 13:02:41 +02:00
2026-10-05 11:47:24 -07:00
2026-10-05 11:47:24 -07:00
2026-06-12 13:33:12 +02:00
2026-06-16 12:35:40 +00:00
2026-06-18 08:28:17 +00:00
2026-06-12 13:33:12 +02:00
2026-06-12 13:33:12 +02:00
2026-06-12 13:33:12 +02:00
2026-10-05 11:47:24 -07:00
2026-06-12 13:33:12 +02:00
2026-09-04 08:55:15 +01:00
2026-06-12 13:33:12 +02:00
2026-10-01 14:10:21 +02:00
2026-09-21 18:20:22 +00:00
2026-07-18 20:45:13 +02:00
2026-10-11 19:57:49 +02:00
2026-07-18 20:45:13 +02:00
2026-10-12 09:53:44 +11:00
2026-09-11 20:17:23 +00:00
2026-09-25 15:30:21 +01:00
2026-07-18 20:45:13 +02:00
2026-10-02 22:36:59 +03:00
2026-10-05 11:47:24 -07:00
2026-06-17 18:29:43 +02:00
2026-10-15 14:39:21 +11:00
2026-09-24 14:02:06 +10:00
2026-10-15 14:39:21 +11:00
2026-10-02 12:58:53 +00:00
2026-09-17 15:09:19 +02:00
2026-09-17 15:09:19 +02:00
2026-09-29 12:23:00 +00:00
2026-08-25 16:57:27 +07:00
2026-09-27 16:38:30 +02:00
2026-09-30 11:53:58 -05:00
2026-09-30 11:53:58 -05:00
2026-10-01 16:42:51 +02:00
2026-10-11 19:57:49 +02:00