Remove ToolSearch feature toggle (#23389)

## Summary
- mark `ToolSearch` as removed and ignore stale config writes for its
legacy key
- make search tool exposure depend only on model capability, not a
feature toggle
- remove app-server enablement support and prune now-obsolete test
coverage/setup

## Verification
- `cargo test -p codex-features`
- `cargo test -p codex-tools`
- `cargo test -p codex-core search_tool_requires_model_capability`
- `cargo test -p codex-app-server experimental_feature_enablement_set_`

## Notes
- This keeps the legacy config key as a no-op for compatibility while
removing the ability to toggle the behavior off cleanly.
- No developer-facing docs update outside the touched app-server README
was needed.
This commit is contained in:
sayan-oai
2026-05-19 01:24:39 +00:00
committed by GitHub
parent 6b54ced108
commit daa11820b0
10 changed files with 17 additions and 115 deletions
+6 -3
View File
@@ -132,7 +132,7 @@ pub enum Feature {
EnableMcpApps,
/// Use the new path for the host-owned apps MCP server.
AppsMcpPathOverride,
/// Enable the tool_search tool for apps.
/// Removed compatibility flag retained as a no-op now that tool_search is always enabled.
ToolSearch,
/// Always defer MCP tools behind tool_search instead of exposing small sets directly.
ToolSearchAlwaysDeferMcpTools,
@@ -428,6 +428,9 @@ impl Features {
"apply_patch_freeform" => {
continue;
}
"tool_search" => {
continue;
}
"image_detail_original" => {
continue;
}
@@ -946,8 +949,8 @@ pub const FEATURES: &[FeatureSpec] = &[
FeatureSpec {
id: Feature::ToolSearch,
key: "tool_search",
stage: Stage::Stable,
default_enabled: true,
stage: Stage::Removed,
default_enabled: false,
},
FeatureSpec {
id: Feature::ToolSearchAlwaysDeferMcpTools,
+4 -4
View File
@@ -188,9 +188,10 @@ fn network_proxy_is_experimental_and_disabled_by_default() {
}
#[test]
fn tool_search_is_stable_and_enabled_by_default() {
assert_eq!(Feature::ToolSearch.stage(), Stage::Stable);
assert_eq!(Feature::ToolSearch.default_enabled(), true);
fn tool_search_is_removed_and_disabled_by_default() {
assert_eq!(Feature::ToolSearch.stage(), Stage::Removed);
assert_eq!(Feature::ToolSearch.default_enabled(), false);
assert_eq!(feature_for_key("tool_search"), Some(Feature::ToolSearch));
}
#[test]
@@ -603,7 +604,6 @@ fn materialize_resolved_enabled_writes_all_features_and_preserves_custom_config(
features.enable(Feature::CodeMode);
features.enable(Feature::MultiAgentV2);
features.enable(Feature::NetworkProxy);
features.disable(Feature::ToolSearch);
let mut features_toml = FeaturesToml {
multi_agent_v2: Some(FeatureToml::Config(crate::MultiAgentV2ConfigToml {