mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:30:42 +00:00
fix(web-search): support provider base url overrides
This commit is contained in:
@@ -39,6 +39,7 @@ citations.
|
||||
config: {
|
||||
webSearch: {
|
||||
apiKey: "AIza...", // optional if GEMINI_API_KEY is set
|
||||
baseUrl: "https://generativelanguage.googleapis.com/v1beta", // optional proxy/base URL override
|
||||
model: "gemini-2.5-flash", // default
|
||||
},
|
||||
},
|
||||
@@ -89,6 +90,14 @@ The default model is `gemini-2.5-flash` (fast and cost-effective). Any Gemini
|
||||
model that supports grounding can be used via
|
||||
`plugins.entries.google.config.webSearch.model`.
|
||||
|
||||
## Base URL overrides
|
||||
|
||||
Set `plugins.entries.google.config.webSearch.baseUrl` when Gemini web search
|
||||
must route through an operator proxy or custom Gemini-compatible endpoint. A
|
||||
plain `https://generativelanguage.googleapis.com` value is normalized to
|
||||
`https://generativelanguage.googleapis.com/v1beta`; custom proxy paths are kept
|
||||
as provided after trimming trailing slashes.
|
||||
|
||||
## Related
|
||||
|
||||
- [Web Search overview](/tools/web) -- all providers and auto-detection
|
||||
|
||||
@@ -61,6 +61,7 @@ If you skip it, you can enable or change `x_search` later in config.
|
||||
config: {
|
||||
webSearch: {
|
||||
apiKey: "xai-...", // optional if XAI_API_KEY is set
|
||||
baseUrl: "https://api.x.ai/v1", // optional Responses API proxy/base URL override
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -97,6 +98,14 @@ Grok uses a provider-specific 60 second default timeout because xAI Responses
|
||||
web-grounded searches can run longer than the shared `web_search` default. Set
|
||||
`tools.web.search.timeoutSeconds` to override it.
|
||||
|
||||
## Base URL overrides
|
||||
|
||||
Set `plugins.entries.xai.config.webSearch.baseUrl` when Grok web search should
|
||||
route through an operator proxy or xAI-compatible Responses endpoint. OpenClaw
|
||||
posts to `<baseUrl>/responses` after trimming trailing slashes. `x_search`
|
||||
uses the same `webSearch.baseUrl` fallback unless
|
||||
`plugins.entries.xai.config.xSearch.baseUrl` is set.
|
||||
|
||||
## Related
|
||||
|
||||
- [Web Search overview](/tools/web) -- all providers and auto-detection
|
||||
|
||||
@@ -334,6 +334,7 @@ tool on the request that serves this tool call.
|
||||
xSearch: {
|
||||
enabled: true,
|
||||
model: "grok-4-1-fast-non-reasoning",
|
||||
baseUrl: "https://api.x.ai/v1", // optional, overrides webSearch.baseUrl
|
||||
inlineCitations: false,
|
||||
maxTurns: 2,
|
||||
timeoutSeconds: 30,
|
||||
@@ -341,6 +342,7 @@ tool on the request that serves this tool call.
|
||||
},
|
||||
webSearch: {
|
||||
apiKey: "xai-...", // optional if XAI_API_KEY is set
|
||||
baseUrl: "https://api.x.ai/v1", // optional shared xAI Responses base URL
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -349,6 +351,11 @@ tool on the request that serves this tool call.
|
||||
}
|
||||
```
|
||||
|
||||
`x_search` posts to `<baseUrl>/responses` when
|
||||
`plugins.entries.xai.config.xSearch.baseUrl` is set. If that field is omitted,
|
||||
it falls back to `plugins.entries.xai.config.webSearch.baseUrl`, then the
|
||||
legacy `tools.web.search.grok.baseUrl`, and finally the public xAI endpoint.
|
||||
|
||||
### x_search parameters
|
||||
|
||||
| Parameter | Description |
|
||||
|
||||
Reference in New Issue
Block a user