hermes - ✅(Solved) Fix [Bug]: web_tools hardcodes provider list and won't load the configured provider if it's not on the list [1 pull requests, 1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#28651Fetched 2026-05-20 04:02:51
View on GitHub
Comments
1
Participants
1
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×2commented ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

PR fix notes

PR #28652: fix(web_tools): delegate backend availability to provider registry is_available()

Description (problem / solution / changelog)

What does this PR do?

_get_backend() and _is_backend_available() in tools/web_tools.py used hardcoded env-var checks per known backend, meaning custom web providers registered via the plugin system were never discovered during fallback resolution. This refactors both functions to delegate to agent.web_search_registry.get_provider().is_available(), with a legacy env-var fallback for unregistered providers.

Related Issue

<!-- Link the issue this PR addresses. If no issue exists, consider creating one first. -->

Fixes #28651

Type of Change

<!-- Check the one that applies. -->
  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

tools/web_tools.py — 26 insertions, 19 deletions

_get_backend() — replaced hardcoded candidate list with iteration over agent.web_search_registry._LEGACY_PREFERENCE, checking each via _is_backend_available() _is_backend_available() — first looks up the provider from the registry and calls is_available(), falls back to legacy env-var checks for unregistered providers or when is_available() returns False (preserves test monkeypatch compatibility)

How to Test

  1. add and enable custom web_extract plugin (without any API key for builtin providers)
  2. ask the agent to test web_extract
  3. it should report the tool is available and working

Checklist

<!-- Complete these before requesting review. -->

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • [N/A] I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Docker, Linux <!-- e.g. Ubuntu 24.04, macOS 15.2, Windows 11 -->

Documentation & Housekeeping

<!-- Check all that apply. It's OK to check "N/A" if a category doesn't apply to your change. -->
  • [N/A] I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • [N/A] I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • [N/A] I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • [N/A] I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • [N/A] I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Changed files

  • tools/web_tools.py (modified, +26/-19)

Code Example

Report       https://paste.rs/djnLR
  agent.log    https://paste.rs/brZan
  gateway.log  https://paste.rs/bZ3Ds

---
RAW_BUFFERClick to expand / collapse

Bug Description

Web search / extract plugins that aren't on the list will not show up in the toolset, even if they are configured and loaded correctly.

Steps to Reproduce

  1. add custom web_extract plugin, with none of the builtin plugins configured
  2. ask the agent to useweb_extract

Expected Behavior

the agent sees the tool and is able to use it

Actual Behavior

web_extract is not visible in the toolset

Affected Component

Tools (terminal, file ops, web, code execution, etc.)

Messaging Platform (if gateway-related)

No response

Debug Report

Report       https://paste.rs/djnLR
  agent.log    https://paste.rs/brZan
  gateway.log  https://paste.rs/bZ3Ds

Operating System

Docker on Ubuntu 24.04

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING