From be7290a09bf858d4b337f192f77a9ab54fafaa16 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 16 Nov 2026 17:22:54 +0100 Subject: [PATCH] fix: images attached in an agent chat never reach the agent (#33993) Attaching an image in a chat with a coding agent model (Claude Code, Codex and the others) dropped the image silently, so the agent only saw the text of the message. The image is now sent to the agent together with the message, as it already is for normal chats. Reported in #33991. --- backend/open_webui/utils/agents/runner.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/open_webui/utils/agents/runner.py b/backend/open_webui/utils/agents/runner.py index b78792b20c..a4d1005d01 100644 --- a/backend/open_webui/utils/agents/runner.py +++ b/backend/open_webui/utils/agents/runner.py @@ -4,6 +4,7 @@ import copy from open_webui.models.chats import Chats from open_webui.utils.chat_id import is_saved_chat_id +from open_webui.utils.middleware import convert_url_images_to_base64 from open_webui.utils.misc import get_message_list from open_webui.utils.terminals import get_terminal_json, upload_files_to_terminal @@ -135,6 +136,7 @@ async def run(request, form_data, user, metadata, model): prompt += f'\n\n{form_data["regeneration_prompt"]}' if paths: prompt += '\n\nAttached files in this environment:\n' + '\n'.join(paths) + await convert_url_images_to_base64(form_data, user=user) images = [ p['image_url']['url'] for m in [user_message, *messages[-1:]]