Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions internal/api/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2144,6 +2144,7 @@ func TestModelsWithClientVersionReturnsCodexCatalog(t *testing.T) {
MaxCompletionTokens: 64000,
Thinking: &registry.ThinkingSupport{Levels: []string{"low", "medium", "high", "xhigh"}},
},
{ID: "gpt-6.2-astra", Object: "model", OwnedBy: "openai", Type: "openai", DisplayName: "GPT 6.2 Astra"},
{
ID: "custom-codex-model-test",
Object: "model",
Expand Down Expand Up @@ -2204,11 +2205,14 @@ func TestModelsWithClientVersionReturnsCodexCatalog(t *testing.T) {
}

var gpt55 map[string]any
var gpt62Astra map[string]any
var custom map[string]any
for _, model := range resp.Models {
switch slug, _ := model["slug"].(string); slug {
case "gpt-5.5":
gpt55 = model
case "gpt-6.2-astra":
gpt62Astra = model
case "custom-codex-model-test":
custom = model
}
Expand All @@ -2225,9 +2229,12 @@ func TestModelsWithClientVersionReturnsCodexCatalog(t *testing.T) {
if got, _ := gpt55["max_tokens"].(float64); got != 64000 {
t.Fatalf("gpt-5.5 max_tokens = %v, want 64000", gpt55["max_tokens"])
}
serviceTiers, ok := gpt55["service_tiers"].([]any)
if gpt62Astra == nil {
t.Fatal("expected gpt-6.2-astra codex catalog entry")
}
serviceTiers, ok := gpt62Astra["service_tiers"].([]any)
if !ok || len(serviceTiers) != 1 {
t.Fatalf("expected gpt-5.5 priority service tier, got %#v", gpt55["service_tiers"])
t.Fatalf("expected gpt-6.2-astra priority service tier, got %#v", gpt62Astra["service_tiers"])
}
if custom == nil {
t.Fatal("expected custom model codex catalog entry")
Expand Down
6 changes: 3 additions & 3 deletions internal/registry/model_definitions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ func TestCodexConfigurationUpdateCapability(t *testing.T) {
capable []string
}{
{name: "free", models: GetCodexFreeModels, capable: []string{"gpt-6-luna"}},
{name: "team", models: GetCodexTeamModels, capable: []string{"gpt-6-astra", "gpt-6-sol", "gpt-6-luna"}},
{name: "plus", models: GetCodexPlusModels, capable: []string{"gpt-6-astra", "gpt-6-sol", "gpt-6-luna"}},
{name: "pro", models: GetCodexProModels, capable: []string{"gpt-6-astra", "gpt-6-sol", "gpt-6-luna"}},
{name: "team", models: GetCodexTeamModels, capable: []string{"gpt-6.2-astra", "gpt-6.2-sol", "gpt-6-astra", "gpt-6-sol", "gpt-6-luna"}},
{name: "plus", models: GetCodexPlusModels, capable: []string{"gpt-6.2-astra", "gpt-6.2-sol", "gpt-6-astra", "gpt-6-sol", "gpt-6-luna"}},
{name: "pro", models: GetCodexProModels, capable: []string{"gpt-6.2-astra", "gpt-6.2-sol", "gpt-6-astra", "gpt-6-sol", "gpt-6-luna"}},
} {
t.Run(tier.name, func(t *testing.T) {
byID := make(map[string]*ModelInfo)
Expand Down
Loading
Loading