From 619f2604660ad59c3ebbf8b0252de7b68e9c9c3e Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 6 Jan 2026 01:53:00 +0400 Subject: [PATCH] refac --- 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 83cf67cd1..165b5b69c 100644 --- a/backend/open_webui/tools/builtin.py +++ b/backend/open_webui/tools/builtin.py @@ -9,6 +9,7 @@ IMPORTANT: DO NOT IMPORT THIS MODULE DIRECTLY IN OTHER PARTS OF THE CODEBASE. import json import logging import time +import asyncio from typing import Optional from fastapi import Request @@ -190,7 +191,7 @@ async def fetch_url( return json.dumps({"error": "Request context not available"}) try: - content, _ = get_content_from_url(__request__, url) + content, _ = await asyncio.to_thread(get_content_from_url, __request__, url) # Truncate if too long (avoid overwhelming context) max_length = 50000