Files
zed/crates
Daniel Strobusch f2f9e2766b language_model: Fix ImageSize storing pre-downscale dimensions (#54357)
When images are resized to meet provider size constraints (Anthropic's
1568px limit or the 5MB encoded-PNG cap), the stored ImageSize was still
recording the original width/height rather than the final post-downscale
dimensions. This caused incorrect token estimation via estimate_tokens()
since it uses width * height / 750.

Use processed_image.dimensions() after all downscale passes so that
ImageSize reflects the actual image sent to the provider.

Release Notes:

- Fixed an issue where token estimation would be incorrect in case where
the thread contained downscaled images.
2026-04-21 12:36:22 +02:00
..
2026-04-17 10:51:32 -04:00
2026-04-05 23:05:35 +01:00
2026-03-27 14:56:46 -07:00
2026-03-11 03:08:39 +00:00
2026-04-21 07:25:22 +00:00
2026-03-30 09:06:59 +00:00
2026-04-21 10:29:18 +00:00
2026-04-21 07:25:22 +00:00
2026-02-26 18:36:50 +01:00
2026-04-21 07:25:22 +00:00
…
2026-04-21 07:25:22 +00:00
2026-04-21 12:34:33 +02:00
2026-04-09 14:11:55 -04:00