You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds Codex as a selectable hosted web-search provider, routes native Codex search safely across model overrides, and isolates bounded hosted-search workers from configured tools.\n\nVerification: focused post-merge regression suite passed 202/202 tests on exact head 23824af.
|[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
128
132
129
133
## Native Codex web search
130
134
131
-
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
137
161
-`tools.web.search.enabled: false` disables both managed and native search
138
162
163
+
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
+
139
173
```json5
140
174
{
141
175
tools: {
142
176
web: {
143
177
search: {
144
178
enabled:true,
179
+
// Optional: use Codex Hosted Search from non-Codex parent models too.
180
+
provider:"codex",
145
181
openaiCodex: {
146
182
enabled:true,
147
183
mode:"cached",
@@ -159,14 +195,25 @@ Codex-capable models can optionally use the provider-native Responses `web_searc
159
195
}
160
196
```
161
197
162
-
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.
163
208
164
209
## Network safety
165
210
166
-
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
167
212
trusted provider API hosts, OpenClaw allows Surge, Clash, and sing-box fake-IP
168
213
DNS answers in `198.18.0.0/15` and `fc00::/7` only for that provider hostname.
169
214
Other 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.
170
217
171
218
This automatic allowance does not apply to arbitrary `web_fetch` URLs. For
172
219
`web_fetch`, enable `tools.web.fetch.ssrfPolicy.allowRfc2544BenchmarkRange` and
@@ -200,6 +247,7 @@ Key-free fallbacks after that:
200
247
12.**DuckDuckGo** -- key-free HTML fallback with no account or API key (order 100)
201
248
13.**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)
202
249
14.**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)
203
251
204
252
When no API-backed provider is configured, OpenClaw defaults to **Parallel
205
253
Search (Free)**, so `web_search` works without an API key.
"You are OpenClaw's bounded image-understanding worker. Describe only the provided image content. Do not call tools, edit files, or ask follow-up questions.",
"You are OpenClaw's bounded structured-extraction worker. Return only the requested extraction. Do not call tools, edit files, ask follow-up questions, or include secrets.",
0 commit comments