Skip to content

fix(vision): accept pixel-correct resize when bytes grow (#48013) - #48046

Closed
kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-48013
Closed

kyssta-exe wants to merge 1 commit into
NousResearch:mainfrom
kyssta-exe:auto-fix/issue-48013

Conversation

@kyssta-exe

Copy link
Copy Markdown
Contributor

Fixes #48013. Removed the byte-size comparison that discarded valid dimension-reduced resizes of PNG images. The _resize_image_for_vision function already handles dimension reduction; the caller should trust its output.

@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint tool/vision Vision analysis and image generation P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jun 17, 2026
@alt-glitch

Copy link
Copy Markdown

Duplicate of #48035 — both PRs fix #48013 in agent/conversation_compression.py by relaxing the same byte-growth rejection in _shrink_data_url (len(resized) >= len(url)) so a pixel-correct downscale is accepted even when the re-encoded PNG grows in bytes. #48035 (filed earlier, ~20:33Z) is the more complete version of the same approach — it tracks which constraint triggered the shrink and adds a regression test — so it's the canonical one. Marking this as duplicate.

@teknium1

Copy link
Copy Markdown
Collaborator

Merged via #49140 (commit 990273d) — closes #48013. This was a duplicate fix for the same image-shrink brick. The merged PR keys the accept gate on the binding constraint (pixels vs bytes) against current main; the one-line change here predated the max_dimension plumbing from #45979 and would have reverted that cap parsing. Thanks for flagging the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists tool/vision Vision analysis and image generation type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image-dimension 400 bricks sessions: shrink recovery discards a pixel-correct downscale when re-encoded PNG bytes grow (survives #45979)

3 participants