Conversation
A model prices an image by its pixel size, not its bytes, so the 900 KB PNG cap bought nothing on the model side: it spent local time resizing and re-encoding in a loop, and when a complex page would not fit it gave up pixel size to reach the byte target — the one dimension the model actually reads. The window picture is now JPEG at quality 0.8 with its longest side capped at 1280, resized once. `screenshotResultMaxPNGBytes` and `screenshotResultMinScale` are gone with the loop that served them. Names follow the behaviour, since a field called `screenshotPNGData` holding JPEG bytes misleads every later caller: `boundedScreenshotPNGData` -> `boundedScreenshotData`, `ToolResultContentItem.pngImage` -> `jpegImage` (mimeType `image/jpeg`), `AccessibilitySnapshot.screenshotPNGData` -> `screenshotData`. This is a public API change in `OpenComputerUseKit`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Window screenshots are returned as JPEG (quality 0.8, longest side 1280) instead of PNG, and the 900 KB byte cap is removed along with the shrink loop that served it.
Why
A model prices an image by its pixel size, not its bytes. The byte cap bought nothing on the model side — it spent local time resizing and re-encoding in a loop, and when a complex page would not fit under 900 KB it gave up pixel size to reach the byte target. That is the one dimension the model actually reads.
With JPEG the same screen is a fraction of the bytes, text stays readable, and pixel size is decided solely by the longest-side cap.
Public API change
OpenComputerUseKitrenames follow the behaviour, since a field calledscreenshotPNGDataholding JPEG bytes misleads every later caller:boundedScreenshotPNGDataboundedScreenshotDataToolResultContentItem.pngImagejpegImage(mimeTypeimage/jpeg)AccessibilitySnapshot.screenshotPNGDatascreenshotDatascreenshotResultMaxPNGBytesandscreenshotResultMinScaleare gone.Verification
swift buildcleanswift test --filter "OpenComputerUseKitTests.OpenComputerUseKitTests"— 163 tests, 0 failuresFF D8 FF)make check-docspassesDocs, release note and history updated in the same change.