fix: --search shouldn't show deprecation message (#6180)

Use the new feature flags instead of the old config.
This commit is contained in:
Ahmed Ibrahim
2025-11-03 16:11:50 -08:00
committed by GitHub
parent 1e0e553304
commit e658c6c73b
4 changed files with 20 additions and 5 deletions

View File

@@ -94,7 +94,7 @@ use std::io::Write as _;
// (tests access modules directly within the crate)
pub async fn run_main(
cli: Cli,
mut cli: Cli,
codex_linux_sandbox_exe: Option<PathBuf>,
) -> std::io::Result<AppExitInfo> {
let (sandbox_mode, approval_policy) = if cli.full_auto {
@@ -114,6 +114,13 @@ pub async fn run_main(
)
};
// Map the legacy --search flag to the new feature toggle.
if cli.web_search {
cli.config_overrides
.raw_overrides
.push("features.web_search_request=true".to_string());
}
// When using `--oss`, let the bootstrapper pick the model (defaulting to
// gpt-oss:20b) and ensure it is present locally. Also, force the builtin
// `oss` model provider.
@@ -149,7 +156,7 @@ pub async fn run_main(
compact_prompt: None,
include_apply_patch_tool: None,
show_raw_agent_reasoning: cli.oss.then_some(true),
tools_web_search_request: cli.web_search.then_some(true),
tools_web_search_request: None,
experimental_sandbox_command_assessment: None,
additional_writable_roots: additional_dirs,
};