open-webui-openwebui/backend/open_webui/retrieval/web
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
..
azure.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
bing.py chore: format 2026-06-01 13:56:55 -07:00
bocha.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
brave.py refac 2026-05-21 16:44:36 +04:00
brave_llm_context.py feat: brave search llm context 2026-05-09 06:34:25 +09:00
duckduckgo.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
exa.py refac 2026-03-17 17:58:01 -05:00
external.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
firecrawl.py fix: handle list-shape data in Firecrawl /search response (#24712) 2026-06-01 12:07:31 -07:00
google_pse.py refac 2026-05-21 16:44:36 +04:00
jina_search.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
kagi.py Update Kagi API endpoint and request method (#25015) 2026-06-01 12:48:44 -07:00
linkup.py chore: format 2026-06-01 13:56:55 -07:00
main.py refac 2026-07-01 02:20:16 -05:00
microsoft_web_iq.py refac 2026-06-29 01:52:07 -05:00
mojeek.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
ollama.py refac 2026-03-17 17:58:01 -05:00
perplexity.py refac 2026-06-17 02:52:35 +02:00
perplexity_search.py refac 2026-06-17 02:52:35 +02:00
searchapi.py refac 2026-03-17 17:58:01 -05:00
searxng.py refac 2026-05-21 16:44:36 +04:00
serpapi.py refac 2026-03-17 17:58:01 -05:00
serper.py refac 2026-05-21 16:44:36 +04:00
serphouse.py refac 2026-06-28 23:20:54 -05:00
serply.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
serpstack.py refac 2026-05-21 16:44:36 +04:00
sougou.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
tavily.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
utils.py fix: honor Admin UI web loader settings in get_web_loader (#26749) 2026-07-24 01:30:47 -05:00
yacy.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
yandex.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
ydc.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00