






















@@ -60,6 +60,9 @@ local while `web_search` and `x_search` can use xAI Responses under the hood.
6060 <Card title="Brave Search" icon="shield" href="/tools/brave-search">
6161Structured results with snippets. Supports `llm-context` mode, country/language filters. Free tier available.
6262 </Card>
63+ <Card title="Codex Hosted Search" icon="search" href="/plugins/codex-harness">
64+AI-synthesized grounded answers through your Codex app-server account.
65+ </Card>
6366 <Card title="DuckDuckGo" icon="bird" href="/tools/duckduckgo-search">
6467Key-free fallback. No API key needed. Unofficial HTML-based integration.
6568 </Card>
@@ -106,6 +109,7 @@ local while `web_search` and `x_search` can use xAI Responses under the hood.
106109| Provider | Result style | Filters | API key |
107110| ------------------------------------------------ | -------------------------------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------- |
108111| [Brave](/tools/brave-search) | Structured snippets | Country, language, time, `llm-context` mode | `BRAVE_API_KEY` |
112+| [Codex Hosted Search](/plugins/codex-harness) | AI-synthesized + source URLs | Domains, context size, user location | None; uses Codex/OpenAI sign-in |
109113| [DuckDuckGo](/tools/duckduckgo-search) | Structured snippets | -- | None (key-free) |
110114| [Exa](/tools/exa-search) | Structured + extracted | Neural/keyword mode, date, content extraction | `EXA_API_KEY` |
111115| [Firecrawl](/tools/firecrawl) | Structured snippets | Via `firecrawl_search` tool | `FIRECRAWL_API_KEY` |
@@ -128,20 +132,52 @@ Direct OpenAI Responses models use OpenAI's hosted `web_search` tool automatical
128132129133## Native Codex web search
130134131-Codex-capable models can optionally use the provider-native Responses `web_search` tool instead of OpenClaw's managed `web_search` function.
132-133-- Configure it under `tools.web.search.openaiCodex`
134-- It only activates for Codex-capable OpenAI models (`openai/*` models using `api: "openai-chatgpt-responses"`)
135-- Managed `web_search` still applies to non-Codex models
136-- `mode: "cached"` is the default and recommended setting
135+The Codex app-server runtime uses Codex's hosted `web_search` tool automatically
136+when web search is enabled and no managed provider is selected. Native hosted
137+search and OpenClaw's managed `web_search` dynamic tool are mutually exclusive,
138+so managed search cannot bypass native domain restrictions. OpenClaw uses the
139+managed tool when hosted search is unavailable, explicitly disabled, or
140+replaced by a selected managed provider. OpenClaw keeps Codex's standalone
141+`web.run` extension disabled because production app-server traffic rejects its
142+user-defined `web` namespace.
143+144+- Configure native search under `tools.web.search.openaiCodex`
145+- Set `tools.web.search.provider: "codex"` to provision Codex Hosted Search as
146+ the managed `web_search` provider for any parent model. Each call runs a
147+ bounded ephemeral Codex app-server turn and fails if Codex does not emit a
148+ hosted `webSearch` item.
149+- `mode: "cached"` is the default preference, but Codex resolves it to live
150+ external access for unrestricted app-server turns; set `"live"` to request
151+ live access explicitly
152+- Set `tools.web.search.provider` to a managed provider such as `brave` to use
153+ OpenClaw's managed `web_search` instead
154+- Set `tools.web.search.openaiCodex.enabled: false` to opt out of Codex-hosted
155+ search; other managed providers remain available
156+- Restricting the Codex native tool surface also keeps managed `web_search`
157+ available
158+- When `allowedDomains` is set, automatic managed fallback fails closed if
159+ hosted search is unavailable so the native allowlist cannot be bypassed
160+- Tool-disabled LLM-only runs disable both native and managed search
137161- `tools.web.search.enabled: false` disables both managed and native search
138162163+Persistent effective Codex search-policy changes start a fresh bound thread so
164+an already loaded app-server thread cannot keep stale hosted-search access.
165+Transient per-turn restrictions use a temporary restricted thread and preserve
166+the existing binding for later resume.
167+168+Direct OpenAI ChatGPT Responses traffic can also use OpenAI's hosted
169+`web_search` tool. That separate path remains opt-in through
170+`tools.web.search.openaiCodex.enabled: true` and only applies to eligible
171+`openai/*` models using `api: "openai-chatgpt-responses"`.
172+139173```json5
140174{
141175 tools: {
142176 web: {
143177 search: {
144178 enabled: true,
179+// Optional: use Codex Hosted Search from non-Codex parent models too.
180+ provider: "codex",
145181 openaiCodex: {
146182 enabled: true,
147183 mode: "cached",
@@ -159,14 +195,25 @@ Codex-capable models can optionally use the provider-native Responses `web_searc
159195}
160196```
161197162-If native Codex search is enabled but the current model is not Codex-capable, OpenClaw keeps the normal managed `web_search` behavior.
198+For runtimes and providers that do not support native Codex search, Codex can
199+use the managed `web_search` fallback through OpenClaw's dynamic tool namespace.
200+Use an explicit managed provider when you need OpenClaw's provider-specific
201+network controls instead of Codex-hosted search.
202+203+Selecting `provider: "codex"` enables the bundled `codex` plugin and uses the
204+same `tools.web.search.openaiCodex` restrictions shown above. Authenticate the
205+Codex app-server first with `openclaw models auth login --provider openai`.
206+The parent agent can use any model or runtime; only the bounded search worker
207+runs through Codex.
163208164209## Network safety
165210166-Managed `web_search` provider calls use OpenClaw's guarded fetch path. For
211+Managed HTTP `web_search` provider calls use OpenClaw's guarded fetch path. For
167212trusted provider API hosts, OpenClaw allows Surge, Clash, and sing-box fake-IP
168213DNS answers in `198.18.0.0/15` and `fc00::/7` only for that provider hostname.
169214Other private, loopback, link-local, and metadata destinations remain blocked.
215+Codex Hosted Search is the exception: its bounded worker delegates network
216+access to Codex app-server's hosted `web_search` tool.
170217171218This automatic allowance does not apply to arbitrary `web_fetch` URLs. For
172219`web_fetch`, enable `tools.web.fetch.ssrfPolicy.allowRfc2544BenchmarkRange` and
@@ -200,6 +247,7 @@ Key-free fallbacks after that:
20024712. **DuckDuckGo** -- key-free HTML fallback with no account or API key (order 100)
20124813. **Ollama Web Search** -- key-free fallback via your configured local Ollama host when it is reachable and signed in with `ollama signin`; can reuse Ollama provider bearer auth when the host needs it, and can call direct `https://ollama.com` search when configured with `OLLAMA_API_KEY` (order 110)
20224914. **SearXNG** -- `SEARXNG_BASE_URL` or `plugins.entries.searxng.config.webSearch.baseUrl` (order 200)
250+15. **Codex Hosted Search** -- key-free provider contract that uses the active Codex/OpenAI sign-in (order 900)
203251204252When no API-backed provider is configured, OpenClaw defaults to **Parallel
205253Search (Free)**, so `web_search` works without an API key.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。