codex: omit patch tool type (#16231)

Including this value can cause schema compatibility issues. It was removed from codex in a new version.
This commit is contained in:
Bruce MacDonald
2026-05-19 13:37:05 -07:00
committed by GitHub
parent 56b319f457
commit e6b1d751f2
2 changed files with 4 additions and 2 deletions
-1
View File
@@ -638,7 +638,6 @@ func buildCodexModelEntry(modelName string) map[string]any {
"slug": modelName,
"display_name": modelName,
"context_window": contextWindow,
"apply_patch_tool_type": "function",
"shell_type": "default",
"visibility": "list",
"supported_in_api": true,
+4 -1
View File
@@ -639,12 +639,15 @@ func TestBuildCodexModelEntryContextWindow(t *testing.T) {
}
}
requiredKeys := []string{"slug", "display_name", "apply_patch_tool_type", "shell_type"}
requiredKeys := []string{"slug", "display_name", "shell_type"}
for _, key := range requiredKeys {
if _, ok := entry[key]; !ok {
t.Errorf("missing required key %q", key)
}
}
if _, ok := entry["apply_patch_tool_type"]; ok {
t.Error("apply_patch_tool_type should be omitted so Codex CLI defaults can handle schema changes")
}
if _, err := json.Marshal(entry); err != nil {
t.Errorf("entry is not JSON serializable: %v", err)