Skip to content

[BUG] Missing UI warning when MCP images are omitted for exceeding limits #4459

Description

@weimar-torres-herrera

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

  1. 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)
  2. 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).
  3. Check the UI where the tool result is displayed.
  4. 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

  • npx / Desktop App

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions