openclaw - ✅(Solved) Fix web_fetch does not resolve external webFetchProviders because provider lookup is limited to bundled plugins [1 pull requests, 1 comments, 2 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
openclaw/openclaw#74915Fetched 2026-05-01 05:39:59
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Timeline (top)
commented ×1cross-referenced ×1

External/non-bundled plugins can declare contracts.webFetchProviders and register a web fetch provider with api.registerWebFetchProvider(...), but web_fetch does not appear to consider those providers at runtime.

When tools.web.fetch.readability is set to false, web_fetch fails with:

Web fetch extraction failed: Readability disabled and no fetch provider is available.

This happens even when the config explicitly selects the external provider.

Root Cause

External/non-bundled plugins can declare contracts.webFetchProviders and register a web fetch provider with api.registerWebFetchProvider(...), but web_fetch does not appear to consider those providers at runtime.

When tools.web.fetch.readability is set to false, web_fetch fails with:

Web fetch extraction failed: Readability disabled and no fetch provider is available.

This happens even when the config explicitly selects the external provider.

Fix Action

Fixed

PR fix notes

PR #74962: fix(web_fetch): resolve external webFetchProviders

Description (problem / solution / changelog)

Summary

  • Fix web_fetch provider resolution to honor explicitly configured and runtime-selected providers across non-bundled plugin origins.
  • Keep sandboxed web_fetch restricted to bundled providers.

Test plan

  • pnpm test src/web-fetch/runtime.test.ts
  • pnpm test src/agents/tools/web-tools.fetch.test.ts

Fixes #74915

Changed files

  • src/web-fetch/runtime.test.ts (modified, +20/-2)
  • src/web-fetch/runtime.ts (modified, +19/-8)

Code Example

Web fetch extraction failed: Readability disabled and no fetch provider is available.

---

{
  "plugins": {
    "entries": {
      "xfetch": {
        "enabled": true,
        "config": {
          "webFetch": {
            "apiKey": "sk-test-placeholder",
            "baseUrl": "https://example.invalid/",
            "timeoutSeconds": 60
          }
        }
      }
    },
    "load": {
      "paths": ["/home/o1/xfetch"]
    }
  }
}

---

{
  "id": "xfetch",
  "contracts": {
    "webFetchProviders": ["xfetch"]
  }
}

---

api.registerWebFetchProvider({
  id: "xfetch",
  label: "xfetch",
  envVars: ["XFETCH_API_KEY"],
  createTool: () => ({
    description: "Fetch through xfetch",
    parameters: { type: "object", additionalProperties: true, properties: {} },
    execute: async () => ({ text: "ok" }),
  }),
});

---

{
  "tools": {
    "web": {
      "fetch": {
        "provider": "xfetch",
        "readability": false,
        "timeoutSeconds": 30
      }
    }
  }
}

---

[tools] web_fetch failed: Web fetch extraction failed: Readability disabled and no fetch provider is available.

---

resolvePluginWebFetchProviders({
  config: options?.config,
  bundledAllowlistCompat: true,
  origin: "bundled",
})
RAW_BUFFERClick to expand / collapse

Summary

External/non-bundled plugins can declare contracts.webFetchProviders and register a web fetch provider with api.registerWebFetchProvider(...), but web_fetch does not appear to consider those providers at runtime.

When tools.web.fetch.readability is set to false, web_fetch fails with:

Web fetch extraction failed: Readability disabled and no fetch provider is available.

This happens even when the config explicitly selects the external provider.

Reproduction

  1. Install or link a local external plugin, for example via plugins.load.paths:
{
  "plugins": {
    "entries": {
      "xfetch": {
        "enabled": true,
        "config": {
          "webFetch": {
            "apiKey": "sk-test-placeholder",
            "baseUrl": "https://example.invalid/",
            "timeoutSeconds": 60
          }
        }
      }
    },
    "load": {
      "paths": ["/home/o1/xfetch"]
    }
  }
}
  1. The external plugin manifest declares the fetch provider contract:
{
  "id": "xfetch",
  "contracts": {
    "webFetchProviders": ["xfetch"]
  }
}
  1. The plugin runtime registers the provider:
api.registerWebFetchProvider({
  id: "xfetch",
  label: "xfetch",
  envVars: ["XFETCH_API_KEY"],
  createTool: () => ({
    description: "Fetch through xfetch",
    parameters: { type: "object", additionalProperties: true, properties: {} },
    execute: async () => ({ text: "ok" }),
  }),
});
  1. Configure web_fetch to use it:
{
  "tools": {
    "web": {
      "fetch": {
        "provider": "xfetch",
        "readability": false,
        "timeoutSeconds": 30
      }
    }
  }
}
  1. Refresh the plugin registry, restart the gateway, and call web_fetch for an HTML URL.

Expected behavior

web_fetch should resolve and use the explicitly configured external provider xfetch.

Actual behavior

web_fetch behaves as if no fetch provider exists and fails when Readability is disabled:

[tools] web_fetch failed: Web fetch extraction failed: Readability disabled and no fetch provider is available.

Suspected cause

In src/web-fetch/runtime.ts, provider lookup appears to restrict candidates to bundled plugins:

resolvePluginWebFetchProviders({
  config: options?.config,
  bundledAllowlistCompat: true,
  origin: "bundled",
})

This appears in both provider id resolution and provider definition resolution. As a result, providers from plugins.load.paths, global extensions, workspace extensions, or other non-bundled origins are filtered out before the explicit configured provider id is considered.

This looks inconsistent with the documented plugin contract: contracts.webFetchProviders is described as the provider ownership declaration, but the runtime only considers bundled origins.

Environment

  • OpenClaw version: 2026.4.27
  • Install style: npm/global gateway
  • External plugin source: local path via plugins.load.paths
  • Platform: Linux

Notes

This is related in shape to earlier external plugin runtime/tool surfacing issues, but the concrete failure here is specific to web_fetch provider resolution filtering by origin: "bundled".

A likely fix is to let explicit tools.web.fetch.provider resolve across installed/active plugin origins, or otherwise document that webFetchProviders are currently bundled-only and reject non-bundled provider config earlier with a clear diagnostic.

extent analysis

TL;DR

The web_fetch tool fails to consider external plugins as web fetch providers due to origin filtering, and a likely fix is to modify the provider lookup to include non-bundled plugins.

Guidance

  • The issue seems to stem from the resolvePluginWebFetchProviders function restricting candidates to bundled plugins, which can be verified by checking the origin parameter in src/web-fetch/runtime.ts.
  • To mitigate this, the tools.web.fetch.provider configuration should be allowed to resolve across installed and active plugin origins, regardless of whether they are bundled or not.
  • The contracts.webFetchProviders documentation should be updated to reflect whether it supports non-bundled plugins or not, to avoid confusion.
  • As a temporary workaround, consider setting tools.web.fetch.readability to true to bypass the fetch provider check.

Example

No code snippet is provided as the issue is more related to configuration and plugin architecture.

Notes

The fix may require changes to the resolvePluginWebFetchProviders function to include non-bundled plugins, and the documentation should be updated accordingly to reflect the supported plugin types.

Recommendation

Apply a workaround by setting tools.web.fetch.readability to true until a proper fix is implemented, as this allows web_fetch to function without relying on the external provider.

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…

FAQ

Expected behavior

web_fetch should resolve and use the explicitly configured external provider xfetch.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix web_fetch does not resolve external webFetchProviders because provider lookup is limited to bundled plugins [1 pull requests, 1 comments, 2 participants]