feat(web): add 9 search providers — serper, baidu, bocha, qiniu-baidu, serpapi, jina, google-cse, sogou, 360-search - #53149
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to restore/expand Hermes’ “free-ish” web search options after the removal of the keyless Parallel fallback by adding 9 new web search provider plugins and wiring them into tools/web_tools.py backend selection.
Changes:
- Added 9 new bundled
kind: backendweb provider plugins (7 functional + 2 registry-only “unavailable” entries). - Updated
tools/web_tools.pyto recognize these backends in configured values and in the auto-detect fallback order. - Added a generic “plugin provider availability” probe path in
_is_backend_available().
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/web_tools.py | Adds the new backend names to config validation, fallback candidate ordering, and plugin-based availability probing. |
| plugins/web/serper/provider.py | Implements Serper search provider logic and result normalization. |
| plugins/web/serper/plugin.yaml | Declares bundled backend manifest for Serper. |
| plugins/web/serper/init.py | Plugin module entrypoint (currently missing provider registration). |
| plugins/web/baidu/provider.py | Implements Baidu search provider logic and result normalization. |
| plugins/web/baidu/plugin.yaml | Declares bundled backend manifest for Baidu. |
| plugins/web/baidu/init.py | Plugin module entrypoint (currently missing provider registration). |
| plugins/web/bocha/provider.py | Implements Bocha search provider logic and result normalization. |
| plugins/web/bocha/plugin.yaml | Declares bundled backend manifest for Bocha. |
| plugins/web/bocha/init.py | Plugin module entrypoint (currently missing provider registration). |
| plugins/web/qiniu-baidu/provider.py | Implements Qiniu-wrapped Baidu search provider logic and result normalization. |
| plugins/web/qiniu-baidu/plugin.yaml | Declares bundled backend manifest for Qiniu Baidu. |
| plugins/web/qiniu-baidu/init.py | Plugin module entrypoint (currently missing provider registration). |
| plugins/web/serpapi/provider.py | Implements SerpAPI search provider logic and result normalization. |
| plugins/web/serpapi/plugin.yaml | Declares bundled backend manifest for SerpAPI. |
| plugins/web/serpapi/init.py | Plugin module entrypoint (currently missing provider registration). |
| plugins/web/jina/provider.py | Implements Jina search provider logic and result normalization. |
| plugins/web/jina/plugin.yaml | Declares bundled backend manifest for Jina. |
| plugins/web/jina/init.py | Plugin module entrypoint (currently missing provider registration). |
| plugins/web/google-cse/provider.py | Implements Google CSE search provider logic and result normalization. |
| plugins/web/google-cse/plugin.yaml | Declares bundled backend manifest for Google CSE. |
| plugins/web/google-cse/init.py | Plugin module entrypoint (currently missing provider registration). |
| plugins/web/sogou/provider.py | Adds a registry-only “unavailable” Sogou provider that always returns an error. |
| plugins/web/sogou/plugin.yaml | Declares bundled backend manifest for Sogou. |
| plugins/web/sogou/init.py | Plugin module entrypoint (currently missing provider registration). |
| plugins/web/_360_search/provider.py | Adds a registry-only “unavailable” 360 Search provider that always returns an error. |
| plugins/web/_360_search/plugin.yaml | Declares bundled backend manifest for 360 Search. |
| plugins/web/_360_search/init.py | Plugin module entrypoint (currently missing provider registration). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ider priority New subcommand: hermes tools web reorder Shows the current web.fallback_backends list with numbered indices. User enters a space-separated reorder (e.g. '3 1 2 4 5'). Validated for completeness (must include each number exactly once). Writes result back to config.yaml as web.fallback_backends. This gives users a simple way to prioritize search engines after adding new providers via feat/add-free-web-search-providers (PR NousResearch#53149).
…u-baidu, serpapi, jina, google-cse, sogou, 360-search) v0.17 removed the Parallel free MCP fallback (NousResearch#46350), sharply reducing free search options. This adds 9 new providers as plugins following the existing brave-free/ddgs pattern, registered in backend_candidates in composite quality-score order after the existing backends. New functional providers (search-only): - serper — Google SERP, 2,500 free queries, no credit card - baidu — Baidu AI Search, 100/day free, native Chinese content - bocha — Chinese market leader, 1,000 free starter queries - qiniu-baidu — Qiniu Cloud Baidu, 3M tokens for new users - serpapi — Multi-engine, 100/month free - jina — Full-page extraction, 10M tokens free (blocked in China) - google-cse — Google Custom Search, 100/day (blocked in China) Registry-only entries (no public API, listed for completeness): - sogou, 360-search Two prior attempts (NousResearch#41015 Serper by ViezeVingertjes, NousResearch#35690 fallback by jonathanwxh-cell) were self-closed without review. This salages their approach with a complete provider surface covering both Western and Chinese search engines. Changes: - plugins/web/*/ — 27 new files (provider.py, plugin.yaml, __init__.py per backend) - tools/web_tools.py — +9 entries in _KNOWN_WEB_BACKENDS set, +9 in backend_candidates tuple, +_check_provider_available() helper, generic plugin probe in _is_backend_available()
551de72 to
6ef06e9
Compare
Covers: provider availability, missing key, HTTP errors, search success, registry-only stubs (sogou/360), contract checks, and de-hardcoding verification.
…httpx, fix Google CSE dual-credential gap Addresses all 13 Copilot review comments on PR NousResearch#53149: P0 — Missing register(ctx) entrypoints: All 9 provider __init__.py files now define register(ctx) that calls ctx.register_web_search_provider(ProviderClass()), matching the brave-free/ddgs pattern. Without this, PluginManager skips discovery. Medium — Google CSE dual credential: is_available() now requires both GOOGLE_CSE_API_KEY and GOOGLE_CSE_CX. get_setup_schema() advertises both env vars for hermes tools setup. Style — httpx consistency: All 7 functional providers switched from requests to httpx, matching the existing bundled provider pattern (brave-free, tavily, etc.). Test — Plugin registration validation: Added TestPluginRegistration class verifying all __init__.py files have register(ctx) and register_web_search_provider calls. Updated Serper tests to mock httpx instead of requests.
…u for Python import compatibility Python cannot import from directories with hyphens. google-cse/ and qiniu-baidu/ were renamed to google_cse/ and qiniu_baidu/ to match the module paths in their __init__.py imports.
The Baidu search API is accessible via qianfan.baidubce.com/v2/ai_search/chat/completions using the OpenAI-compatible chat format. The old websearch endpoint returned 400. Also added proxy=None since qianfan is a domestic endpoint that should bypass the system HTTPS_PROXY.
补充修复(2026-06-27 排查结论)本地分支: 问题发现9 个新 provider 目录结构、plugin.yaml、 根因 1:PluginManager
|
✅ 验证通过(2026-06-28)TUI 交互模式中 代码层(4 处)
环境层(1 处)
该 PR 代码层修复已验证,可 review。 |
|
Thanks for the substantial provider implementations and for tracing the registry-discovery behavior. This automated hermes-sweeper review is closing this under the standing third-party integration policy:
Closed as not-planned per standing maintainer policy ( |
What does this PR do?
v0.17 removed the Parallel free MCP fallback (#46350), sharply reducing the free search options available to Hermes users. This adds 9 new web search providers as bundled plugins, registered after existing backends in composite quality-score order. Two prior attempts (#41015 by ViezeVingertjes, #35690 by jonathanwxh-cell) were self-closed without review — this salages their approach with a complete provider surface.
Related Issue
Fixes the gap left by #46350. See #41015 and #35690 for prior art.
Type of Change
Changes Made
New functional providers (search-only)
plugins/web/serper/— Google SERP, 2,500 free queries, no credit cardplugins/web/baidu/— Baidu AI Search, 100/day free, native Chinese contentplugins/web/bocha/— Chinese market leader, 1,000 free starter queriesplugins/web/qiniu-baidu/— Qiniu Cloud Baidu, 3M tokens for new usersplugins/web/serpapi/— Multi-engine (Google/Bing/Baidu), 100/month freeplugins/web/jina/— Full-page extraction, 10M tokens free (blocked in China)plugins/web/google-cse/— Google Custom Search, 100/day (blocked in China)Registry-only entries (no public API, listed for completeness)
plugins/web/sogou/— Sogou (搜狗)plugins/web/_360_search/— 360 Search (好搜)Tests added
tests/plugins/web/test_new_providers.py— 10 tests: provider discovery, availability, HTTP errors, search success, registry stubs, contract checks, de-hardcoding verificationModified
tools/web_tools.py— +9 entries inbackend_candidatestuple, +_check_provider_available()helper, +_get_registered_backend_names()(dynamic from plugin registry — no hardcoded list), generic plugin probe in_is_backend_available()How to Test
SERPER_API_KEY(free signup at https://serper.dev)hermes tools→ serper should appear in web search backendsweb_search— results should come from SerperChecklist
Code
pytest tests/ -qand all tests passtests/plugins/web/test_new_providers.py)Documentation & Housekeeping
cli-config.yaml.example— or N/A