Skip to content

[codex] fix(web): honor registered provider availability - #32465

Closed
stardust-mem wants to merge 1 commit into
NousResearch:mainfrom
stardust-mem:codex/web-provider-registry-availability
Closed

[codex] fix(web): honor registered provider availability#32465
stardust-mem wants to merge 1 commit into
NousResearch:mainfrom
stardust-mem:codex/web-provider-registry-availability

Conversation

@stardust-mem

@stardust-mem stardust-mem commented May 26, 2026

Copy link
Copy Markdown

Upstream value: Makes web-backend detection registry-aware so plugin-registered providers are no longer falsely reported as unavailable — a fix for the provider-plugin architecture that affects anyone using custom or third-party search backends.

Summary

Fixes #31873 by letting the web tool availability gate recognize provider names registered through agent.web_search_registry instead of only accepting the built-in backend list.

Changes

  • Accept configured third-party web providers in _get_backend() when they are present in the registry.
  • Delegate unknown backend availability checks to the registered provider's is_available() method.
  • Make check_web_api_key() consider configured web.backend, web.search_backend, and web.extract_backend provider names before falling back to legacy built-in auto-detection.
  • Add regression coverage for a fake kagi provider proving custom providers can expose web_search / web_extract, and that unavailable explicit custom providers do not silently fall back to another backend.

Validation

  • pytest tests/tools/test_web_tools_config.py::TestBackendSelection tests/tools/test_web_tools_config.py::TestCheckWebApiKey -q
  • pytest tests/tools/test_web_providers.py tests/tools/test_web_providers_brave_free.py tests/tools/test_web_providers_ddgs.py tests/tools/test_web_providers_searxng.py tests/tools/test_web_providers_xai.py tests/plugins/web/test_web_search_provider_plugins.py -q
  • pytest tests/tools/test_web_tools_config.py -q
  • python -m py_compile tools/web_tools.py
  • git diff --check

@stardust-mem
stardust-mem marked this pull request as ready for review May 26, 2026 12:38
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/tools Tool registry, model_tools, toolsets tool/web Web search and extraction comp/plugins Plugin system and bundled plugins labels May 26, 2026
@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Superseded by #57779, which fixes this same bug class (plugin-registered web providers invisible to the tool-availability gate) as a single chokepoint in _is_backend_available() on current main — cascading to _get_backend(), _get_capability_backend(), and check_web_api_key().

Your PR targeted the same gate and informed the approach — thanks for the contribution, credited in the merged PR body. Closing as superseded. #57779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins comp/tools Tool registry, model_tools, toolsets P3 Low — cosmetic, nice to have tool/web Web search and extraction type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: check_web_api_key() hardcodes built-in backends — third-party web search plugins silently disabled

3 participants