mirror of
https://github.com/openai/codex.git
synced 2026-04-29 00:55:38 +00:00
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:
@@ -93,7 +93,7 @@ fn tool_search_output_tools(request: &ResponsesRequest, call_id: &str) -> Vec<Va
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
fn configure_apps_without_tool_search(config: &mut Config, apps_base_url: &str) {
|
||||
fn configure_search_capable_apps(config: &mut Config, apps_base_url: &str) {
|
||||
config
|
||||
.features
|
||||
.enable(Feature::Apps)
|
||||
@@ -112,14 +112,18 @@ fn configure_apps_without_tool_search(config: &mut Config, apps_base_url: &str)
|
||||
config.model_catalog = Some(model_catalog);
|
||||
}
|
||||
|
||||
fn configure_apps(config: &mut Config, apps_base_url: &str) {
|
||||
configure_apps_without_tool_search(config, apps_base_url);
|
||||
fn configure_apps_without_tool_search(config: &mut Config, apps_base_url: &str) {
|
||||
configure_search_capable_apps(config, apps_base_url);
|
||||
config
|
||||
.features
|
||||
.enable(Feature::ToolSearch)
|
||||
.disable(Feature::ToolSearch)
|
||||
.expect("test config should allow feature update");
|
||||
}
|
||||
|
||||
fn configure_apps(config: &mut Config, apps_base_url: &str) {
|
||||
configure_search_capable_apps(config, apps_base_url);
|
||||
}
|
||||
|
||||
fn configured_builder(apps_base_url: String) -> TestCodexBuilder {
|
||||
test_codex()
|
||||
.with_auth(CodexAuth::create_dummy_chatgpt_auth_for_testing())
|
||||
@@ -127,7 +131,7 @@ fn configured_builder(apps_base_url: String) -> TestCodexBuilder {
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn search_tool_flag_adds_tool_search() -> Result<()> {
|
||||
async fn search_tool_enabled_by_default_adds_tool_search() -> Result<()> {
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let server = start_mock_server().await;
|
||||
@@ -185,7 +189,7 @@ async fn search_tool_flag_adds_tool_search() -> Result<()> {
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn tool_search_disabled_by_default_exposes_apps_tools_directly() -> Result<()> {
|
||||
async fn tool_search_disabled_exposes_apps_tools_directly() -> Result<()> {
|
||||
skip_if_no_network!(Ok(()));
|
||||
|
||||
let server = start_mock_server().await;
|
||||
|
||||
Reference in New Issue
Block a user