Skip to content
Merged
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
26 changes: 25 additions & 1 deletion internal/registry/model_definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func GetAntigravityModels() []*ModelInfo {
// not depend on remote models.json updates. Built-ins replace any matching IDs
// already present in the provided slice.
func WithCodexBuiltins(models []*ModelInfo) []*ModelInfo {
return upsertModelInfos(models, codexBuiltinImageModelInfo())
return upsertModelInfos(models, codexBuiltinImageModelInfo(), codexBuiltinImage25SunburstModelInfo(), codexBuiltinImage25FlareModelInfo())
}

func codexBuiltinImageModelInfo() *ModelInfo {
Expand All @@ -97,6 +97,30 @@ func codexBuiltinImageModelInfo() *ModelInfo {
}
}

func codexBuiltinImage25SunburstModelInfo() *ModelInfo {
return &ModelInfo{
ID: "gpt-image-2.5-sunburst",
Object: "model",
Created: 1788825600, // 2026-09-08
OwnedBy: "openai",
Type: "openai",
DisplayName: "GPT Image 2.5 Sunburst",
Version: "gpt-image-2.5-sunburst",
}
}

func codexBuiltinImage25FlareModelInfo() *ModelInfo {
return &ModelInfo{
ID: "gpt-image-2.5-flare",
Object: "model",
Created: 1788825600, // 2026-09-08
OwnedBy: "openai",
Type: "openai",
DisplayName: "GPT Image 2.5 Flare",
Version: "gpt-image-2.5-flare",
}
}

func upsertModelInfos(models []*ModelInfo, extras ...*ModelInfo) []*ModelInfo {
if len(extras) == 0 {
return models
Expand Down
41 changes: 41 additions & 0 deletions internal/registry/model_definitions_image25_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package registry

import "testing"

func TestCodexImage25Builtins(t *testing.T) {
for _, id := range []string{"gpt-image-2.5-sunburst", "gpt-image-2.5-flare"} {
t.Run(id, func(t *testing.T) {
// Stale remote metadata must not replace the built-in definition or duplicate it.
models := WithCodexBuiltins([]*ModelInfo{{ID: id, DisplayName: "stale"}})
models = WithCodexBuiltins(models)
count := 0
for _, model := range models {
if model.ID == id {
count++
if model.DisplayName == "stale" || model.Version != id || model.OwnedBy != "openai" {
t.Fatalf("unexpected builtin metadata: %+v", model)
}
}
}
if count != 1 {
t.Fatalf("got %d entries for %s, want 1", count, id)
}
for _, tier := range []struct {
name string
models []*ModelInfo
}{
{"team", GetCodexTeamModels()}, {"plus", GetCodexPlusModels()}, {"pro", GetCodexProModels()},
} {
found := false
for _, model := range tier.models {
if model.ID == id {
found = true
}
}
if !found {
t.Errorf("%s missing from %s catalog", id, tier.name)
}
}
})
}
}
Loading