Skip to content

fix(tools): add actionable guidance to web_search/web_extract error messages - #58359

Open
ms-alan wants to merge 2 commits into
NousResearch:mainfrom
ms-alan:fix/web-search-error-guidance-58320
Open

fix(tools): add actionable guidance to web_search/web_extract error messages#58359
ms-alan wants to merge 2 commits into
NousResearch:mainfrom
ms-alan:fix/web-search-error-guidance-58320

Conversation

@ms-alan

@ms-alan ms-alan commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Closes #58320

Improves error messages returned by web_search and web_extract tools when they fail, giving users actionable next steps.

Changes:

  1. web_search "no provider" error: now suggests pip install ddgs as a free no-API-key option alongside hermes tools
  2. web_extract "no provider" error: adds Run hermes tools to configure
  3. web_extract "no content" error: replaces generic "Content was inaccessible or not found" with actionable guidance: "Check cache/web/ for cached content" and "Use browser_navigate for direct page access"

chenbin added 2 commits July 5, 2026 00:10
Closes NousResearch#58239

himalaya v1.2.0 uses positional arguments for flag names (not --flag).
Fixed: 'himalaya flag add 42 seen' (was: 'himalaya flag add 42 --flag seen')
Fixed: 'himalaya flag remove 42 seen' (was: 'himalaya flag remove 42 --flag seen')
…able guidance

Closes NousResearch#58320

- web_search "no provider configured" error now suggests:
  'pip install ddgs (no API key required)' as a free no-config option
- web_extract "no content" error now suggests:
  'Check cache/web/' and 'Use browser_navigate' as fallbacks
- web_extract "no provider" error now adds 'Run `hermes tools` to configure'
@alt-glitch alt-glitch added type/feature New feature or request comp/tools Tool registry, model_tools, toolsets tool/web Web search and extraction P3 Low — cosmetic, nice to have labels Jul 4, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving the failure guidance. The premise remains valid on current main: the targeted generic branches are still present at tools/web_tools.py:714, tools/web_tools.py:922, and tools/web_tools.py:1020.

Problems

  • tools/web_tools.py:1020 handles an empty results list. The only cache/web write is in _truncate_with_footer() after nonempty content exceeds the limit (tools/web_tools.py:547), so this failure cannot leave cached extracted content to inspect.
  • browser_navigate is not present in the standalone web toolset (toolsets.py:97-100), so it should not be an unconditional recovery instruction.

Suggested changes

  • Replace the cache instruction with an empty-result-appropriate retry/provider diagnostic, and make any browser fallback conditional on browser availability.
  • Add focused coverage for the no-provider and empty-results response paths.

This is an automated hermes-sweeper review.

Comment thread tools/web_tools.py
@@ -925,7 +926,11 @@ async def web_extract_tool(
trimmed_response = {"results": trimmed_results}

if trimmed_response.get("results") == []:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch runs only when the provider returned no results. cache/web is written only after nonempty content is truncated, so there cannot be cached extracted content to inspect here; please replace this with an empty-result-appropriate recovery step.

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

Labels

comp/tools Tool registry, model_tools, toolsets P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/web Web search and extraction type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web_search/web_extract fail silently - no clear user guidance on failure

3 participants