chore(config) enable shell_command (#6843)

## Summary
Enables shell_command as default for `gpt-5*` and `codex-*` models.

## Testing
- [x] Updated unit tests
This commit is contained in:
Dylan Hurd 2025-11-18 12:46:02 -08:00 committed by GitHub
parent 4bada5a84d
commit 29ca89c414
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 35 deletions

View file

@ -149,6 +149,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {
"test_sync_tool".to_string(),
],
supports_parallel_tool_calls: true,
shell_type: ConfigShellToolType::ShellCommand,
support_verbosity: true,
truncation_policy: TruncationPolicy::Tokens(10_000),
)
@ -166,7 +167,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {
"list_dir".to_string(),
"read_file".to_string(),
],
shell_type: if cfg!(windows) { ConfigShellToolType::ShellCommand } else { ConfigShellToolType::Default },
shell_type: ConfigShellToolType::ShellCommand,
supports_parallel_tool_calls: true,
support_verbosity: true,
truncation_policy: TruncationPolicy::Tokens(10_000),
@ -183,7 +184,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {
reasoning_summary_format: ReasoningSummaryFormat::Experimental,
base_instructions: GPT_5_CODEX_INSTRUCTIONS.to_string(),
apply_patch_tool_type: Some(ApplyPatchToolType::Freeform),
shell_type: if cfg!(windows) { ConfigShellToolType::ShellCommand } else { ConfigShellToolType::Default },
shell_type: ConfigShellToolType::ShellCommand,
supports_parallel_tool_calls: true,
support_verbosity: false,
truncation_policy: TruncationPolicy::Tokens(10_000),
@ -198,6 +199,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {
base_instructions: GPT_5_1_INSTRUCTIONS.to_string(),
default_reasoning_effort: Some(ReasoningEffort::Medium),
truncation_policy: TruncationPolicy::Bytes(10_000),
shell_type: ConfigShellToolType::ShellCommand,
supports_parallel_tool_calls: true,
)
} else if slug.starts_with("gpt-5") {
@ -205,6 +207,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {
slug, "gpt-5",
supports_reasoning_summaries: true,
needs_special_apply_patch_instructions: true,
shell_type: ConfigShellToolType::ShellCommand,
support_verbosity: true,
truncation_policy: TruncationPolicy::Bytes(10_000),
)

View file

@ -1292,11 +1292,7 @@ mod tests {
"gpt-5-codex",
&Features::with_defaults(),
&[
if cfg!(windows) {
"shell_command"
} else {
"shell"
},
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
@ -1313,11 +1309,7 @@ mod tests {
"gpt-5.1-codex",
&Features::with_defaults(),
&[
if cfg!(windows) {
"shell_command"
} else {
"shell"
},
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
@ -1392,11 +1384,7 @@ mod tests {
"gpt-5.1-codex-mini",
&Features::with_defaults(),
&[
if cfg!(windows) {
"shell_command"
} else {
"shell"
},
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
@ -1413,7 +1401,7 @@ mod tests {
"gpt-5.1",
&Features::with_defaults(),
&[
"shell",
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",

View file

@ -119,12 +119,7 @@ async fn model_selects_expected_tools() {
assert_eq!(
gpt5_codex_tools,
vec![
if cfg!(windows) {
"shell_command"
} else {
"shell"
}
.to_string(),
"shell_command".to_string(),
"list_mcp_resources".to_string(),
"list_mcp_resource_templates".to_string(),
"read_mcp_resource".to_string(),
@ -138,12 +133,7 @@ async fn model_selects_expected_tools() {
assert_eq!(
gpt51_codex_tools,
vec![
if cfg!(windows) {
"shell_command"
} else {
"shell"
}
.to_string(),
"shell_command".to_string(),
"list_mcp_resources".to_string(),
"list_mcp_resource_templates".to_string(),
"read_mcp_resource".to_string(),
@ -157,7 +147,7 @@ async fn model_selects_expected_tools() {
assert_eq!(
gpt51_tools,
vec![
"shell".to_string(),
"shell_command".to_string(),
"list_mcp_resources".to_string(),
"list_mcp_resource_templates".to_string(),
"read_mcp_resource".to_string(),

View file

@ -162,7 +162,7 @@ async fn prompt_tools_are_consistent_across_requests() -> anyhow::Result<()> {
(
"gpt-5.1",
vec![
"shell",
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
@ -173,7 +173,7 @@ async fn prompt_tools_are_consistent_across_requests() -> anyhow::Result<()> {
(
"gpt-5.1",
vec![
"shell",
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
@ -185,7 +185,7 @@ async fn prompt_tools_are_consistent_across_requests() -> anyhow::Result<()> {
(
"gpt-5.1-codex",
vec![
"shell",
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
@ -197,7 +197,7 @@ async fn prompt_tools_are_consistent_across_requests() -> anyhow::Result<()> {
(
"gpt-5.1-codex",
vec![
"shell",
"shell_command",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",