Codex: add native web search for embedded Pi runs

This commit is contained in:
Christof Salis
2026-03-15 11:20:05 +01:00
committed by Peter Steinberger
parent b87f33c920
commit 797a70fd95
23 changed files with 1280 additions and 23 deletions

View File

@@ -102,6 +102,43 @@ local while `web_search` and `x_search` can use xAI Responses under the hood.
## Auto-detection
## Native Codex web search
Codex-capable models can optionally use the provider-native Responses `web_search` tool instead of OpenClaw's managed `web_search` function.
- Configure it under `tools.web.search.openaiCodex`
- It only activates for Codex-capable models (`openai-codex/*` or providers using `api: "openai-codex-responses"`)
- Managed `web_search` still applies to non-Codex models
- `mode: "cached"` is the default and recommended setting
- `tools.web.search.enabled: false` disables both managed and native search
```json5
{
tools: {
web: {
search: {
enabled: true,
openaiCodex: {
enabled: true,
mode: "cached",
allowedDomains: ["example.com"],
contextSize: "high",
userLocation: {
country: "US",
city: "New York",
timezone: "America/New_York",
},
},
},
},
},
}
```
If native Codex search is enabled but the current model is not Codex-capable, OpenClaw keeps the normal managed `web_search` behavior.
## Setting up web search
Provider lists in docs and setup flows are alphabetical. Auto-detection keeps a
separate precedence order: