From 744cfb88148f7eb9387cdd70f47d95e3f5c9adea Mon Sep 17 00:00:00 2001 From: DrMelone <27028174+Classic298@users.noreply.github.com> Date: Sun, 12 Apr 2026 23:41:57 +0200 Subject: [PATCH] fix: use configurable AIOHTTP_CLIENT_TIMEOUT for terminal uploads The hardcoded 60 s total timeout failed deterministically for large files or slow remote storage. Reuse the existing AIOHTTP_CLIENT_TIMEOUT env variable (default 300 s, same one used by the tools router and OpenAI client) so operators can tune it through the same knob they already have. --- backend/open_webui/tools/builtin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/tools/builtin.py b/backend/open_webui/tools/builtin.py index 717b9b9c45..ad521ce321 100644 --- a/backend/open_webui/tools/builtin.py +++ b/backend/open_webui/tools/builtin.py @@ -2947,9 +2947,10 @@ async def upload_file_to_terminal( # --- 3. Upload to terminal server --- import aiohttp + from open_webui.env import AIOHTTP_CLIENT_TIMEOUT async with aiohttp.ClientSession( - timeout=aiohttp.ClientTimeout(total=60), + timeout=aiohttp.ClientTimeout(total=AIOHTTP_CLIENT_TIMEOUT), trust_env=True, ) as session: # Query the terminal's current working directory