Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.
agent: a model Codex hides joins Codex's own group in the picker
yetone6c063ac1b27a
diff --git a/internal/agent/codex.go b/internal/agent/codex.goindex 4b6367b97..f86f29cb5 100644--- a/internal/agent/codex.go+++ b/internal/agent/codex.go@@ -2033,7 +2033,8 @@ func codexInMagpie(own []Option) []Option {// serves on a ChatGPT account that own, Codex's own list, leaves out: one// Codex hides from its picker (gpt-6.1-terra) but the user ticked on the// subscription was offered nowhere (ysm119 on Discord), as the hop is all-// that reaches it.+// that reaches it. Those come first, in own's group: a "Codex" section+// of their own beside it read as a second kind of model (ysm119).func codexViaMagpieFor(own []Option) []Option {in := map[string]bool{}for _, o := range own {@@ -2042,14 +2043,18 @@ func codexViaMagpieFor(own []Option) []Option {in[m] = true}}- var out []Option+ var hidden, out []Optionfor _, o := range viaMagpie("codex", "") {- if strings.HasPrefix(o.Value, "codex/") && in[codexOwnOf(o.Value)] {- continue+ if !strings.HasPrefix(o.Value, "codex/") {+ out = append(out, o)+ } else if !in[codexOwnOf(o.Value)] {+ if len(own) > 0 {+ o.Group, o.GroupIcon = own[0].Group, own[0].GroupIcon+ }+ hidden = append(hidden, o)}- out = append(out, o)}- return out+ return append(hidden, out...)}// codexOwnViaMagpie is the catalog id magpie serves one of Codex's owndiff --git a/internal/agent/codex_hidden_test.go b/internal/agent/codex_hidden_test.goindex bb9f0f819..c41315edb 100644--- a/internal/agent/codex_hidden_test.go+++ b/internal/agent/codex_hidden_test.go@@ -33,7 +33,21 @@ func TestCodexHiddenTickedModelOffered(t *testing.T) {}seen := map[string]int{}var all []string- for _, o := range codex(home).Fields[0].Options(nil) {+ opts := codex(home).Fields[0].Options(nil)+ groups := map[string]string{}+ for _, o := range opts {+ m := o.Value+ if own := codexOwnOf(o.Value); own != "" {+ m = own+ }+ groups[m] = o.Group+ }+ // one section: the hidden one beside Codex's own, not under a heading+ // of its own (ysm119: "为啥会出现2 个分组")+ if groups["gpt-h"] != groups["gpt-a"] {+ t.Errorf("gpt-h in %q, gpt-a in %q", groups["gpt-h"], groups["gpt-a"])+ }+ for _, o := range opts {all = append(all, o.Group+":"+o.Value)m := o.Valueif own := codexOwnOf(o.Value); own != "" {