Consolidate search_tool feature into apps (#11509)

## Summary
- Remove `Feature::SearchTool` and the `search_tool` config key from the
feature registry/schema.
- Gate `search_tool_bm25` exposure via `Feature::Apps` in
`core/src/tools/spec.rs`.
- Update MCP selection logic in `core/src/codex.rs` to use
`Feature::Apps` for search-tool behavior.
- Update `core/tests/suite/search_tool.rs` to enable `Feature::Apps`.
- Regenerate `core/config.schema.json` via `just write-config-schema`.

## Testing
- `just fmt`
- `cargo test -p codex-core --test all suite::search_tool::`

## Tickets
- None
This commit is contained in:
Anton Panasenko
2026-02-11 16:52:42 -08:00
committed by GitHub
parent fd1efb86df
commit d3b078c282
4 changed files with 9 additions and 9 deletions

View File

@@ -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)

View File

@@ -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.

View File

@@ -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::Disabled

View File

@@ -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() -> Re
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(),
@@ -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(),