mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-06-23 01:36:47 +08:00
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:
@@ -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")
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user