fix(xai): migrate current model config slots - #31614
Open
ayooooo123 wants to merge 1 commit into
Open
Conversation
Closed
13 tasks
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for covering the active primary-model config shape; that gap is real on current main.
Problems
- The new
model.modelscan should follow the current resolver precedence.hermes_cli/runtime_provider.py:283-289treatsmodel.modelas a fallback only whenmodel.defaultis absent, andhermes_cli/config.py:6565-6575canonicalizes the samedefault > model > nameorder. Scanning both can migrate an inactive alias and, for a non-reasoning alias, writereasoning_effort: nonebeside the active default.
Suggested changes
- Make the legacy
model.modelcheck conditional on an absent/emptymodel.default, and add the corresponding precedence regression test. The root-string and provider-prefix apply cases can remain.
Automated hermes-sweeper review.
|
|
||
| model_cfg = config.get("model") | ||
| if isinstance(model_cfg, dict): | ||
| _check("model.default", model_cfg.get("default")) |
Contributor
There was a problem hiding this comment.
model.model is a fallback alias, not a second active model slot: runtime_provider._get_model_config() uses it only when model.default is empty. Please make this an elif/fallback check and test that a valid default plus a retired legacy alias does not generate an alias migration or set reasoning_effort on the active model block.
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
model.default/model.model) for retired xAI model IDsmodel: xai/grok-3configs during migrationx-ai/andxai/provider prefixes when applying replacementsTest Plan
PYTHONPATH=$PWD python -m pytest tests/hermes_cli/test_xai_retirement.py tests/hermes_cli/test_migrate_xai.py -qPYTHONPATH=$PWD python -m pytest tests/hermes_cli/test_xai_retirement.py tests/hermes_cli/test_migrate_xai.py tests/hermes_cli/test_auth_xai_oauth_provider.py tests/hermes_cli/test_xai_oauth_pkce_token_exchange.py tests/hermes_cli/test_tools_config.py tests/hermes_cli/test_runtime_provider_resolution.py -qgit diff --check origin/main..HEAD