From a43c15c7bf7b0dd870171905665fe4f8aeeee04b Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 24 Nov 2026 20:37:54 +0400 Subject: [PATCH] refac --- backend/open_webui/utils/agents/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/agents/runner.py b/backend/open_webui/utils/agents/runner.py index 361a0793a8..1476a1ef60 100644 --- a/backend/open_webui/utils/agents/runner.py +++ b/backend/open_webui/utils/agents/runner.py @@ -104,7 +104,7 @@ async def run(request, form_data, user, metadata, model): if any(f.get('machine_error') for f in uploads): raise ValueError('An attachment could not be uploaded to the agent environment') paths = [f['machine_path'] for f in uploads] - for file in files: + for file in (metadata.get('user_message') or {}).get('files') or files: if file.get('type') == 'filesystem': if machine_id_of(file) != agent['machine_id']: raise ValueError('Attachment belongs to another machine')