-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Feature: add web_search provider fallback chain for quota and network failures #80843
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Type
Fields
Priority
None yet
Background
Currently,
tools.web.search.provideraccepts a single provider. If no provider is explicitly configured, OpenClaw auto-detects the first provider that appears to be ready.That works for normal cases, but API-based search providers often fail temporarily at runtime even when they are correctly configured and auto-detectable. Common examples:
These are not permanent configuration errors. In many setups, users already have multiple search providers configured and expect OpenClaw to try another configured provider instead of failing immediately.
Requested feature
Please add a
web_searchprovider fallback / failover chain.Expected behavior:
Example use case
A user has Brave, Perplexity, Tavily, and DuckDuckGo available:
If Brave runs out of free credits or returns 429, OpenClaw should try Perplexity. If Perplexity has a temporary network error, OpenClaw should try Tavily. DuckDuckGo should be used only after the configured higher-quality providers fail.
A possible auto mode could also build a fallback chain from already configured providers:
Suggested recoverable errors
Fallback should be attempted for errors such as:
ECONNRESET,ETIMEDOUT, orfetch failedFallback should probably not be attempted for:
Why DuckDuckGo should be the final fallback
DuckDuckGo is useful as a key-free fallback, but it should not be used too early when the user has already configured multiple paid or higher-quality providers.
Desired order for many users:
Related issue
There was a similar historical request in #35647, which was closed as stale. This issue is intended to restate the latest use case more concretely: when free quota is exhausted, rate limits are hit, or temporary network errors occur,
web_searchshould try other configured channels before finally falling back to DuckDuckGo.Suggested acceptance criteria
tools.web.search.fallbacks.