Skip to content

fix: move plugin load before backend resolve in web_extract - #73183

Open
kyan001 wants to merge 1 commit into
NousResearch:mainfrom
kyan001:patch-1
Open

fix: move plugin load before backend resolve in web_extract#73183
kyan001 wants to merge 1 commit into
NousResearch:mainfrom
kyan001:patch-1

Conversation

@kyan001

@kyan001 kyan001 commented Jul 28, 2026

Copy link
Copy Markdown

Extract should load plugins before checking registry, same as search. Now custom extract plugins can't be found on cold start.

What does this PR do?

Fix init order in web_extract_tool: load plugins before checking registry, matching the pattern already used by web_search_tool. Without this, custom extract plugins can't be found on cold start.

Related Issue

Fixes #73192

Changes Made

  • tools/web_tools.py: moved _ensure_web_plugins_loaded() before _get_extract_backend() in web_extract_tool

How to Test

  1. Configure a custom-plugin-based extract backend (e.g. web.extract_backend: my-extractor)
  2. Start a fresh Hermes session and call web_extract(urls=[...]) as the first web operation
  3. Content is extracted successfully instead of returning "search-only backend" error

Extract should load plugins before checking registry, same as search.
Now custom extract plugins can't be found on cold start.
@alt-glitch alt-glitch added type/bug Something isn't working comp/plugins Plugin system and bundled plugins tool/web Web search and extraction P3 Low — cosmetic, nice to have labels Jul 28, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused fix. The current main still calls _get_extract_backend() before _ensure_web_plugins_loaded() in tools/web_tools.py:857-866; this differs from the working search ordering at tools/web_tools.py:678-685 and can reject a registry-backed custom backend during a cold start.

Problems

  • No regression test accompanies the reorder. The closest test, tests/tools/test_web_providers.py:249-332, checks only that discovery was eventually called (mock_hook.called at line 327); it does not establish that discovery precedes backend resolution or that a custom configured provider is used.

Suggested changes

  • Add or strengthen a cold-start custom-provider test in tests/tools/test_web_providers.py: have discovery register the configured custom extract provider and assert that provider performs the extraction. That test should fail with the current-main order and pass with this patch.

Automated hermes-sweeper review.

@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

This was generated by AI during triage.

Summary

One PR addresses #73192. #73183 moves plugin loading ahead of extract-backend resolution, directly correcting the reported cold-start registry lookup failure.

Related pull requests

Suggested consolidation

Keep #73183 open with the concrete salvage path identified by the maintainer-bot review: add the cold-start custom-provider regression test that fails under the current ordering and passes with this reorder. No competing or duplicate PRs are present.

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
    I73192(["issue #73192 (open)"])
    P73183["PR #73183 (open)"]
    P73183 -->|best fix| I73192
    class I73192 open
    class P73183 open
    class P73183 best
    class P73183 target
    click I73192 "https://github.com/NousResearch/hermes-agent/issues/73192"
    click P73183 "https://github.com/NousResearch/hermes-agent/pull/73183"
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 1 pull request and 1 issue in this complex. Each diff was read against this issue; Assessment working set: <1 kB of PR diffs, 4 kB of issue/PR text, 2 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 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.

[Bug]: plugin-based extract backends unreachable on cold start due to init order in web_extract_tool

4 participants