From 672e1e45bf2c47c398472ae0774299cecedebf3a Mon Sep 17 00:00:00 2001 From: Fouad Matin Date: Wed, 11 Mar 2026 02:26:19 -0700 Subject: [PATCH] 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 --- .../codex_app_server_protocol.schemas.json | 18 ++- .../codex_app_server_protocol.v2.schemas.json | 18 ++- .../schema/json/v2/ConfigReadResponse.json | 18 ++- .../schema/typescript/WebSearchToolConfig.ts | 2 +- .../typescript/WebSearchToolConfigValue.ts | 6 + .../schema/typescript/index.ts | 1 + .../schema/typescript/v2/ToolsV2.ts | 4 +- .../app-server-protocol/src/protocol/v2.rs | 4 +- codex-rs/app-server/README.md | 2 +- .../app-server/tests/suite/v2/config_rpc.rs | 62 +++++++- codex-rs/core/config.schema.json | 18 ++- codex-rs/core/src/config/config_tests.rs | 143 ++++++++++++++++++ codex-rs/core/src/config/mod.rs | 14 +- codex-rs/protocol/src/config_types.rs | 40 +++++ 14 files changed, 331 insertions(+), 19 deletions(-) create mode 100644 codex-rs/app-server-protocol/schema/typescript/WebSearchToolConfigValue.ts diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index 0a8dd747f1..053b5fe8ef 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -16963,7 +16963,7 @@ "web_search": { "anyOf": [ { - "$ref": "#/definitions/v2/WebSearchToolConfig" + "$ref": "#/definitions/v2/WebSearchToolConfigValue" }, { "type": "null" @@ -17634,6 +17634,12 @@ } ] }, + "enabled": { + "type": [ + "boolean", + "null" + ] + }, "location": { "anyOf": [ { @@ -17647,6 +17653,16 @@ }, "type": "object" }, + "WebSearchToolConfigValue": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/v2/WebSearchToolConfig" + } + ] + }, "WindowsSandboxSetupCompletedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index 79add1f96e..2b836ead28 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -14784,7 +14784,7 @@ "web_search": { "anyOf": [ { - "$ref": "#/definitions/WebSearchToolConfig" + "$ref": "#/definitions/WebSearchToolConfigValue" }, { "type": "null" @@ -15679,6 +15679,12 @@ } ] }, + "enabled": { + "type": [ + "boolean", + "null" + ] + }, "location": { "anyOf": [ { @@ -15692,6 +15698,16 @@ }, "type": "object" }, + "WebSearchToolConfigValue": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/WebSearchToolConfig" + } + ] + }, "WindowsSandboxSetupCompletedNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { diff --git a/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json index fb832b4244..172a956f34 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json @@ -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": { diff --git a/codex-rs/app-server-protocol/schema/typescript/WebSearchToolConfig.ts b/codex-rs/app-server-protocol/schema/typescript/WebSearchToolConfig.ts index c14067cef4..240b1880ca 100644 --- a/codex-rs/app-server-protocol/schema/typescript/WebSearchToolConfig.ts +++ b/codex-rs/app-server-protocol/schema/typescript/WebSearchToolConfig.ts @@ -4,4 +4,4 @@ import type { WebSearchContextSize } from "./WebSearchContextSize"; import type { WebSearchLocation } from "./WebSearchLocation"; -export type WebSearchToolConfig = { context_size: WebSearchContextSize | null, allowed_domains: Array | null, location: WebSearchLocation | null, }; +export type WebSearchToolConfig = { enabled: boolean | null, context_size: WebSearchContextSize | null, allowed_domains: Array | null, location: WebSearchLocation | null, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/WebSearchToolConfigValue.ts b/codex-rs/app-server-protocol/schema/typescript/WebSearchToolConfigValue.ts new file mode 100644 index 0000000000..9a5967fd17 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/WebSearchToolConfigValue.ts @@ -0,0 +1,6 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { WebSearchToolConfig } from "./WebSearchToolConfig"; + +export type WebSearchToolConfigValue = boolean | WebSearchToolConfig; diff --git a/codex-rs/app-server-protocol/schema/typescript/index.ts b/codex-rs/app-server-protocol/schema/typescript/index.ts index a1209c75bc..9228fcf758 100644 --- a/codex-rs/app-server-protocol/schema/typescript/index.ts +++ b/codex-rs/app-server-protocol/schema/typescript/index.ts @@ -231,4 +231,5 @@ export type { WebSearchItem } from "./WebSearchItem"; export type { WebSearchLocation } from "./WebSearchLocation"; export type { WebSearchMode } from "./WebSearchMode"; export type { WebSearchToolConfig } from "./WebSearchToolConfig"; +export type { WebSearchToolConfigValue } from "./WebSearchToolConfigValue"; export * as v2 from "./v2"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ToolsV2.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ToolsV2.ts index 784991f017..93fded5901 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ToolsV2.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ToolsV2.ts @@ -1,6 +1,6 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { WebSearchToolConfig } from "../WebSearchToolConfig"; +import type { WebSearchToolConfigValue } from "../WebSearchToolConfigValue"; -export type ToolsV2 = { web_search: WebSearchToolConfig | null, view_image: boolean | null, }; +export type ToolsV2 = { web_search: WebSearchToolConfigValue | null, view_image: boolean | null, }; diff --git a/codex-rs/app-server-protocol/src/protocol/v2.rs b/codex-rs/app-server-protocol/src/protocol/v2.rs index 5df54e73af..9db69af4b5 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -23,7 +23,7 @@ use codex_protocol::config_types::SandboxMode as CoreSandboxMode; use codex_protocol::config_types::ServiceTier; use codex_protocol::config_types::Verbosity; use codex_protocol::config_types::WebSearchMode; -use codex_protocol::config_types::WebSearchToolConfig; +use codex_protocol::config_types::WebSearchToolConfigValue; use codex_protocol::items::AgentMessageContent as CoreAgentMessageContent; use codex_protocol::items::TurnItem as CoreTurnItem; use codex_protocol::mcp::Resource as McpResource; @@ -498,7 +498,7 @@ pub struct SandboxWorkspaceWrite { #[serde(rename_all = "snake_case")] #[ts(export_to = "v2/")] pub struct ToolsV2 { - pub web_search: Option, + pub web_search: Option, pub view_image: Option, } diff --git a/codex-rs/app-server/README.md b/codex-rs/app-server/README.md index a680a94a2a..67d6099e49 100644 --- a/codex-rs/app-server/README.md +++ b/codex-rs/app-server/README.md @@ -171,7 +171,7 @@ Example with notification opt-out: - `mcpServerStatus/list` — enumerate configured MCP servers with their tools, resources, resource templates, and auth status; supports cursor+limit pagination. - `windowsSandbox/setupStart` — start Windows sandbox setup for the selected mode (`elevated` or `unelevated`); accepts an optional absolute `cwd` to target setup for a specific workspace, returns `{ started: true }` immediately, and later emits `windowsSandbox/setupCompleted`. - `feedback/upload` — submit a feedback report (classification + optional reason/logs, conversation_id, and optional `extraLogFiles` attachments array); returns the tracking thread id. -- `config/read` — fetch the effective config on disk after resolving config layering. +- `config/read` — fetch the effective config on disk after resolving config layering. In `tools`, `web_search` accepts either a boolean toggle or an object with `enabled` plus nested Responses web search options. - `externalAgentConfig/detect` — detect migratable external-agent artifacts with `includeHome` and optional `cwds`; each detected item includes `cwd` (`null` for home). - `externalAgentConfig/import` — apply selected external-agent migration items by passing explicit `migrationItems` with `cwd` (`null` for home). - `config/value/write` — write a single config key/value to the user's config.toml on disk. diff --git a/codex-rs/app-server/tests/suite/v2/config_rpc.rs b/codex-rs/app-server/tests/suite/v2/config_rpc.rs index 97f1e8dfd0..f826eaf5b2 100644 --- a/codex-rs/app-server/tests/suite/v2/config_rpc.rs +++ b/codex-rs/app-server/tests/suite/v2/config_rpc.rs @@ -26,6 +26,7 @@ use codex_protocol::config_types::TrustLevel; use codex_protocol::config_types::WebSearchContextSize; use codex_protocol::config_types::WebSearchLocation; use codex_protocol::config_types::WebSearchToolConfig; +use codex_protocol::config_types::WebSearchToolConfigValue; use codex_protocol::openai_models::ReasoningEffort; use codex_utils_absolute_path::AbsolutePathBuf; use pretty_assertions::assert_eq; @@ -131,11 +132,12 @@ view_image = false assert_eq!( tools, ToolsV2 { - web_search: Some(WebSearchToolConfig { + web_search: Some(WebSearchToolConfigValue::Config(WebSearchToolConfig { + enabled: None, context_size: Some(WebSearchContextSize::Low), allowed_domains: Some(vec!["example.com".to_string()]), location: None, - }), + })), view_image: Some(false), } ); @@ -203,7 +205,8 @@ location = { country = "US", city = "New York", timezone = "America/New_York" } assert_eq!( config.tools.expect("tools present").web_search, - Some(WebSearchToolConfig { + Some(WebSearchToolConfigValue::Config(WebSearchToolConfig { + enabled: None, context_size: Some(WebSearchContextSize::High), allowed_domains: Some(vec!["example.com".to_string()]), location: Some(WebSearchLocation { @@ -212,8 +215,61 @@ location = { country = "US", city = "New York", timezone = "America/New_York" } city: Some("New York".to_string()), timezone: Some("America/New_York".to_string()), }), + })), + ); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn config_read_includes_bool_web_search_toggle() -> Result<()> { + let codex_home = TempDir::new()?; + write_config( + &codex_home, + r#" +[tools] +web_search = false +"#, + )?; + let codex_home_path = codex_home.path().canonicalize()?; + let user_file = AbsolutePathBuf::try_from(codex_home_path.join("config.toml"))?; + + let mut mcp = McpProcess::new(codex_home.path()).await?; + timeout(DEFAULT_READ_TIMEOUT, mcp.initialize()).await??; + + let request_id = mcp + .send_config_read_request(ConfigReadParams { + include_layers: true, + cwd: None, + }) + .await?; + let resp: JSONRPCResponse = timeout( + DEFAULT_READ_TIMEOUT, + mcp.read_stream_until_response_message(RequestId::Integer(request_id)), + ) + .await??; + let ConfigReadResponse { + config, + origins, + layers, + } = to_response(resp)?; + + assert_eq!( + config.tools, + Some(ToolsV2 { + web_search: Some(WebSearchToolConfigValue::Enabled(false)), + view_image: None, }), ); + assert_eq!( + origins.get("tools.web_search").expect("origin").name, + ConfigLayerSource::User { + file: user_file.clone(), + } + ); + + let layers = layers.expect("layers present"); + assert_layers_user_then_optional_system(&layers, user_file)?; Ok(()) } diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.json index 338a34e591..8d159e2e8b 100644 --- a/codex-rs/core/config.schema.json +++ b/codex-rs/core/config.schema.json @@ -1504,10 +1504,11 @@ "web_search": { "allOf": [ { - "$ref": "#/definitions/WebSearchToolConfig" + "$ref": "#/definitions/WebSearchToolConfigValue" } ], - "default": null + "default": null, + "description": "Enable the native `web_search` tool with `true`/`false`, or provide a table with `enabled` and additional parameters." } }, "type": "object" @@ -1661,12 +1662,25 @@ "context_size": { "$ref": "#/definitions/WebSearchContextSize" }, + "enabled": { + "type": "boolean" + }, "location": { "$ref": "#/definitions/WebSearchLocation" } }, "type": "object" }, + "WebSearchToolConfigValue": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/WebSearchToolConfig" + } + ] + }, "WindowsSandboxModeToml": { "enum": [ "elevated", diff --git a/codex-rs/core/src/config/config_tests.rs b/codex-rs/core/src/config/config_tests.rs index 707566eb1c..ae23ce4cf9 100644 --- a/codex-rs/core/src/config/config_tests.rs +++ b/codex-rs/core/src/config/config_tests.rs @@ -14,6 +14,13 @@ use crate::config_loader::RequirementSource; use crate::features::Feature; use assert_matches::assert_matches; use codex_config::CONFIG_TOML_FILE; +use codex_protocol::config_types::WebSearchContextSize; +use codex_protocol::config_types::WebSearchFilters; +use codex_protocol::config_types::WebSearchLocation; +use codex_protocol::config_types::WebSearchToolConfig; +use codex_protocol::config_types::WebSearchToolConfigValue; +use codex_protocol::config_types::WebSearchUserLocation; +use codex_protocol::config_types::WebSearchUserLocationType; use codex_protocol::permissions::FileSystemAccessMode; use codex_protocol::permissions::FileSystemPath; use codex_protocol::permissions::FileSystemSandboxEntry; @@ -1374,6 +1381,142 @@ fn web_search_mode_disabled_overrides_legacy_request() { ); } +#[test] +fn web_search_config_reads_legacy_tools_web_search_table() { + let cfg = ConfigToml { + tools: Some(ToolsToml { + web_search: Some(WebSearchToolConfigValue::Config(WebSearchToolConfig { + enabled: None, + context_size: Some(WebSearchContextSize::High), + allowed_domains: Some(vec!["example.com".to_string()]), + location: Some(WebSearchLocation { + country: Some("US".to_string()), + region: None, + city: Some("New York".to_string()), + timezone: Some("America/New_York".to_string()), + }), + })), + view_image: None, + }), + ..Default::default() + }; + let profile = ConfigProfile::default(); + + assert_eq!( + resolve_web_search_config(&cfg, &profile), + Some(WebSearchConfig { + filters: Some(WebSearchFilters { + allowed_domains: Some(vec!["example.com".to_string()]), + }), + user_location: Some(WebSearchUserLocation { + r#type: WebSearchUserLocationType::Approximate, + country: Some("US".to_string()), + region: None, + city: Some("New York".to_string()), + timezone: Some("America/New_York".to_string()), + }), + search_context_size: Some(WebSearchContextSize::High), + }), + ); +} + +#[test] +fn web_search_config_profile_overrides_base_values() { + let cfg = ConfigToml { + tools: Some(ToolsToml { + web_search: Some(WebSearchToolConfigValue::Config(WebSearchToolConfig { + enabled: Some(true), + context_size: Some(WebSearchContextSize::Low), + allowed_domains: Some(vec!["example.com".to_string()]), + location: Some(WebSearchLocation { + country: Some("US".to_string()), + region: Some("CA".to_string()), + city: None, + timezone: Some("America/Los_Angeles".to_string()), + }), + })), + view_image: None, + }), + ..Default::default() + }; + let profile = ConfigProfile { + tools: Some(ToolsToml { + web_search: Some(WebSearchToolConfigValue::Config(WebSearchToolConfig { + enabled: None, + context_size: Some(WebSearchContextSize::High), + allowed_domains: None, + location: Some(WebSearchLocation { + country: None, + region: Some("NY".to_string()), + city: Some("New York".to_string()), + timezone: None, + }), + })), + view_image: None, + }), + ..Default::default() + }; + + assert_eq!( + resolve_web_search_config(&cfg, &profile), + Some(WebSearchConfig { + filters: Some(WebSearchFilters { + allowed_domains: Some(vec!["example.com".to_string()]), + }), + user_location: Some(WebSearchUserLocation { + r#type: WebSearchUserLocationType::Approximate, + country: Some("US".to_string()), + region: Some("NY".to_string()), + city: Some("New York".to_string()), + timezone: Some("America/Los_Angeles".to_string()), + }), + search_context_size: Some(WebSearchContextSize::High), + }), + ); +} + +#[test] +fn tools_toml_web_search_projection_uses_enabled_value() { + let tools = ToolsToml { + web_search: Some(WebSearchToolConfigValue::Config(WebSearchToolConfig { + enabled: Some(false), + context_size: None, + allowed_domains: None, + location: None, + })), + view_image: Some(true), + }; + + assert_eq!( + codex_app_server_protocol::Tools::from(tools), + codex_app_server_protocol::Tools { + web_search: Some(false), + view_image: Some(true), + }, + ); +} + +#[test] +fn tools_toml_web_search_projection_defaults_object_form_to_enabled() { + let tools = ToolsToml { + web_search: Some(WebSearchToolConfigValue::Config(WebSearchToolConfig { + enabled: None, + context_size: Some(WebSearchContextSize::Low), + allowed_domains: None, + location: None, + })), + view_image: None, + }; + + assert_eq!( + codex_app_server_protocol::Tools::from(tools), + codex_app_server_protocol::Tools { + web_search: Some(true), + view_image: None, + }, + ); +} + #[test] fn web_search_mode_for_turn_uses_preference_for_read_only() { let web_search_mode = Constrained::allow_any(WebSearchMode::Cached); diff --git a/codex-rs/core/src/config/mod.rs b/codex-rs/core/src/config/mod.rs index 41eaeabb92..b0da14b7a5 100644 --- a/codex-rs/core/src/config/mod.rs +++ b/codex-rs/core/src/config/mod.rs @@ -70,7 +70,7 @@ use codex_protocol::config_types::TrustLevel; use codex_protocol::config_types::Verbosity; use codex_protocol::config_types::WebSearchConfig; use codex_protocol::config_types::WebSearchMode; -use codex_protocol::config_types::WebSearchToolConfig; +use codex_protocol::config_types::WebSearchToolConfigValue; use codex_protocol::config_types::WindowsSandboxLevel; use codex_protocol::models::MacOsSeatbeltProfileExtensions; use codex_protocol::openai_models::ModelsResponse; @@ -1392,8 +1392,10 @@ pub struct RealtimeAudioToml { #[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq, JsonSchema)] #[schemars(deny_unknown_fields)] pub struct ToolsToml { + /// Enable the native `web_search` tool with `true`/`false`, or provide a + /// table with `enabled` and additional parameters. #[serde(default)] - pub web_search: Option, + pub web_search: Option, /// Enable the `view_image` tool that lets the agent attach local images. #[serde(default)] @@ -1457,7 +1459,7 @@ pub struct AgentRoleToml { impl From for Tools { fn from(tools_toml: ToolsToml) -> Self { Self { - web_search: tools_toml.web_search.is_some().then_some(true), + web_search: tools_toml.web_search.map(|web_search| web_search.enabled()), view_image: tools_toml.view_image, } } @@ -1756,11 +1758,13 @@ fn resolve_web_search_config( let base = config_toml .tools .as_ref() - .and_then(|tools| tools.web_search.as_ref()); + .and_then(|tools| tools.web_search.as_ref()) + .and_then(WebSearchToolConfigValue::as_config); let profile = config_profile .tools .as_ref() - .and_then(|tools| tools.web_search.as_ref()); + .and_then(|tools| tools.web_search.as_ref()) + .and_then(WebSearchToolConfigValue::as_config); match (base, profile) { (None, None) => None, diff --git a/codex-rs/protocol/src/config_types.rs b/codex-rs/protocol/src/config_types.rs index 4261bb8d1d..9a32a7d25a 100644 --- a/codex-rs/protocol/src/config_types.rs +++ b/codex-rs/protocol/src/config_types.rs @@ -145,14 +145,39 @@ impl WebSearchLocation { #[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, JsonSchema, TS)] #[schemars(deny_unknown_fields)] pub struct WebSearchToolConfig { + pub enabled: Option, pub context_size: Option, pub allowed_domains: Option>, pub location: Option, } +#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(untagged)] +pub enum WebSearchToolConfigValue { + Enabled(bool), + Config(WebSearchToolConfig), +} + +impl WebSearchToolConfigValue { + pub fn enabled(&self) -> bool { + match self { + Self::Enabled(enabled) => *enabled, + Self::Config(config) => config.enabled.unwrap_or(true), + } + } + + pub fn as_config(&self) -> Option<&WebSearchToolConfig> { + match self { + Self::Enabled(_) => None, + Self::Config(config) => Some(config), + } + } +} + impl WebSearchToolConfig { pub fn merge(&self, other: &Self) -> Self { Self { + enabled: other.enabled.or(self.enabled), context_size: other.context_size.or(self.context_size), allowed_domains: other .allowed_domains @@ -511,6 +536,7 @@ mod tests { #[test] fn web_search_tool_config_merge_prefers_overlay_values() { let base = WebSearchToolConfig { + enabled: Some(true), context_size: Some(WebSearchContextSize::Low), allowed_domains: Some(vec!["openai.com".to_string()]), location: Some(WebSearchLocation { @@ -521,6 +547,7 @@ mod tests { }), }; let overlay = WebSearchToolConfig { + enabled: Some(false), context_size: Some(WebSearchContextSize::High), allowed_domains: None, location: Some(WebSearchLocation { @@ -532,6 +559,7 @@ mod tests { }; let expected = WebSearchToolConfig { + enabled: Some(false), context_size: Some(WebSearchContextSize::High), allowed_domains: Some(vec!["openai.com".to_string()]), location: Some(WebSearchLocation { @@ -544,4 +572,16 @@ mod tests { assert_eq!(expected, base.merge(&overlay)); } + + #[test] + fn web_search_tool_config_value_defaults_object_form_to_enabled() { + let config_value = WebSearchToolConfigValue::Config(WebSearchToolConfig { + enabled: None, + context_size: Some(WebSearchContextSize::Low), + allowed_domains: None, + location: None, + }); + + assert_eq!(config_value.enabled(), true); + } }