open-webui/backend/open_webui/retrieval
Classic298 f7e7f32102
fix: honor Admin UI web loader settings in get_web_loader (#26749)
Since the config refactor, get_web_loader dispatched on the WEB_LOADER_ENGINE module constant, which is read from the environment once at import time. The engine selected in the Admin UI is stored under web.loader.engine in the config table but was never consulted, so UI-configured loader engines (external, playwright, firecrawl, tavily, microsoft_web_iq) were silently ignored and the built-in SafeWebBaseLoader always fetched pages directly. The same applied to the per-engine settings such as the external web loader URL and API key. This breaks egress-restricted deployments that rely on an external web loader: pages are fetched directly from the container and fail with errors like "Network is unreachable" even though an external loader is configured.

Pass the DB-backed loader settings into get_web_loader from both call sites, web search in process_web_search and web fetch via get_loader, and resolve every engine setting from them, keeping the module-level env constants as the fallback for keys that were never saved. Also initialise WebLoaderClass so an unknown engine raises the intended ValueError instead of an UnboundLocalError.

Fixes #26747
2026-07-24 01:30:47 -05:00
..
loaders Forward user info headers to Mistral OCR API (#27253) 2026-07-23 12:33:19 -05:00
models refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
vector chore: format 2026-07-20 22:11:42 -04:00
web fix: honor Admin UI web loader settings in get_web_loader (#26749) 2026-07-24 01:30:47 -05:00
external.py refac 2026-06-29 13:03:14 -05:00
utils.py fix: honor Admin UI web loader settings in get_web_loader (#26749) 2026-07-24 01:30:47 -05:00