kyssta-exe
6bdbe30763
fix(vision): guard image pixel dimensions, not just bytes ( #37677 )
...
Anthropic enforces two independent ceilings per image:
1. 5 MB encoded byte size
2. 8000 px longest side
Hermes only guarded #1 . A tall screenshot (e.g. 1200x12000 at 0.06 MB)
passes every byte check but fails the pixel check, returning a
non-retryable HTTP 400 that permanently bricks the conversation thread.
Fixes:
- error_classifier: add 'image dimensions exceed' pattern to
_IMAGE_TOO_LARGE_PATTERNS so the 400 is classified as image_too_large
and triggers the shrink/retry path instead of falling through to
non-retryable error.
- conversation_compression: check pixel dimensions (via Pillow) even
when byte size is under the 4 MB target. If max(dims) > 8000, force
shrink.
- vision_tools._resize_image_for_vision: add optional max_dimension param.
When set, images exceeding the pixel cap are downscaled even if they're
under the byte budget. The resize loop now checks both byte AND pixel
limits before accepting a candidate.
Closes #37677
2026-06-04 06:16:45 -07:00
..
2026-04-07 17:19:07 -07:00
2026-05-19 17:27:24 -07:00
2026-05-29 19:21:15 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 07:28:24 -07:00
2026-05-24 15:14:13 -07:00
2026-05-04 05:06:33 -07:00
2026-05-12 20:46:04 -07:00
2026-04-19 22:43:09 -07:00
2026-05-17 02:29:41 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-21 12:49:21 +05:30
2026-04-24 03:10:19 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 22:14:53 -07:00
2026-05-28 22:26:25 -07:00
2026-05-14 07:55:09 -07:00
2026-05-09 21:06:19 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 01:52:34 -07:00
2026-05-31 17:46:56 -05:00
2026-05-09 12:28:42 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-19 17:27:17 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-07 17:19:07 -07:00
2026-05-28 22:26:25 -07:00
2026-05-20 11:44:10 -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-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 03:21:00 -07:00
2026-04-30 11:18:39 -07:00
2026-05-29 19:23:05 -07:00
2026-05-20 11:44:10 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-30 23:05:23 -07:00
2026-05-11 07:37:22 -07:00
2026-06-04 06:16:45 -07:00
2026-05-02 02:09:46 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 11:30:55 -07:00
2026-05-05 05:00:05 -07:00
2026-05-28 22:26:25 -07:00
2026-05-10 22:28:01 -07:00
2026-05-16 22:55:49 -07:00
2026-05-27 10:49:33 -07:00
2026-05-29 02:16:43 +05:30
2026-05-07 08:35:10 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 01:47:55 -07:00
2026-05-25 17:43:10 +05:30
2026-04-10 03:44:43 -07:00
2026-05-28 00:28:42 -07:00
2026-05-31 17:46:56 -05:00
2026-05-27 00:43:32 -07:00
2026-05-09 12:48:19 -07:00
2026-06-03 16:42:52 -07:00
2026-05-28 22:26:25 -07:00
2026-04-07 17:19:07 -07:00
2026-05-31 06:14:32 -07:00
2026-04-24 05:32:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 22:51:25 -07:00
2026-05-28 23:29:59 -07:00
2026-04-22 18:34:25 -07:00
2026-06-03 06:36:46 -07:00
2026-04-16 16:36:33 -07:00
2026-05-12 00:16:45 +05:30
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-04-25 09:51:39 -07:00
2026-05-28 22:26:25 -07:00
2026-05-31 17:46:56 -05:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-13 17:32:22 -07:00
2026-04-24 05:35:43 -07:00
2026-05-27 05:43:20 -07:00
2026-04-28 03:50:51 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 14:36:58 -07:00
2026-05-28 22:26:25 -07:00
2026-05-19 17:27:24 -07:00
2026-05-24 07:38:24 -07:00
2026-05-29 03:44:49 -07:00
2026-05-19 20:49:11 +01:00
2026-05-29 19:23:05 -07:00
2026-04-15 15:03:28 -07:00
2026-05-28 22:26:25 -07:00