File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ func GetAIStudioModels() []*ModelInfo {
5151
5252// GetCodexFreeModels returns model definitions for the Codex free plan tier.
5353func GetCodexFreeModels () []* ModelInfo {
54- return WithCodexBuiltins (cloneModelInfos (getModels ().CodexFree ))
54+ return upsertModelInfos (cloneModelInfos (getModels ().CodexFree ), codexBuiltinImageModelInfo ( ))
5555}
5656
5757// GetCodexTeamModels returns model definitions for the Codex team plan tier.
@@ -79,9 +79,9 @@ func GetAntigravityModels() []*ModelInfo {
7979 return cloneModelInfos (getModels ().Antigravity )
8080}
8181
82- // WithCodexBuiltins injects hard-coded Codex-only model definitions that should
83- // not depend on remote models.json updates. Built-ins replace any matching IDs
84- // already present in the provided slice.
82+ // WithCodexBuiltins injects hard-coded Codex-only model definitions for paid
83+ // plan tiers that should not depend on remote models.json updates. Built-ins
84+ // replace any matching IDs already present in the provided slice.
8585func WithCodexBuiltins (models []* ModelInfo ) []* ModelInfo {
8686 return upsertModelInfos (models , codexBuiltinImageModelInfo (), codexBuiltinGPT55ModelInfo ())
8787}
Original file line number Diff line number Diff line change @@ -2,9 +2,15 @@ package registry
22
33import "testing"
44
5- func TestCodexStaticModelsIncludeGPT55 (t * testing.T ) {
5+ func TestCodexFreeStaticModelsExcludeGPT55 (t * testing.T ) {
6+ model := findModelInfo (GetCodexFreeModels (), "gpt-5.5" )
7+ if model != nil {
8+ t .Fatalf ("expected codex free tier to exclude gpt-5.5, got %q" , model .ID )
9+ }
10+ }
11+
12+ func TestCodexPaidStaticModelsIncludeGPT55 (t * testing.T ) {
613 tierModels := map [string ][]* ModelInfo {
7- "free" : GetCodexFreeModels (),
814 "team" : GetCodexTeamModels (),
915 "plus" : GetCodexPlusModels (),
1016 "pro" : GetCodexProModels (),
You can’t perform that action at this time.
0 commit comments