fix: codex model discovery on Python 3.10 (tomllib fallback)#281
Closed
0xbyt4 wants to merge 1 commit into
Closed
Conversation
tomllib is stdlib in 3.11+ but unavailable on 3.10, which is the project's minimum supported version. _read_default_model() silently returned None on 3.10, ignoring the user's config.toml default. Add a regex fallback for `model = "..."` parsing when tomllib is not available.
3 tasks
Contributor
|
Closing — Hermes requires Python 3.11+, not 3.10. The Since 3.11 is the minimum, |
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
_read_default_model()inhermes_cli/codex_models.pyusestomllibwhich is stdlib in Python 3.11+ but unavailable on 3.10>=3.10, so this silently fails: user'sconfig.tomldefault model is ignoredmodel = "..."parsing whentomllibis not availabletest_get_codex_model_ids_prioritizes_default_and_cacheon Python 3.10Test plan
pytest tests/test_codex_models.py -v— 2/2 pass on Python 3.10