You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sending an image that is smaller than the 2 MB inline cap but whose pixel dimensions exceed the provider's image limit crashes the request with a MODEL_EXECUTION_ERROR and ends the conversation. QwenPaw checks only the byte size of images before inlining them; it does not check pixel dimensions. The provider's pixel limit is therefore the last line of defence, and crossing it raises an unhandled BadRequestError instead of degrading (compress/resize or replace with a text placeholder).
This was discovered while attempting to implement #7201 (separate per-provider max_image_bytes / max_video_bytes / max_audio_bytes): raising the byte cap lets more images reach the provider, which makes this underlying crash more likely to trigger. Please do not relax the 2 MB inline default until pixel-dimension checking/compression is in place (see Additional Notes).
Prepare an image that is < 2 MB in file size but whose total pixels exceed the provider's image limit (e.g. 10240×6400 = 65,536,000 pixels > 36,000,000). Attached test image: too_many_pixels_10240x6400.jpg (0.50 MB).
Configure a vision provider (e.g. Doubao / Volcano Ark) and start a conversation.
Send the image as a user message.
The request inlines the image (it passes the 2 MB byte check) and the provider rejects it, crashing the conversation.
Actual vs Expected
Actual: The request dies with MODEL_EXECUTION_ERROR — the exception propagates through retry_chat_model → middleware → agentscope _agent._call_model → raise last_exception from None, and the conversation ends.
Expected: The image should degrade gracefully — either be resized/compressed to within the provider's pixel limit before sending, or be replaced with a text placeholder (e.g. [Image unavailable: ...]) so the conversation can continue.
Logs / Screenshots
openai.BadRequestError: Error code: 400 - {'error': {'message': 'litellm.BadRequestError: OpenAIException - {"error":{"code":"InvalidParameter","message":"Image 0 failed: Image exceeds the maximum allowed total pixels. Current dimensions: 10240x6400 = 65536000 pixels. Maximum allowed: 36000000 pixels. ..."}'}}
...
File "agentscope/agent/_agent.py", line 2414, in _call_model
raise last_exception from None
Root cause: QwenPaw's media pipeline (provider / context / tool-call / user-message handling) only validates image byte size (the 2 MB inline cap), not pixel dimensions. There is no pixel check or graceful fallback before the provider call.
Larger-than-2 MB images (the majority of real photos) are flagged "too large", and the model must compress them via a tool to view them, losing detail.
The Visual Compact (visual compression) feature does not touch native images (they are "correctness-owned by the normal formatter") — its synthetic pages are size-bounded (CANVAS_MAX_HEIGHT=728), so it neither causes nor can mitigate this crash.
Attached test image: too_many_pixels_10240x6400.jpg (file 0.50 MB < 2 MB; 10240×6400 = 65,536,000 px > 36,000,000 px; aspect ratio 1.60 within limits).
QwenPaw Version
2.1.0 (Docker image
xk-qwenpaw:v2.1.0f1, unmodified)Description
Sending an image that is smaller than the 2 MB inline cap but whose pixel dimensions exceed the provider's image limit crashes the request with a
MODEL_EXECUTION_ERRORand ends the conversation. QwenPaw checks only the byte size of images before inlining them; it does not check pixel dimensions. The provider's pixel limit is therefore the last line of defence, and crossing it raises an unhandledBadRequestErrorinstead of degrading (compress/resize or replace with a text placeholder).This was discovered while attempting to implement #7201 (separate per-provider
max_image_bytes/max_video_bytes/max_audio_bytes): raising the byte cap lets more images reach the provider, which makes this underlying crash more likely to trigger. Please do not relax the 2 MB inline default until pixel-dimension checking/compression is in place (see Additional Notes).Related Issue(s): #7201
Security considerations: none
Component(s) Affected
Environment
xk-qwenpaw:v2.1.0f1Steps to Reproduce
too_many_pixels_10240x6400.jpg(0.50 MB).Actual vs Expected
MODEL_EXECUTION_ERROR— the exception propagates throughretry_chat_model→ middleware → agentscope_agent._call_model→raise last_exception from None, and the conversation ends.[Image unavailable: ...]) so the conversation can continue.Logs / Screenshots
Additional Notes
InvalidParameter/BadRequest(400).[Image unavailable: ...]placeholder at the freeze stage. Raising it (as [Feature]: Separate per-provider max_image_bytes / max_video_bytes / max_audio_bytes caps and expose them in the provider advanced settings #7201 proposes) increases the chance that a pixel-oversized image reaches the provider and crashes. Pixel-dimension detection/compression should land first.CANVAS_MAX_HEIGHT=728), so it neither causes nor can mitigate this crash.too_many_pixels_10240x6400.jpg(file 0.50 MB < 2 MB; 10240×6400 = 65,536,000 px > 36,000,000 px; aspect ratio 1.60 within limits).