Skip to content

fix(cli): drop ChatGPT-account-rejected models from openai-codex picker - #23175

Closed
konsisumer wants to merge 1 commit into
NousResearch:mainfrom
konsisumer:fix/codex-picker-chatgpt-account-unsupported
Closed

fix(cli): drop ChatGPT-account-rejected models from openai-codex picker#23175
konsisumer wants to merge 1 commit into
NousResearch:mainfrom
konsisumer:fix/codex-picker-chatgpt-account-unsupported

Conversation

@konsisumer

Copy link
Copy Markdown
Contributor

Codex /model picker no longer offers gpt-5.2-codex, gpt-5.1-codex-max, or gpt-5.1-codex-mini in its offline fallback — the ChatGPT-account Codex backend rejects them with HTTP 400.

What changed and why

  • hermes_cli/codex_models.py: removed gpt-5.2-codex, gpt-5.1-codex-max, and gpt-5.1-codex-mini from DEFAULT_CODEX_MODELS. The openai-codex provider always authenticates through the ChatGPT-account OAuth backend (resolve_codex_runtime_credentials hard-codes auth_mode="chatgpt" and points at chatgpt.com/backend-api/codex), which rejects those slugs with HTTP 400: "The '<model>' model is not supported when using Codex with a ChatGPT account." Whenever live model discovery isn't available (offline first run, transient API failure), the picker fell back to this list and let the user pick a model the backend would reject on the very next request.
  • Comment block updated to record why the three slugs are intentionally absent and to point at the issue. They remain in _PROVIDER_MODELS["openai"] (api.openai.com) and the opencode-zen catalog because those backends still accept them.
  • tests/hermes_cli/test_codex_models.py: added test_default_codex_models_excludes_chatgpt_account_unsupported asserting the three rejected slugs stay out of DEFAULT_CODEX_MODELS.

Forward-compat synthesis (_FORWARD_COMPAT_TEMPLATE_MODELS) is unchanged: gpt-5.4, gpt-5.4-mini, and gpt-5.3-codex-spark are still synthesized from gpt-5.3-codex (which stays in the fallback), so the offline picker still shows the full set of supported Codex slugs.

How to test

  • pytest tests/hermes_cli/test_codex_models.py -q — passes (20 tests, including the new regression test).
  • pytest tests/hermes_cli/test_codex_cli_model_picker.py tests/hermes_cli/test_model_validation.py tests/cli/test_cli_provider_resolution.py tests/cli/test_fast_command.py -q — passes (139 tests covering picker credential discovery, model normalization, /fast model handling).
  • Manual: with no live token reachable, run hermes /model on the openai-codex provider — the picker no longer offers gpt-5.2-codex, gpt-5.1-codex-max, or gpt-5.1-codex-mini.

What platforms tested on

  • macOS on darwin-arm64 (local)

Fixes #23097

…er fallback

DEFAULT_CODEX_MODELS — the offline / transient-failure fallback for the
openai-codex /model picker — listed three slugs the ChatGPT-account
Codex backend rejects with HTTP 400 ("The '<model>' model is not
supported when using Codex with a ChatGPT account."):

  - gpt-5.2-codex
  - gpt-5.1-codex-max
  - gpt-5.1-codex-mini

The openai-codex provider always authenticates via that backend in
Hermes (resolve_codex_runtime_credentials hard-codes auth_mode="chatgpt"),
so users would see "Model switched: <model>" then hit a non-retryable 400
on the next request whenever live model discovery wasn't available.

Remove them from the curated fallback. They remain in the openai
(api.openai.com) and opencode-zen catalogs where the backend still
accepts them.

Fixes NousResearch#23097
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard provider/openai OpenAI / Codex Responses API P2 Medium — degraded but workaround exists labels May 10, 2026
@konsisumer

Copy link
Copy Markdown
Contributor Author

Closing — deferring to #23189 by @LeonSGP which addresses the same. Reopen if that PR stalls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists provider/openai OpenAI / Codex Responses API type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: OpenAI Codex picker allows ChatGPT-account unsupported models

2 participants