Files
open-webui/backend/open_webui/utils
Classic298 6f6792d484 fix: pass MCP tool images to the model, not only to the UI (#30358)
When an MCP tool returns an image (e.g. a Home Assistant camera snapshot), the
snapshot shows up in the tool call section but the model never sees it: it
answers that there is no image. Only images arriving as inline data URIs were
attached to the model request; MCP images are uploaded to Files first and their
file URL was treated as display-only.

Now an image file item with a file URL is attached to the model request as an
input_image part in addition to staying in the tool call's displayed files. The
existing URL-to-base64 step already resolves file URLs, so the model receives
the image bytes; verified on a running instance with a mock MCP server and a
mock upstream (the second upstream request carries the byte-identical JPEG).
Inline data-URI images keep their existing model-only handling.

Fixes #30327
2026-09-22 11:34:57 -04:00
..
2026-09-21 11:35:30 -04:00
2026-09-12 14:57:22 -04:00
2026-08-24 18:29:36 -04:00
2026-09-19 17:54:09 -04:00
2026-09-21 08:59:39 -04:00
2026-03-17 17:58:01 -05:00
2026-07-23 02:54:56 -04:00
2026-07-26 21:12:14 -04:00
2026-09-21 08:43:45 -04:00
2026-07-31 17:41:14 -04:00
2026-08-23 13:36:53 -04:00
2026-08-31 01:29:36 -04:00
2026-09-12 15:41:57 -04:00
2026-07-26 23:09:22 -04:00
2026-09-21 10:44:37 -04:00
2026-08-16 22:56:19 -07:00
2026-09-21 08:59:39 -04:00
2026-08-17 00:57:57 -07:00
2026-03-17 17:58:01 -05:00
2026-08-24 18:29:36 -04:00
2026-09-21 11:35:30 -04:00
2026-08-25 16:53:53 -04:00
2026-06-19 00:16:06 +02:00
2026-09-19 17:33:41 -04:00
2026-08-25 16:53:53 -04:00
2026-09-15 22:47:03 -04:00
2026-07-31 17:41:14 -04:00