Skip to content

fix(web): load user extract plugins before backend resolution - #72646

Open
Plauschi wants to merge 2 commits into
NousResearch:mainfrom
Plauschi:fix/web-plugin-extract
Open

fix(web): load user extract plugins before backend resolution#72646
Plauschi wants to merge 2 commits into
NousResearch:mainfrom
Plauschi:fix/web-plugin-extract

Conversation

@Plauschi

Copy link
Copy Markdown

Summary

  • discover configured non-legacy web plugins before probing backend availability
  • prevent a fresh web_extract process from falling back to search-only ddgs when web.extract_backend names a user plugin
  • classify nested per-result "error": null as success while preserving meaningful nested error messages

Reproduction

With web.backend=ddgs, web.extract_backend=jina-reader, and the user plugin enabled, a fresh process selected ddgs before plugin discovery and returned a search-only backend error. After extraction succeeded, the display detector also marked the result as failed because the response contained a nested "error": null key.

Test plan

  • 162 passed across the focused web-provider and display suites
  • real fresh-process extraction of https://example.com through the user jina-reader plugin
  • gateway API smoke returned GATEWAY_EXTRACT_OK and logged tool web_extract completed

Plauschi and others added 2 commits July 27, 2026 12:37
Co-Authored-By: Hermes <noreply@nousresearch.com>
Co-Authored-By: Hermes <noreply@nousresearch.com>
@alt-glitch alt-glitch added type/bug Something isn't working comp/tools Tool registry, model_tools, toolsets comp/plugins Plugin system and bundled plugins tool/web Web search and extraction P3 Low — cosmetic, nice to have labels Jul 27, 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 isolating the selection-time ordering bug. Current main confirms the premise: web_extract_tool() resolves _get_extract_backend() at tools/web_tools.py:857, while its existing discovery call follows at line 866; _get_capability_backend() therefore probes a cold plugin registry at line 306. The display change also fixes the current generic "error"-key heuristic at agent/display.py:1311 for nested error: null envelopes.

Problems

  • check_web_api_key() is a sibling cold-registry gate: it probes configured and active providers at tools/web_tools.py:1062-1081 without discovery, while both web tools use it as check_fn at lines 1218 and 1232. A custom extract-only provider can still be omitted before this dispatcher-level fix runs.

Suggested changes

  • Call the existing _ensure_web_plugins_loaded() before the availability probes in check_web_api_key() and cover that path with a cold-registry custom extract-provider test.

Automated hermes-sweeper review.

Comment thread tools/web_tools.py
# User plugins are registered lazily. A fresh standalone tool process
# can reach backend selection before the normal agent startup discovery;
# probe only after giving the configured plugin a chance to register.
_ensure_web_plugins_loaded()

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.

Please apply this same idempotent discovery guard to check_web_api_key(). That function remains a pre-dispatch check_fn for both web tools and currently probes custom-provider availability against a cold registry, so an extract-only custom provider can still leave the tools unavailable before this corrected selector runs.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 30, 2026
@GottZ

GottZ commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Summary

Twenty-four PRs address three linked causes: cold-registry discovery ordering, hardcoded provider-selection/tool gates, and non-actionable web-tool failures. #34563 and #57779 are the merged reference implementations for dispatcher discovery and registry-aware selection, while #67110, #67309, #71791, and #72646 address the remaining selection-before-discovery gap and #58359 separately addresses failure guidance.

Related pull requests

Duplicates

#27584, #27700, #28202, and #69144 overlap on discovery-before-dispatch, with #34563 as the merged reference; #31829, #31887, #32465, #33516, #33902, #36094, #38375, #52057, #56201, and #56761 overlap with the provider-gate class implemented by #57779. #67110, #67309, #71791, and the web-selection portion of #72646 overlap on discovery-before-selection.

Suggested consolidation

Keep #67309 open with a salvage path for the shared-gate ordering fix and its corrected cold-registry tests, subject to an independent run against current main. Author action on #72646: add the contributor-requested discovery guard and cold-registry test for check_web_api_key(), then split out the distinct nested error:null display fix; despite the keep_open reviews on #67110 and #71791, their diffs are narrower or incomplete relative to #67309, so they can be closed as duplicates of #67309 after preserving any useful test cases, while #58359 should remain open only after replacing the unsupported cache/browser guidance, adding focused tests, and removing the unrelated Himalaya edit.

Complex graph

flowchart LR
    classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
    classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
    classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
    classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
    classDef best stroke-width:3px,stroke:#b45309
    classDef target stroke-width:3px,stroke:#4338ca
    I27683(["issue #27683 (closed)"])
    subgraph Dup67110 ["PRs duplicating each other"]
        P67110["PR #67110 (open)"]
        P72646["PR #72646 (open)"]
    end
    P72646 -.->|partial| I27683
    class I27683 closed
    class P67110 open
    class P72646 open
    class P72646 target
    click I27683 "https://github.com/NousResearch/hermes-agent/issues/27683"
    click P67110 "https://github.com/NousResearch/hermes-agent/pull/67110"
    click P72646 "https://github.com/NousResearch/hermes-agent/pull/72646"
Loading

Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label).

Cross-PR triage: Reviewed 24 pull requests and 8 issues in this complex. Each diff was read against this issue; Assessment working set: 147 kB of PR diffs, 118 kB of issue/PR text, 64 kB of discussion (79 comments), 96 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

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 sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades 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.

4 participants