Bug Description
When running /model --global without specifying a model name, Hermes opens the visual model picker. After selecting a model in that picker, the selected model is applied only to the current session and is not persisted to config.yaml.
This is surprising because the user explicitly supplied --global. It makes the visual picker much less useful for choosing the default model and can cause Hermes to revert to the previous default model on the next launch.
Steps to Reproduce
- Start Hermes CLI.
- Run
/model --global.
- Use the visual picker to select a different provider/model.
- Exit Hermes and start it again, or inspect
~/.hermes/config.yaml.
Expected Behavior
The model selected through the visual picker should be persisted globally when the picker was opened from /model --global.
model.default and, when the provider changes, model.provider should be updated in ~/.hermes/config.yaml.
Actual Behavior
The selected model is applied only to the current session. The confirmation behaves like a session-only switch, and the next launch uses the previous global default.
Likely Cause
In the CLI flow, /model --global parses persist_global = True, but the picker-opening path does not preserve that flag.
Relevant flow observed in cli.py:
_handle_model_switch() parses persist_global from parse_model_flags().
- When no model/provider is provided, it opens the picker with
_open_model_picker(...).
_open_model_picker() does not accept/store persist_global in _model_picker_state.
- Later, picker selection calls
_handle_model_picker_selection() whose default is persist_global: bool = False.
So the --global flag is effectively dropped for visual picker selections.
Proposed Fix
Thread persist_global through the picker state:
- Let
_open_model_picker(..., persist_global=False) accept the flag.
- Store it in
_model_picker_state.
- When handling Enter/selection, read it from state and pass it to
_handle_model_picker_selection() / _apply_model_switch_result().
- Optionally show UI copy like “global” vs “session only” in the picker header/confirmation.
Why This Matters
Users often prefer the visual picker because model/provider names are hard to remember. If /model --global works for direct text input but not for visual selection, the behavior feels inconsistent and causes accidental reversion to old default models.
Bug Description
When running
/model --globalwithout specifying a model name, Hermes opens the visual model picker. After selecting a model in that picker, the selected model is applied only to the current session and is not persisted toconfig.yaml.This is surprising because the user explicitly supplied
--global. It makes the visual picker much less useful for choosing the default model and can cause Hermes to revert to the previous default model on the next launch.Steps to Reproduce
/model --global.~/.hermes/config.yaml.Expected Behavior
The model selected through the visual picker should be persisted globally when the picker was opened from
/model --global.model.defaultand, when the provider changes,model.providershould be updated in~/.hermes/config.yaml.Actual Behavior
The selected model is applied only to the current session. The confirmation behaves like a session-only switch, and the next launch uses the previous global default.
Likely Cause
In the CLI flow,
/model --globalparsespersist_global = True, but the picker-opening path does not preserve that flag.Relevant flow observed in
cli.py:_handle_model_switch()parsespersist_globalfromparse_model_flags()._open_model_picker(...)._open_model_picker()does not accept/storepersist_globalin_model_picker_state._handle_model_picker_selection()whose default ispersist_global: bool = False.So the
--globalflag is effectively dropped for visual picker selections.Proposed Fix
Thread
persist_globalthrough the picker state:_open_model_picker(..., persist_global=False)accept the flag._model_picker_state._handle_model_picker_selection()/_apply_model_switch_result().Why This Matters
Users often prefer the visual picker because model/provider names are hard to remember. If
/model --globalworks for direct text input but not for visual selection, the behavior feels inconsistent and causes accidental reversion to old default models.