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.
This commit is contained in:
DrMelone 2026-04-12 23:41:57 +02:00
parent 8416b9cfb5
commit 744cfb8814

View file

@ -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