Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
In OpenClaw 2026.5.2, agent web_search can fail to use the configured Brave provider even when:
tools.web.search.provider is set to brave
- the Brave plugin/package is installed
- direct runtime/provider resolution can call Brave successfully
In the observed failure, the first-class agent web_search tool did not use Brave and instead attempted a stale/different provider path, returning a Gemini credential error:
provider "gemini" returned missing_gemini_api_key
This is related to but not identical to #76626. #76626 covers the web_search is disabled or no provider is available split between CLI/provider registry and agent registry, and is now closed. The case here is a selected-provider mismatch/stale runtime metadata problem: configured Brave was bypassed and agent web_search attempted Gemini.
Steps to reproduce
Observed on a macOS OpenClaw install after upgrading to 2026.5.2 and repairing externalized plugins:
- Configure Brave search:
{
"tools": {
"web": {
"search": {
"provider": "brave"
}
}
},
"plugins": {
"entries": {
"brave": {
"enabled": true,
"config": {
"webSearch": {
"apiKey": "<redacted>"
}
}
}
}
}
}
- Install/enable
@openclaw/[email protected].
- In an agent turn, call first-class
web_search.
- Instead of using Brave, the tool fails through Gemini:
provider "gemini" returned missing_gemini_api_key
- Direct runtime-level OpenClaw web search resolution using the same config can resolve and call Brave successfully.
- A later fresh agent turn after reinstalling all external plugins together and doing a real Gateway restart resolves correctly as Brave again.
Expected behavior
When tools.web.search.provider = "brave", the agent web_search tool should always use Brave unless Brave is unavailable and a documented fallback path is selected.
It should not silently route to Gemini or reuse stale runtime web-search metadata from a previous turn/session.
Actual behavior
Agent web_search bypassed configured Brave and attempted Gemini, producing:
provider "gemini" returned missing_gemini_api_key
This made web_search unusable even though Brave itself was configured and direct/runtime-level Brave resolution worked.
OpenClaw version
2026.5.2 (8b2a6e5)
Operating system
macOS Darwin 25.3.0 arm64
Install method
Homebrew/global npm OpenClaw install; upgrade via openclaw update
Model
Observed in an agent session using openai-codex/gpt-5.5
Provider / routing chain
Configured web search provider: brave
Unexpected attempted provider: gemini
Logs, screenshots, and evidence
Observed failure:
[tools] web_search failed: provider "gemini" returned missing_gemini_api_key
Observed direct/runtime provider resolution after checking config:
providerConfigured=brave
selectedProvider=brave
selectedProviderKeySource=config
runWebSearch returned provider=brave / result.provider=brave
Current first-class web_search later recovered after a real restart and external-plugin repair:
web_search metadata: provider=brave
Impact and severity
High for users relying on agent/cron web_search. The configured provider can be Brave, but the actual agent tool path can become unusable due to stale or incorrect provider selection.
Additional information
Related issues:
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
In OpenClaw
2026.5.2, agentweb_searchcan fail to use the configured Brave provider even when:tools.web.search.provideris set tobraveIn the observed failure, the first-class agent
web_searchtool did not use Brave and instead attempted a stale/different provider path, returning a Gemini credential error:This is related to but not identical to #76626. #76626 covers the
web_search is disabled or no provider is availablesplit between CLI/provider registry and agent registry, and is now closed. The case here is a selected-provider mismatch/stale runtime metadata problem: configured Brave was bypassed and agentweb_searchattempted Gemini.Steps to reproduce
Observed on a macOS OpenClaw install after upgrading to
2026.5.2and repairing externalized plugins:@openclaw/[email protected].web_search.Expected behavior
When
tools.web.search.provider = "brave", the agentweb_searchtool should always use Brave unless Brave is unavailable and a documented fallback path is selected.It should not silently route to Gemini or reuse stale runtime web-search metadata from a previous turn/session.
Actual behavior
Agent
web_searchbypassed configured Brave and attempted Gemini, producing:This made
web_searchunusable even though Brave itself was configured and direct/runtime-level Brave resolution worked.OpenClaw version
2026.5.2 (8b2a6e5)Operating system
macOS Darwin 25.3.0 arm64
Install method
Homebrew/global npm OpenClaw install; upgrade via
openclaw updateModel
Observed in an agent session using
openai-codex/gpt-5.5Provider / routing chain
Configured web search provider:
braveUnexpected attempted provider:
geminiLogs, screenshots, and evidence
Observed failure:
Observed direct/runtime provider resolution after checking config:
Current first-class
web_searchlater recovered after a real restart and external-plugin repair:Impact and severity
High for users relying on agent/cron
web_search. The configured provider can be Brave, but the actual agent tool path can become unusable due to stale or incorrect provider selection.Additional information
Related issues:
web_searchcannot see configured Brave provider while CLI web search works. Similar area, but this report is about configured Brave being bypassed in favor of Gemini/stale runtime provider metadata.web_searchprovider routing.