Issue
When an MCP tool result includes images that exceed the limits defined in model-output.ts (per-image size, image count, or total combined size), those images are silently omitted. The event is logged, but no warning is shown to the user in the UI, giving the impression that all images were processed correctly when some are actually missing.
How to reproduce
- Run an MCP tool that returns images exceeding one of these limits (defined in
model-output.ts:8):
MCP_DIRECT_IMAGE_MAX_BYTES (10 MB per image)
MCP_IMAGE_MAX_MEDIA_PARTS (16 images per result)
MCP_IMAGE_MAX_TOTAL_BYTES (25 MB total)
- For example: send 20 images of 1 KB each (exceeds the count limit), or 4 images of 7 MB each (exceeds the total size limit).
- Check the UI where the tool result is displayed.
- Notice there's no indication that any images were omitted.
Expected Behavior
When one or more images are omitted due to exceeding a limit, the UI should display a visible warning to the user (e.g. "N images were omitted for exceeding the size/count limit"), instead of this information being available only in server logs.
Screenshots
...
Platform
Additional Context
I verified the behavior of all three limits using a test fixture, and in all cases the backend correctly applies the omission logic (as recorded in the logs):
- 1 image of 11 MB → 0 accepted |
image omitted: image/png exceeds 10 MB limit
- 20 images of 1 KB → 16 accepted, 4 omitted |
image omitted: image count exceeds 16 limit
- 4 images of 7 MB → 3 accepted, 1 omitted |
image omitted: total image bytes exceed 25 MB limit
- 6 images of 60 KB → 6 accepted, 0 omitted (no issue in this case)
The limit logic itself works correctly — the issue is the lack of user-facing feedback when an omission occurs.
Issue
When an MCP tool result includes images that exceed the limits defined in
model-output.ts(per-image size, image count, or total combined size), those images are silently omitted. The event is logged, but no warning is shown to the user in the UI, giving the impression that all images were processed correctly when some are actually missing.How to reproduce
model-output.ts:8):MCP_DIRECT_IMAGE_MAX_BYTES(10 MB per image)MCP_IMAGE_MAX_MEDIA_PARTS(16 images per result)MCP_IMAGE_MAX_TOTAL_BYTES(25 MB total)Expected Behavior
When one or more images are omitted due to exceeding a limit, the UI should display a visible warning to the user (e.g. "N images were omitted for exceeding the size/count limit"), instead of this information being available only in server logs.
Screenshots
...
Platform
npx/ Desktop AppAdditional Context
I verified the behavior of all three limits using a test fixture, and in all cases the backend correctly applies the omission logic (as recorded in the logs):
image omitted: image/png exceeds 10 MB limitimage omitted: image count exceeds 16 limitimage omitted: total image bytes exceed 25 MB limitThe limit logic itself works correctly — the issue is the lack of user-facing feedback when an omission occurs.