From 38cab166a4bfc72e09bc445bf9917d9ca8a40583 Mon Sep 17 00:00:00 2001 From: HunterSThompson Date: Tue, 8 Sep 2026 21:38:52 +0000 Subject: [PATCH] feat(codex): expose GPT Image 2.5 Sunburst and Flare --- internal/registry/model_definitions.go | 26 +++++++++++- .../model_definitions_image25_test.go | 41 +++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 internal/registry/model_definitions_image25_test.go diff --git a/internal/registry/model_definitions.go b/internal/registry/model_definitions.go index 7ac6b469acb..75825524f19 100644 --- a/internal/registry/model_definitions.go +++ b/internal/registry/model_definitions.go @@ -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 { @@ -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 diff --git a/internal/registry/model_definitions_image25_test.go b/internal/registry/model_definitions_image25_test.go new file mode 100644 index 00000000000..79f00393a84 --- /dev/null +++ b/internal/registry/model_definitions_image25_test.go @@ -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) + } + } + }) + } +}