From b57db7bf244bc03f3352fede3a60745e6e388a1e Mon Sep 17 00:00:00 2001 From: zhanglingfei112 Date: Thu, 28 May 2026 21:27:52 +0800 Subject: [PATCH] feat: allow web tools to discover plugin-registered backends --- tools/web_tools.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/web_tools.py b/tools/web_tools.py index cfe722c2ba772..fd2c67da4560e 100644 --- a/tools/web_tools.py +++ b/tools/web_tools.py @@ -228,7 +228,15 @@ def _is_backend_available(backend: str) -> bool: return has_xai_credentials() except Exception: return False - return False + # Last resort: check the web_search_registry for plugin-registered + # backends (e.g. a custom "local" extract plugin). This allows + # user-installed plugins with arbitrary backend names to work + # without being added to the hardcoded list above. + try: + from agent.web_search_registry import get_provider + return get_provider(backend) is not None + except Exception: + return False def _ddgs_package_importable() -> bool: