Lightweight coding agent that runs in your terminal
Rust
Consolidate search_tool feature into apps (#11509)
Anton Panasenkod3b078c2822c
diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rsindex 4696d9d15e..fcf7a24e35 100644--- a/codex-rs/core/src/codex.rs+++ b/codex-rs/core/src/codex.rs@@ -4400,7 +4400,7 @@ async fn built_tools(None};- if turn_context.config.features.enabled(Feature::SearchTool) {+ if turn_context.config.features.enabled(Feature::Apps) {let mut selected_mcp_tools =if let Some(selected_tools) = sess.get_mcp_tool_selection().await {filter_mcp_tools_by_name(mcp_tools.clone(), &selected_tools)diff --git a/codex-rs/core/src/features.rs b/codex-rs/core/src/features.rsindex 56aa288133..4a64d81f89 100644--- a/codex-rs/core/src/features.rs+++ b/codex-rs/core/src/features.rs@@ -89,7 +89,7 @@ pub enum Feature {/// Allow the model to request web searches that fetch cached content./// Takes precedence over `WebSearchRequest`.WebSearchCached,- /// Allow the model to search MCP tools via BM25 before exposing them.+ /// Legacy search-tool feature flag kept for backward compatibility.SearchTool,/// Use the bubblewrap-based Linux sandbox pipeline.UseLinuxSandboxBwrap,@@ -445,7 +445,7 @@ pub const FEATURES: &[FeatureSpec] = &[FeatureSpec {id: Feature::SearchTool,key: "search_tool",- stage: Stage::UnderDevelopment,+ stage: Stage::Removed,default_enabled: false,},// Experimental program. Rendered in the `/experimental` menu for users.diff --git a/codex-rs/core/src/tools/spec.rs b/codex-rs/core/src/tools/spec.rsindex 80fd103b2f..098f640690 100644--- a/codex-rs/core/src/tools/spec.rs+++ b/codex-rs/core/src/tools/spec.rs@@ -58,7 +58,7 @@ impl ToolsConfig {let include_collab_tools = features.enabled(Feature::Collab);let include_collaboration_modes_tools = features.enabled(Feature::CollaborationModes);let request_rule_enabled = features.enabled(Feature::RequestRule);- let include_search_tool = features.enabled(Feature::SearchTool);+ let include_search_tool = features.enabled(Feature::Apps);let shell_type = if !features.enabled(Feature::ShellTool) {ConfigShellToolType::Disableddiff --git a/codex-rs/core/tests/suite/search_tool.rs b/codex-rs/core/tests/suite/search_tool.rsindex fae5956168..c819c03b25 100644--- a/codex-rs/core/tests/suite/search_tool.rs+++ b/codex-rs/core/tests/suite/search_tool.rs@@ -111,7 +111,7 @@ async fn search_tool_flag_adds_tool() -> Result<()> {.await;let mut builder = test_codex().with_config(|config| {- config.features.enable(Feature::SearchTool);+ config.features.enable(Feature::Apps);});let test = builder.build(&server).await?;@@ -148,7 +148,7 @@ async fn search_tool_adds_developer_instructions() -> Result<()> {.await;let mut builder = test_codex().with_config(|config| {- config.features.enable(Feature::SearchTool);+ config.features.enable(Feature::Apps);});let test = builder.build(&server).await?;@@ -190,7 +190,7 @@ async fn search_tool_hides_mcp_tools_without_search() -> Result<()> {let rmcp_test_server_bin = stdio_server_bin()?;let mut builder = test_codex().with_config(move |config| {- config.features.enable(Feature::SearchTool);+ config.features.enable(Feature::Apps);let mut servers = config.mcp_servers.get().clone();servers.insert("rmcp".to_string(),@@ -273,7 +273,7 @@ async fn search_tool_selection_persists_within_turn_and_resets_next_turn() -> Relet rmcp_test_server_bin = stdio_server_bin()?;let mut builder = test_codex().with_config(move |config| {- config.features.enable(Feature::SearchTool);+ config.features.enable(Feature::Apps);let mut servers = config.mcp_servers.get().clone();servers.insert("rmcp".to_string(),@@ -401,7 +401,7 @@ async fn search_tool_selection_unions_results_within_turn() -> Result<()> {let rmcp_test_server_bin = stdio_server_bin()?;let mut builder = test_codex().with_config(move |config| {- config.features.enable(Feature::SearchTool);+ config.features.enable(Feature::Apps);let mut servers = config.mcp_servers.get().clone();servers.insert("rmcp".to_string(),