Repository navigation
Cap oversized pictures on the OpenAI-compatible wire too (CLIProxyAPI) - #375
Open
default-cybe wants to merge 1 commit into
Open
default-cybe wants to merge 1 commit into
default-cybe wants to merge 1 commit into
Conversation
The hub's Claude models go through CLIProxyAPI on the openai provider type, which applied no image size rule, so a Read of a full-page screenshot (pages 13,000+ px tall) failed every later request: "At least one of the image dimensions exceed max allowed size: 8000 pixels", and in long chats "... for many-image requests: 3000 pixels" (hub logs 2026-11-02 to 11-11). - common.ts: capImageSizes, moved from anthropic.ts capManyImages and shared. An image over 8000 px a side always goes as a note; with more than 20 image and document blocks (vision docs count both), one over 3000 px too. Wire only: stored history keeps the picture. The size is read from 4 KB of base64 first, 256 KB only for a JPEG with a large EXIF. - anthropic.ts and openai.ts chatMessages use it; on the OpenAI wire the many-image rule applies to Claude model ids only. - errors.ts: any "image dimensions exceed max allowed size" 400 is image_unreadable, so the runner's bad-image retry drops a picture instead of falling back across models. - browser manager: a full-page shot of a page wider than 7900 px is clipped in width as well as height. - Tests: the OpenAI wire for Claude and GPT, a PDF counting toward 20, a single 13000 px image, and the 8000 px error in both cliproxy shapes. Committed-by: Conclave (cliproxy/personal-claude/claude-opus-5-5)
This branch has not been deployed
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.
anthropicprovider type. The hub's Claude models go through CLIProxyAPI (openaitype), so nothing was capped there. Hub logs showimage dimensions exceed max allowed size: 8000 pixelsand... for many-image requests: 3000 pixels, mostly from subagents that Read full-page screenshots.providers/common.tscapImageSizes: one shared helper, used byanthropic.tsandopenai.tschatMessages. An image over 8000 px a side becomes a note. With more than 20 image + document blocks, an image over 3000 px becomes a note too (on the OpenAI wire, Claude models only). Wire only: stored history keeps the picture.errors.ts: anyimage dimensions exceed max allowed size400 is classifiedimage_unreadable, so it goes to the bad-image retry and not to model fallback.browser/manager.ts: a full-page screenshot is also clipped in width at 7900 px.