Skip to content

Commit 724f579

Browse files
committed
Drop fabricated "example" models for codex/gemini
The codex/gemini model listers returned hardcoded "example" model ids that looked pickable but weren't guaranteed valid (gpt-5-codex could fail outright). Neither CLI has a model-enumeration command, so remove the listers entirely. The model picker then offers just Default + Custom for those agents (its existing no-models behavior), and `--models` shows "(no advertised models; pass any value your CLI accepts via --model)". Claude keeps its real, valid aliases (opus/sonnet/haiku). Tests updated. Entire-Checkpoint: ebcc924da0df
1 parent 9a30e1d commit 724f579

3 files changed

Lines changed: 10 additions & 44 deletions

File tree

cmd/entire/cli/agent/codex/models.go

Lines changed: 0 additions & 20 deletions
This file was deleted.

cmd/entire/cli/agent/geminicli/models.go

Lines changed: 0 additions & 19 deletions
This file was deleted.

cmd/entire/cli/review/cmd_test.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,16 @@ func TestReviewCmd_ListModels(t *testing.T) {
136136
t.Fatalf("execute: %v", err)
137137
}
138138
out := buf.String()
139-
for _, want := range []string{"claude-code", "opus", "sonnet", "codex", "gpt-5-codex", "gemini", "gemini-2.5-pro"} {
139+
// claude-code advertises real aliases; codex/gemini have no enumeration
140+
// command, so they list no models and point at Default/--model instead.
141+
for _, want := range []string{"claude-code", "opus", "sonnet", "codex", "gemini", "no advertised models"} {
140142
if !strings.Contains(out, want) {
141143
t.Errorf("--models output missing %q:\n%s", want, out)
142144
}
143145
}
146+
if strings.Contains(out, "gpt-5-codex") {
147+
t.Errorf("--models should not invent example codex models:\n%s", out)
148+
}
144149
}
145150

146151
// TestReviewCmd_ListModelsFilteredByAgent verifies the --agent filter narrows
@@ -155,11 +160,11 @@ func TestReviewCmd_ListModelsFilteredByAgent(t *testing.T) {
155160
t.Fatalf("execute: %v", err)
156161
}
157162
out := buf.String()
158-
if !strings.Contains(out, "gpt-5-codex") {
159-
t.Errorf("expected codex models, got:\n%s", out)
163+
if !strings.Contains(out, "codex") || !strings.Contains(out, "no advertised models") {
164+
t.Errorf("expected codex section with no-advertised-models note, got:\n%s", out)
160165
}
161-
if strings.Contains(out, "gemini-2.5-pro") {
162-
t.Errorf("--agent codex should not list gemini models:\n%s", out)
166+
if strings.Contains(out, "gemini") {
167+
t.Errorf("--agent codex should not list gemini:\n%s", out)
163168
}
164169
}
165170

0 commit comments

Comments
 (0)