fix(web): don't re-run the bundled fallback sweep when web-parallel is explicitly disabled - #44457
Closed
AIalliAI wants to merge 1 commit into
Closed
fix(web): don't re-run the bundled fallback sweep when web-parallel is explicitly disabled#44457AIalliAI wants to merge 1 commit into
AIalliAI wants to merge 1 commit into
Conversation
…s explicitly disabled Follow-up to NousResearch#44433. The keyless-default check used get_provider('parallel') is None as the failed-sweep sentinel — but with plugins.disabled: [web-parallel] that lookup stays None by design, so every web_search / web_extract call re-paid the full direct-registration sweep and overwrote live registry entries with fresh bundled instances. Treat an explicit web-parallel disable as intentional absence. An empty registry still always triggers the sweep: a failed sweep registers nothing, so emptiness remains the recovery signal for the other bundled backends. Also fixes the stale web-parallel plugin.yaml description (the backend works keyless via the free hosted Search MCP since NousResearch#44433's base behavior). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Requesting maintainer review — this is ready to land from my side. Standalone fork CI is pending first-run approval here; the rollup branch in #44061 carrying this session's batch is fully green on upstream CI (all test shards, typecheck, e2e). |
AIalliAI
force-pushed
the
fix/44433-fallback-disable-check
branch
from
June 14, 2026 17:44
d69a0bf to
91441aa
Compare
Contributor
1 similar comment
Contributor
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.
Follow-up to #44433, implementing the non-blocking nit from review (#44433 (comment)) that merged before it could be addressed.
Problem
_ensure_web_plugins_loadedusesget_provider("parallel") is Noneas the failed-sweep sentinel. Withplugins.disabled: [web-parallel]that lookup staysNoneby design — so the full direct-registration fallback (bundled-dir walk, module imports, provider re-instantiation) re-ran on everyweb_search/web_extractcall even when discovery was perfectly healthy, and each pass overwrote other providers' live registry entries with fresh bundled instances (clobbering e.g. a same-name user plugin or per-instance HTTP session state).Fix
Treat an explicit
web-paralleldisable as intentional absence, not a failed sweep — with one carve-out: an empty registry still always triggers the sweep. A failed sweep registers nothing at all (anything escaping_discover_and_load_innercomes from the scan phase, before any plugin registered), so emptiness remains the reliable failure signal that keeps the other bundled backends recoverable even when parallel is disabled.Also touches up the stale
plugins/web/parallel/plugin.yamldescription ("Requires PARALLEL_API_KEY") — the backend works keyless via the free hosted Search MCP, which is the premise of #44433's keyless-default guarantee.Tests
test_no_resweep_when_parallel_explicitly_disabled— healthy discovery + explicit disable: the fallback never runs across repeated calls, and live registry entries are not replaced (asserts identity). Fails on currentmain, passes with the fix.test_empty_registry_still_sweeps_when_parallel_disabled— failed sweep + explicit disable: other bundled backends are still restored, parallel stays off (pins the carve-out).tests/tools/test_web_keyless_default_fallback.py+tests/tools/test_web_providers.py+tests/hermes_cli/test_plugins.py: 107 passed. Ruff clean.🤖 Generated with Claude Code