test(plugins): cover xAI web search plugin in bundled-plugin contract#29056
test(plugins): cover xAI web search plugin in bundled-plugin contract#29056briandevans wants to merge 1 commit into
Conversation
The xAI web search plugin landed in commit a0c0312 ("feat(web): add xAI Web Search provider plugin") as the 8th bundled web provider, but test_web_search_provider_plugins.py still expected exactly the original seven (brave-free, ddgs, exa, firecrawl, parallel, searxng, tavily), causing test_all_seven_plugins_present_in_registry to fail on every post-merge CI run. Extend the contract to cover xai: - Rename test_all_seven_plugins_present_in_registry → test_all_bundled_plugins_present_in_registry (number-neutral so the next plugin addition doesn't bit-rot the test name) and add "xai" to the expected sorted list. - Add ("xai", True, False, False) to the capability-flags parametrize (xAI is search-only — no extract or crawl, matching its provider impl). - Add "xai" to the name / display-name and setup-schema parametrize lists so every bundled plugin has the same contract coverage. Verified by running tests/plugins/web/test_web_search_provider_plugins.py: all 48 tests pass (was 47 passing + 1 failing pre-fix).
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the web search provider plugin test suite to account for the newly bundled xai provider and to remove outdated “seven plugins” wording.
Changes:
- Renamed test/docstrings to refer to “bundled” plugins instead of “seven”.
- Added
xaito the expected registry provider list and related parametrized tests. - Added capability-flag expectations for
xai(search-only).
Comments suppressed due to low confidence (1)
tests/plugins/web/test_web_search_provider_plugins.py:1
- The bundled plugin name list is now duplicated in multiple places (expected registry list + two parametrizations). This increases the chance of future drift when adding/removing providers. Consider extracting a single module-level constant (e.g.,
BUNDLED_PLUGIN_NAMES) and reusing it across these tests (and deriving theexpectedlist from it if appropriate) so updates are one-touch.
"""Plugin-side tests for the web search provider migration (PR #25182).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @pytest.mark.parametrize( | ||
| "plugin_name", | ||
| ["brave-free", "ddgs", "searxng", "exa", "parallel", "tavily", "firecrawl"], | ||
| ["brave-free", "ddgs", "searxng", "exa", "parallel", "tavily", "firecrawl", "xai"], |
| @pytest.mark.parametrize( | ||
| "plugin_name", | ||
| ["brave-free", "ddgs", "searxng", "exa", "parallel", "tavily", "firecrawl"], | ||
| ["brave-free", "ddgs", "searxng", "exa", "parallel", "tavily", "firecrawl", "xai"], |
|
CI audit — the one failure on this PR's run is Reproduces on every recent open PR's CI on clean |
|
Closing — superseded by @camaragon's #29224, which is the better fix here:
Thanks @camaragon! |
What does this PR do?
The xAI web search plugin landed in commit a0c0312 ("feat(web): add xAI Web Search provider plugin") as the 8th bundled web provider, but
tests/plugins/web/test_web_search_provider_plugins.pystill expected exactly the original seven (brave-free, ddgs, exa, firecrawl, parallel, searxng, tavily). Thetest_all_seven_plugins_present_in_registryassertion fails on every post-merge run ofmain, e.g. https://github.com/NousResearch/hermes-agent/actions/runs/26138063691/job/76877433972 and https://github.com/NousResearch/hermes-agent/actions/runs/26138014706/job/76877288367.This PR extends the bundled-plugin contract to cover xai:
test_all_seven_plugins_present_in_registry→test_all_bundled_plugins_present_in_registry(number-neutral so the next plugin addition doesn't bit-rot the name) and add"xai"to the expected sorted list.("xai", True, False, False)to the capability-flags parametrize (search-only — no extract or crawl, matchingplugins/web/xai/provider.py'ssupports_*impl)."xai"to the name / display-name and setup-schema parametrize lists so every bundled plugin has the same contract coverage.Related Issue
None — this aligns the test contract to the same-day landing of
a0c031299.Type of Change
Changes Made
tests/plugins/web/test_web_search_provider_plugins.py— extend the fourTestBundledPluginsRegistertests (presence, capability flags, name/display, setup schema) to cover the xAI plugin.How to Test
main:assert ['brave-free', ..., 'xai'] == ['brave-free', ..., 'tavily'].Checklist
Code
test(plugins):)Documentation & Housekeeping
cli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/ARelated / Positioning
feat(web): add Gemini Google Search Grounding provider) also touches this file to add a 9th provider (gemini). Cleanly stackable: if feat(web): add Gemini Google Search Grounding provider #26021 lands first, the rebase here just adds"xai"next to"gemini"in the same lists; if this PR lands first, feat(web): add Gemini Google Search Grounding provider #26021 adds"gemini"next to the now-present"xai". Either order produces the same final state.