fix(tools): check registered web search plugins in check_web_api_key - #33516
Closed
liuhao1024 wants to merge 1 commit into
Closed
fix(tools): check registered web search plugins in check_web_api_key#33516liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
check_web_api_key() only checked hardcoded backend names (exa, parallel, firecrawl, tavily, searxng, brave-free, ddgs). Third-party plugins that register via ctx.register_web_search_provider() (e.g. Kagi) were silently dropped because the function didn't consult the web search registry. Now checks agent.web_search_registry.get_provider() for the configured backend name before falling back to hardcoded backends. Fixes NousResearch#31873
Collaborator
This was referenced May 28, 2026
1 task
Contributor
|
Thanks for the focused plugin-provider fix. This is an automated hermes-sweeper review; the requested behavior is now implemented on current
The member comment correctly identified competing fixes; main subsequently landed a more complete solution and regression coverage. |
This was referenced Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
check_web_api_key()intools/web_tools.pyonly checked hardcoded backend names (exa, parallel, firecrawl, tavily, searxng, brave-free, ddgs). Third-party plugins that register viactx.register_web_search_provider()(e.g. Kagi) were silently dropped — the tool registry'scheck_fnreturnedFalse, soweb_searchandweb_extractnever appeared in the tool list.Now checks
agent.web_search_registry.get_provider()for the configured backend name before falling back to hardcoded backends.Related Issue
Fixes #31873
Type of Change
Changes Made
tools/web_tools.py:check_web_api_key()now consults the web search registry for plugin-registered providers matching the configured backend nametests/tools/test_web_providers.py: 3 new tests covering registered plugin provider (True), unavailable plugin provider (False), and unknown backend (False)How to Test
pytest tests/ -q— all tests should passChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture and workflows — or N/ACode Intelligence
tools/web_tools.py:check_web_api_key()(callers: tool registry check_fn,hermes toolsCLI)agent/web_search_registry.get_provider()already used in_resolve_web_search_backend()at lines 808-812; this fix applies the same pattern to the availability check