fix(cli): prevent custom_providers.model from overwriting manual model switches#9694
Closed
digging-airfare-4u wants to merge 1 commit into
Closed
fix(cli): prevent custom_providers.model from overwriting manual model switches#9694digging-airfare-4u wants to merge 1 commit into
digging-airfare-4u wants to merge 1 commit into
Conversation
Author
|
ping — small fix for |
…l switches _ensure_runtime_credentials() unconditionally assigned runtime_model from custom_providers entries, overriding user-initiated /model switches. Now it only applies the custom_providers default when self.model is empty or still set to the provider name/slug (preserving the NousResearch#7828 fix for `hermes chat --model <provider-name>`). Fixes NousResearch#9679
abfbba0 to
054b8fa
Compare
This was referenced Apr 26, 2026
Contributor
|
Closing as already fixed on Triage notes (high confidence): If you still see this on the latest version, please reopen with reproduction steps. (Bulk-closed during a CLI triage sweep.) |
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
Fixes a bug where
custom_providers.modelunconditionally overwrote manually switched models on every turn in the CLI.Problem
_ensure_runtime_credentials()always assignedruntime.get(\"model\")toself.model. When a user manually switched models via/model, the next message would revert to thecustom_providersdefault model.Fix
Only apply the
custom_providers.modelfallback whenself.modelis either:hermes chat --model <provider-name>)Changes
cli.py(_ensure_runtime_credentials): add guard before applyingruntime_modelRelated Issue
Fixes #9679