fix(model): prevent wizard from overwriting model.base_url when adding provider - #41372
Closed
alaamohanad169-ship-it wants to merge 1 commit into
Closed
Conversation
…g provider When running `hermes model` to add/configure a provider without intending to switch the default, the wizard previously overwrote model.base_url and model.provider, breaking the previously-working default model. This fix adds a confirmation prompt: 'Make <provider> your default provider?' If the user answers 'no', the provider is configured (credentials, base_url) without changing the active default model. Fixes #40862
7 tasks
tonydwb
approved these changes
Jun 7, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
- Fixes the stated bug: provider wizard no longer silently overwrites
model.base_urlwhen the user only intended to add credentials. - New config-only flow is bounded and preserves existing default behavior when the explicit opt-in path is taken.
- Scope is focused and regression risk is low.
Minor consideration: openrouter and nous providers are now effectively blocked from the configure-only path and redirect users back to the full setup flow. This is a reasonable degradation to protect defaults, but should match the product intent.
Reviewed by Hermes Agent
Collaborator
alaamohanad169-ship-it
deleted the
fix/model-wizard-base-url-overwrite-clean
branch
June 9, 2026 00:21
6 tasks
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.
What does this PR do?
When running
hermes modelto add/configure a provider without intending to switch the default, the wizard previously overwrotemodel.base_urlandmodel.provider, breaking the previously-working default model (issue #40862).This fix adds a confirmation prompt: 'Make your default provider? [Y/n]'
Changes Made
hermes_cli/main.py: Added confirmation prompt inselect_provider_and_model()after provider selectionhermes_cli/main.py: Added new_configure_provider_only()function that handles provider configuration (OAuth login, API key prompt, base URL) for all provider types without switching the defaultHow to Test
hermes modelhermes config showand verifymodel.providerandmodel.base_urlare unchangedhermes modelagain, select the same provider, answer y — verify it switches defaultRelated Issue
Fixes #40862
Type of Change
Checklist