Commit Graph
1 Commits
Author SHA1 Message Date
yetone b0607ef5a6 provider: the ChatGPT API subscription lists, beside the models its account catalog lists, those Codex lists for the plan, which the token runs though the catalog leaves them out (#933, knothhe)
knothhe found the ChatGPT API account listing far fewer models than pi, while gpt-6-luna, added by hand, ran. OpenAI's catalog for a Sign in with ChatGPT token (GET api.openai.com/v1/models, its visibility "list" entries, as OpenAI's Models and inference page says to show) leaves out models the token runs: fastagent's run on a real account (fastagent-sh/fastagent#698) found 5 listed, and gpt-6-luna, gpt-6-sol and gpt-6.1-sol running though not in it at all, while pi lists its 44 built-in openai models, 36 of which answer "not supported when using Codex with a ChatGPT account". The token is served as Codex on the plan, so the list now adds to the catalog's models the ones Codex lists for a ChatGPT plan: the list magpie's Codex subscription last fetched, else Codex CLI's models_cache.json. A model the catalog hides stays out, and so do magpie's own in Codex's list.

TestChatGPTAPIListsCodexModels is new and fails without the change (models [gpt-5.5 gpt-5.4-mini], no gpt-6-luna). Tested against fake OpenAI servers; not yet with a real ChatGPT API account. go vet, go build (GOOS=linux nogui, GOOS=windows) and go test -tags nogui ./... under a temp HOME pass.
2026-10-06 02:30:31 +08:00