diff --git a/tools/web_tools.py b/tools/web_tools.py index 7754c386a56f9..94f76a7044dc2 100644 --- a/tools/web_tools.py +++ b/tools/web_tools.py @@ -855,6 +855,14 @@ async def web_extract_tool( if not safe_urls: results = [] else: + # Ensure plugin-registered providers (including custom + # extract-only backends like web-local) are loaded BEFORE + # resolving the backend, so _is_backend_available() can see + # them via the registry. Loading after resolution caused the + # configured extract_backend to be reported as "unavailable" + # and silently fall back to web.backend (e.g. searxng), + # producing a "search-only backend" error. + _ensure_web_plugins_loaded() backend = _get_extract_backend() # All seven providers (brave-free, ddgs, searxng, exa, parallel, @@ -864,7 +872,6 @@ async def web_extract_tool( # detect coroutine functions and await; sync functions run # inline (the policy gate, SSRF re-check, etc. live inside the # provider itself for the firecrawl per-URL loop). - _ensure_web_plugins_loaded() from agent.web_search_registry import ( get_active_extract_provider, get_provider as _wsp_get_provider,