codex_local model discovery had two sources: the OpenAI models API (only when an OPENAI_API_KEY resolves) and a static array shipped with the adapter. Most Codex users authenticate the CLI with a ChatGPT account, so the API path is skipped and the picker shows only the static array, which changes only when Paperclip cuts a release. The Refresh button re-read the same array and changed nothing. Read the catalog the Codex CLI already maintains for itself at $CODEX_HOME/models_cache.json (default ~/.codex/models_cache.json) as the no-API-key discovery source. Filter to entries the CLI marks visibility "list" so internal slugs stay out of the picker, and merge with the static fallback through the existing dedupe/merge helpers so no id offered today disappears. The API-key path and the static fallback stay exactly as they are when the file is missing, unreadable, malformed, or lists nothing usable. Fixes #13126 |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| CHANGELOG.md | ||
| package.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||