fix(config): accept bool or table for tools.web_search

Use a single backward-compatible tools.web_search field that accepts either a boolean or a config table with an enabled flag plus nested web search options. Update the core config resolver, app-server protocol, docs, generated schemas, and tests to match the union shape.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Fouad Matin
2026-03-11 02:26:19 -07:00
parent 2cfa106091
commit 672e1e45bf
14 changed files with 331 additions and 19 deletions

View File

@@ -741,7 +741,7 @@
"web_search": {
"anyOf": [
{
"$ref": "#/definitions/WebSearchToolConfig"
"$ref": "#/definitions/WebSearchToolConfigValue"
},
{
"type": "null"
@@ -828,6 +828,12 @@
}
]
},
"enabled": {
"type": [
"boolean",
"null"
]
},
"location": {
"anyOf": [
{
@@ -840,6 +846,16 @@
}
},
"type": "object"
},
"WebSearchToolConfigValue": {
"anyOf": [
{
"type": "boolean"
},
{
"$ref": "#/definitions/WebSearchToolConfig"
}
]
}
},
"properties": {