fix(cli): drop ChatGPT-account-rejected models from openai-codex picker - #23175
Closed
konsisumer wants to merge 1 commit into
Closed
fix(cli): drop ChatGPT-account-rejected models from openai-codex picker#23175konsisumer wants to merge 1 commit into
konsisumer wants to merge 1 commit into
Conversation
…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
Contributor
Author
|
Closing — deferring to #23189 by @LeonSGP which addresses the same. Reopen if that PR stalls. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: removedgpt-5.2-codex,gpt-5.1-codex-max, andgpt-5.1-codex-minifromDEFAULT_CODEX_MODELS. The openai-codex provider always authenticates through the ChatGPT-account OAuth backend (resolve_codex_runtime_credentialshard-codesauth_mode="chatgpt"and points atchatgpt.com/backend-api/codex), which rejects those slugs withHTTP 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._PROVIDER_MODELS["openai"](api.openai.com) and the opencode-zen catalog because those backends still accept them.tests/hermes_cli/test_codex_models.py: addedtest_default_codex_models_excludes_chatgpt_account_unsupportedasserting the three rejected slugs stay out ofDEFAULT_CODEX_MODELS.Forward-compat synthesis (
_FORWARD_COMPAT_TEMPLATE_MODELS) is unchanged:gpt-5.4,gpt-5.4-mini, andgpt-5.3-codex-sparkare still synthesized fromgpt-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).hermes/modelon the openai-codex provider — the picker no longer offersgpt-5.2-codex,gpt-5.1-codex-max, orgpt-5.1-codex-mini.What platforms tested on
Fixes #23097