fix(model): show MoA preset picker on selection and label MoA in the banner - #53775
Merged
Conversation
…banner Selecting 'Mixture of Agents' in the `hermes model` provider picker fell through silently — select_provider_and_model had no moa branch, so it just reprinted the current model/provider summary and exited. And the CLI session banner rendered the bare preset name (e.g. 'opus-gpt · Nous Research'), which is meaningless out of context. - Add _model_flow_moa: always lists the available presets (even one), then prints the full reference-models + aggregator breakdown for the selection and persists model.provider=moa / model.default=<preset> (dropping stale base_url + endpoint creds, since moa is a virtual local provider). - Wire the branch into select_provider_and_model. - build_welcome_banner takes provider; when 'moa' it renders 'MoA: <preset> · agg <aggregator>' instead of a bare slug. Both CLI call sites pass self.provider. Tests: 2 new banner tests (moa + non-moa unchanged); E2E verified the picker persists the preset and clears stale base_url/api_key.
1 task
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
Selecting "Mixture of Agents" in the
hermes modelprovider picker now shows the available presets (even when there's only one), prints the chosen preset's full breakdown, and the CLI session banner labels MoA sessions instead of showing a bare preset slug.Root cause:
select_provider_and_model()had nomoabranch, so picking MoA fell through everyelifto the post-switch cleanup and just reprinted the current model/provider summary — no selection happened. Separately, the banner readmodel.default(now a bare preset name likeopus-gpt) and renderedopus-gpt · Nous Research, which is meaningless out of context.Changes
hermes_cli/model_setup_flows.py: add_model_flow_moa— always lists presets (curses, with a plain-numbered fallback), prints the reference-models + aggregator breakdown on selection, and persistsmodel.provider=moa/model.default=<preset>, dropping stalebase_url/api_key/api_modesince MoA is a virtual local provider.hermes_cli/main.py: wireelif selected_provider == "moa": _model_flow_moa(...)into the dispatch chain; import the new flow.hermes_cli/banner.py:build_welcome_bannertakes an optionalprovider; when"moa"it rendersMoA: <preset> · agg <aggregator>instead of a bare slug. Both CLI call sites passself.provider.tests/hermes_cli/test_banner.py: 2 tests (MoA banner shows preset + aggregator; non-MoA banner unchanged).Validation
hermes modelopus-gpt · Nous ResearchMoA: opus-gpt · agg claude-opus-4.8 · Nous ResearchE2E (temp
HERMES_HOME): the flow persists{provider: moa, default: opus-gpt}and strips stalebase_url/api_key;resolve_runtime_provideraccepts the result.tests/hermes_cli/test_banner.py→ 12/12 pass.Note: scoped to the classic CLI (the reported surface). TUI banner parity (
branding.tsx) would require threadingproviderthrough thegateway.readypayload +SessionInfo— a separate change.Infographic