From bcb5b8f7034826ba9b3b467d2ed999aab535322f Mon Sep 17 00:00:00 2001 From: Sayan Sisodiya Date: Wed, 4 Mar 2026 19:05:54 -0800 Subject: [PATCH] fix --- codex-rs/core/src/tools/spec.rs | 3 ++- codex-rs/core/tests/suite/web_search.rs | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/codex-rs/core/src/tools/spec.rs b/codex-rs/core/src/tools/spec.rs index f9666dbbff..67cdfedff1 100644 --- a/codex-rs/core/src/tools/spec.rs +++ b/codex-rs/core/src/tools/spec.rs @@ -96,6 +96,7 @@ impl ToolsConfig { features.enabled(Feature::ImageGeneration) && supports_image_generation(model_info); let include_agent_jobs = include_collab_tools && features.enabled(Feature::Sqlite); let request_permission_enabled = features.enabled(Feature::RequestPermissions); + let include_web_search_image_support = features.enabled(Feature::WebSearchImageSupport); let shell_command_backend = if features.enabled(Feature::ShellTool) && features.enabled(Feature::ShellZshFork) { ShellCommandBackendConfig::ZshFork @@ -143,7 +144,7 @@ impl ToolsConfig { allow_login_shell: true, apply_patch_tool_type, web_search_mode: *web_search_mode, - web_search_image_support: features.enabled(Feature::WebSearchImageSupport), + web_search_image_support: include_web_search_image_support, image_gen_tool: include_image_gen_tool, agent_roles: BTreeMap::new(), search_tool: include_search_tool, diff --git a/codex-rs/core/tests/suite/web_search.rs b/codex-rs/core/tests/suite/web_search.rs index 367276c5c6..5fc20a29ce 100644 --- a/codex-rs/core/tests/suite/web_search.rs +++ b/codex-rs/core/tests/suite/web_search.rs @@ -238,7 +238,10 @@ async fn web_search_image_support_feature_sets_content_types() { let mut builder = test_codex() .with_model("gpt-5-codex") .with_config(|config| { - config.features.enable(Feature::WebSearchImageSupport); + config + .features + .enable(Feature::WebSearchImageSupport) + .expect("test feature should satisfy constraints"); config .web_search_mode .set(WebSearchMode::Cached)