feat(api): add "max" reasoning depth and service_tiers to Codex client models

- Introduced a new "max" level for reasoning depth in Codex client model configuration, providing maximum problem-solving capability.
- Added `service_tiers` field to model responses for better tier categorization.
- Updated unit tests to validate the inclusion and default behavior of `service_tiers` and the new "max" reasoning depth.
This commit is contained in:
Luis Pater
2026-06-20 22:49:26 +08:00
parent eb8d0d0684
commit bb414de33f
2 changed files with 8 additions and 0 deletions

View File

@@ -531,6 +531,10 @@ func TestModelsWithClientVersionReturnsCodexCatalog(t *testing.T) {
if got, _ := custom["prefer_websockets"].(bool); got {
t.Fatalf("custom prefer_websockets = %v, want false", custom["prefer_websockets"])
}
customServiceTiers, ok := custom["service_tiers"].([]any)
if !ok || len(customServiceTiers) != 0 {
t.Fatalf("expected custom model service_tiers = [], got %#v", custom["service_tiers"])
}
if _, ok := custom["apply_patch_tool_type"]; ok {
t.Fatal("expected custom model to omit apply_patch_tool_type")
}

View File

@@ -26,6 +26,7 @@ var codexClientAllowedReasoningLevels = map[string]struct{}{
"medium": {},
"high": {},
"xhigh": {},
"max": {},
}
func (h *OpenAIAPIHandler) codexClientModelsResponse() map[string]any {
@@ -132,6 +133,7 @@ func applyCodexClientModelMetadata(entry map[string]any, id string, model map[st
entry["description"] = description
entry["priority"] = 100
entry["prefer_websockets"] = false
entry["service_tiers"] = []any{}
delete(entry, "apply_patch_tool_type")
delete(entry, "upgrade")
delete(entry, "availability_nux")
@@ -249,6 +251,8 @@ func codexClientReasoningDescription(level string) string {
return "Greater reasoning depth for complex problems"
case "xhigh":
return "Extra high reasoning depth for complex problems"
case "max":
return "Maximum available reasoning depth for complex problems"
default:
return level
}