Update ToolSearch to be enabled by default (#17854)

## Summary
- Promote `Feature::ToolSearch` to `Stable` and enable it in the default
feature set
- Update feature tests and tool registry coverage to match the new
default
- Adjust the search-tool integration test to assert the default-on path
and explicit disable fallback

## Testing
- `just fmt`
- `cargo test -p codex-features`
- `cargo test -p codex-core --test all search_tool`
- `cargo test -p codex-tools`
This commit is contained in:
Matthew Zeng
2026-04-15 22:01:05 -07:00
committed by GitHub
parent bd61737e8a
commit 77fe33bf72
4 changed files with 19 additions and 15 deletions
@@ -1334,7 +1334,7 @@ fn search_tool_description_lists_each_mcp_source_once() {
}
#[test]
fn search_tool_requires_model_capability_and_feature_flag() {
fn search_tool_requires_model_capability_and_enabled_feature() {
let model_info = search_capable_model_info();
let deferred_mcp_tools = Some(vec![deferred_mcp_tool(
"_create_event",
@@ -1367,10 +1367,12 @@ fn search_tool_requires_model_capability_and_feature_flag() {
);
assert_lacks_tool_name(&tools, TOOL_SEARCH_TOOL_NAME);
let mut features_without_tool_search = Features::with_defaults();
features_without_tool_search.disable(Feature::ToolSearch);
let tools_config = ToolsConfig::new(&ToolsConfigParams {
model_info: &model_info,
available_models: &available_models,
features: &features,
features: &features_without_tool_search,
image_generation_tool_auth_allowed: true,
web_search_mode: Some(WebSearchMode::Cached),
session_source: SessionSource::Cli,
@@ -1385,8 +1387,6 @@ fn search_tool_requires_model_capability_and_feature_flag() {
);
assert_lacks_tool_name(&tools, TOOL_SEARCH_TOOL_NAME);
let mut features = Features::with_defaults();
features.enable(Feature::ToolSearch);
let tools_config = ToolsConfig::new(&ToolsConfigParams {
model_info: &model_info,
available_models: &available_models,