fix(cli): fall back to a Codex model for Codex runtime - #661
Closed
stablegenius49 wants to merge 1 commit into
Closed
fix(cli): fall back to a Codex model for Codex runtime#661stablegenius49 wants to merge 1 commit into
stablegenius49 wants to merge 1 commit into
Conversation
This was referenced Mar 8, 2026
teknium1
added a commit
that referenced
this pull request
Mar 8, 2026
When _ensure_runtime_credentials() resolves the provider to openai-codex, check if the active model is Codex-compatible. If not (e.g. the default anthropic/claude-opus-4.6), swap it for the best available Codex model. Also strips provider prefixes the Codex API rejects (openai/gpt-5.3-codex → gpt-5.3-codex). Adds _model_is_default flag so warnings are only shown when the user explicitly chose an incompatible model (not when it's the config default). Fixes #651. Co-inspired-by: stablegenius49 (PR #661) Co-inspired-by: teyrebaz33 (PR #696)
Contributor
|
Thanks for the fix @stablegenius49! The Unfortunately this PR couldn't be merged directly because the branch is 36 commits behind main and the diff includes unrelated regressions — it removes the We implemented the fix in commit 95b1130, taking the best ideas from this PR (clean method extraction) and #696 ( |
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
When _ensure_runtime_credentials() resolves the provider to openai-codex, check if the active model is Codex-compatible. If not (e.g. the default anthropic/claude-opus-4.6), swap it for the best available Codex model. Also strips provider prefixes the Codex API rejects (openai/gpt-5.3-codex → gpt-5.3-codex). Adds _model_is_default flag so warnings are only shown when the user explicitly chose an incompatible model (not when it's the config default). Fixes NousResearch#651. Co-inspired-by: stablegenius49 (PR NousResearch#661) Co-inspired-by: teyrebaz33 (PR NousResearch#696)
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
When _ensure_runtime_credentials() resolves the provider to openai-codex, check if the active model is Codex-compatible. If not (e.g. the default anthropic/claude-opus-4.6), swap it for the best available Codex model. Also strips provider prefixes the Codex API rejects (openai/gpt-5.3-codex → gpt-5.3-codex). Adds _model_is_default flag so warnings are only shown when the user explicitly chose an incompatible model (not when it's the config default). Fixes NousResearch#651. Co-inspired-by: stablegenius49 (PR NousResearch#661) Co-inspired-by: teyrebaz33 (PR NousResearch#696)
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
When _ensure_runtime_credentials() resolves the provider to openai-codex, check if the active model is Codex-compatible. If not (e.g. the default anthropic/claude-opus-4.6), swap it for the best available Codex model. Also strips provider prefixes the Codex API rejects (openai/gpt-5.3-codex → gpt-5.3-codex). Adds _model_is_default flag so warnings are only shown when the user explicitly chose an incompatible model (not when it's the config default). Fixes NousResearch#651. Co-inspired-by: stablegenius49 (PR NousResearch#661) Co-inspired-by: teyrebaz33 (PR NousResearch#696)
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.
Summary\n- normalize incompatible CLI model selections when the runtime provider resolves to OpenAI Codex\n- strip provider prefixes from explicit Codex model ids before initializing the agent\n- add regression coverage for both fallback and prefix-stripping cases\n\nFixes #651\n\n## Testing\n- pytest -q tests/test_codex_models.py tests/test_cli_provider_resolution.py\n