Compare commits

...

1 Commits

Author SHA1 Message Date
Jiang Bohan
90ceafad90 fix(agent): expose GPT-5.5 family in Codex runtime model picker
Latest Codex CLI ships with GPT-5.5 / GPT-5.5 mini, but the static
catalog still topped out at GPT-5.4 so users couldn't pick the new
model from the agent picker.

Add gpt-5.5 + gpt-5.5-mini to codexStaticModels and promote 5.5 as
the default badge. Keep the older 5.4 / 5.3-codex / gpt-5 / o3
entries for users on older Codex CLI builds. Add a regression test
mirroring TestGeminiStaticModelsExposesAliasesAndGemini3 so the
next OpenAI release isn't a silent miss.

Co-authored-by: multica-agent <github@multica.ai>
2026-05-03 10:48:24 +08:00
2 changed files with 41 additions and 1 deletions

View File

@@ -150,7 +150,9 @@ func claudeStaticModels() []Model {
func codexStaticModels() []Model {
return []Model{
{ID: "gpt-5.4", Label: "GPT-5.4", Provider: "openai", Default: true},
{ID: "gpt-5.5", Label: "GPT-5.5", Provider: "openai", Default: true},
{ID: "gpt-5.5-mini", Label: "GPT-5.5 mini", Provider: "openai"},
{ID: "gpt-5.4", Label: "GPT-5.4", Provider: "openai"},
{ID: "gpt-5.4-mini", Label: "GPT-5.4 mini", Provider: "openai"},
{ID: "gpt-5.3-codex", Label: "GPT-5.3 Codex", Provider: "openai"},
{ID: "gpt-5", Label: "GPT-5", Provider: "openai"},

View File

@@ -58,6 +58,44 @@ func TestGeminiStaticModelsExposesAliasesAndGemini3(t *testing.T) {
}
}
func TestCodexStaticModelsExposesGPT55(t *testing.T) {
// Codex CLI has no `models list` subcommand so the catalog is
// hand-maintained. Regression guard for multica-ai/multica#2009 —
// GPT-5.5 must be selectable, and the badge default must point at
// the latest release rather than lagging a version behind.
models := codexStaticModels()
ids := map[string]Model{}
for _, m := range models {
ids[m.ID] = m
}
for _, want := range []string{
"gpt-5.5", "gpt-5.5-mini",
"gpt-5.4", "gpt-5.4-mini",
"gpt-5.3-codex", "gpt-5",
"o3", "o3-mini",
} {
if _, ok := ids[want]; !ok {
t.Errorf("missing expected Codex model %q in: %+v", want, models)
}
}
latest, ok := ids["gpt-5.5"]
if !ok || !latest.Default {
t.Errorf("expected `gpt-5.5` to be the default Codex entry, got %+v", latest)
}
defaults := 0
for _, m := range models {
if m.Default {
defaults++
}
if m.Provider != "openai" {
t.Errorf("all Codex entries must carry Provider=openai, got %+v", m)
}
}
if defaults != 1 {
t.Errorf("expected exactly one default Codex entry, got %d", defaults)
}
}
func TestListModelsHermesWithoutBinary(t *testing.T) {
// With no `hermes` binary on PATH the discovery fast-paths to
// an empty list (the UI then falls back to creatable manual