Add gpt-5.1 model definitions (#6551)

This commit is contained in:
pakrym-oai
2025-11-12 12:44:36 -08:00
committed by GitHub
parent ad09c138b9
commit ec69a4a810
6 changed files with 385 additions and 2 deletions

View File

@@ -128,4 +128,32 @@ async fn model_selects_expected_tools() {
],
"gpt-5-codex should expose the apply_patch tool",
);
let gpt51_codex_tools = collect_tool_identifiers_for_model("gpt-5.1-codex").await;
assert_eq!(
gpt51_codex_tools,
vec![
"shell".to_string(),
"list_mcp_resources".to_string(),
"list_mcp_resource_templates".to_string(),
"read_mcp_resource".to_string(),
"update_plan".to_string(),
"apply_patch".to_string()
],
"gpt-5-codex should expose the apply_patch tool",
);
let gpt51_tools = collect_tool_identifiers_for_model("gpt-5-codex").await;
assert_eq!(
gpt51_tools,
vec![
"shell".to_string(),
"list_mcp_resources".to_string(),
"list_mcp_resource_templates".to_string(),
"read_mcp_resource".to_string(),
"update_plan".to_string(),
"apply_patch".to_string()
],
"gpt-5-codex should expose the apply_patch tool",
);
}

View File

@@ -233,6 +233,18 @@ async fn prompt_tools_are_consistent_across_requests() {
"view_image",
],
),
(
"gpt-5.1",
vec![
"shell",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
"update_plan",
"apply_patch",
"view_image",
],
),
(
"gpt-5-codex",
vec![
@@ -245,6 +257,18 @@ async fn prompt_tools_are_consistent_across_requests() {
"view_image",
],
),
(
"gpt-5.1-codex",
vec![
"shell",
"list_mcp_resources",
"list_mcp_resource_templates",
"read_mcp_resource",
"update_plan",
"apply_patch",
"view_image",
],
),
]);
let expected_tools_names = tools_by_model
.get(OPENAI_DEFAULT_MODEL)