feat: land unified_exec (#10641)

Land `unified_exec` for all non-windows OS
This commit is contained in:
jif-oai
2026-02-04 16:39:41 +00:00
committed by GitHub
Unverified
parent 0efd33f7f4
commit 49dd67a260
5 changed files with 118 additions and 82 deletions
+4 -4
View File
@@ -3862,7 +3862,7 @@ model_verbosity = "high"
forced_login_method: None,
include_apply_patch_tool: false,
web_search_mode: None,
use_experimental_unified_exec_tool: false,
use_experimental_unified_exec_tool: !cfg!(windows),
ghost_snapshot: GhostSnapshotConfig::default(),
features: Features::with_defaults(),
suppress_unstable_features_warning: false,
@@ -3947,7 +3947,7 @@ model_verbosity = "high"
forced_login_method: None,
include_apply_patch_tool: false,
web_search_mode: None,
use_experimental_unified_exec_tool: false,
use_experimental_unified_exec_tool: !cfg!(windows),
ghost_snapshot: GhostSnapshotConfig::default(),
features: Features::with_defaults(),
suppress_unstable_features_warning: false,
@@ -4047,7 +4047,7 @@ model_verbosity = "high"
forced_login_method: None,
include_apply_patch_tool: false,
web_search_mode: None,
use_experimental_unified_exec_tool: false,
use_experimental_unified_exec_tool: !cfg!(windows),
ghost_snapshot: GhostSnapshotConfig::default(),
features: Features::with_defaults(),
suppress_unstable_features_warning: false,
@@ -4133,7 +4133,7 @@ model_verbosity = "high"
forced_login_method: None,
include_apply_patch_tool: false,
web_search_mode: None,
use_experimental_unified_exec_tool: false,
use_experimental_unified_exec_tool: !cfg!(windows),
ghost_snapshot: GhostSnapshotConfig::default(),
features: Features::with_defaults(),
suppress_unstable_features_warning: false,
+6 -10
View File
@@ -406,6 +406,12 @@ pub const FEATURES: &[FeatureSpec] = &[
stage: Stage::Stable,
default_enabled: true,
},
FeatureSpec {
id: Feature::UnifiedExec,
key: "unified_exec",
stage: Stage::Stable,
default_enabled: !cfg!(windows),
},
FeatureSpec {
id: Feature::WebSearchRequest,
key: "web_search_request",
@@ -419,16 +425,6 @@ pub const FEATURES: &[FeatureSpec] = &[
default_enabled: false,
},
// Experimental program. Rendered in the `/experimental` menu for users.
FeatureSpec {
id: Feature::UnifiedExec,
key: "unified_exec",
stage: Stage::Experimental {
name: "Background terminal",
menu_description: "Run long-running terminal commands in the background.",
announcement: "NEW! Try Background terminals for long-running commands. Enable in /experimental!",
},
default_enabled: false,
},
FeatureSpec {
id: Feature::ShellSnapshot,
key: "shell_snapshot",
+28 -12
View File
@@ -1687,6 +1687,22 @@ mod tests {
assert_eq!(&tool_names, &expected_tools,);
}
fn assert_default_model_tools(
model_slug: &str,
features: &Features,
web_search_mode: Option<WebSearchMode>,
shell_tool: &'static str,
expected_tail: &[&str],
) {
let mut expected = if features.enabled(Feature::UnifiedExec) {
vec!["exec_command", "write_stdin"]
} else {
vec![shell_tool]
};
expected.extend(expected_tail);
assert_model_tools(model_slug, features, web_search_mode, &expected);
}
#[test]
fn web_search_mode_cached_sets_external_web_access_false() {
let config = test_config();
@@ -1735,12 +1751,12 @@ mod tests {
fn test_build_specs_gpt5_codex_default() {
let mut features = Features::with_defaults();
features.enable(Feature::CollaborationModes);
assert_model_tools(
assert_default_model_tools(
"gpt-5-codex",
&features,
Some(WebSearchMode::Cached),
"shell_command",
&[
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
@@ -1757,12 +1773,12 @@ mod tests {
fn test_build_specs_gpt51_codex_default() {
let mut features = Features::with_defaults();
features.enable(Feature::CollaborationModes);
assert_model_tools(
assert_default_model_tools(
"gpt-5.1-codex",
&features,
Some(WebSearchMode::Cached),
"shell_command",
&[
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
@@ -1827,12 +1843,12 @@ mod tests {
fn test_codex_mini_defaults() {
let mut features = Features::with_defaults();
features.enable(Feature::CollaborationModes);
assert_model_tools(
assert_default_model_tools(
"codex-mini-latest",
&features,
Some(WebSearchMode::Cached),
"local_shell",
&[
"local_shell",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
@@ -1848,12 +1864,12 @@ mod tests {
fn test_codex_5_1_mini_defaults() {
let mut features = Features::with_defaults();
features.enable(Feature::CollaborationModes);
assert_model_tools(
assert_default_model_tools(
"gpt-5.1-codex-mini",
&features,
Some(WebSearchMode::Cached),
"shell_command",
&[
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
@@ -1870,12 +1886,12 @@ mod tests {
fn test_gpt_5_defaults() {
let mut features = Features::with_defaults();
features.enable(Feature::CollaborationModes);
assert_model_tools(
assert_default_model_tools(
"gpt-5",
&features,
Some(WebSearchMode::Cached),
"shell",
&[
"shell",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
@@ -1891,12 +1907,12 @@ mod tests {
fn test_gpt_5_1_defaults() {
let mut features = Features::with_defaults();
features.enable(Feature::CollaborationModes);
assert_model_tools(
assert_default_model_tools(
"gpt-5.1",
&features,
Some(WebSearchMode::Cached),
"shell_command",
&[
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",