Conversation
|
Thanks for the focused picker improvement. Current main still preserves input order in Automated hermes-sweeper review. |
b49529e to
e79494c
Compare
|
Thanks for the review and the Rebased onto current |
Closes NousResearch#57578 The model picker (`/model`, `hermes model`) presented models in provider/catalog order. For Ollama Cloud (live /v1/models merged with the models.dev registry) and OpenRouter (models.dev catalog order) that order is non-deterministic and changes between invocations, so scanning a 30+ model list is a visual search problem. _prompt_model_selection() now sorts model_ids case-insensitively before building the ordered list; the current model still gets pinned to the top with its marker. Tests: two regression tests via the numbered fallback assert the presented order is alphabetical and that the current model stays first. (cherry picked from commit e79494ca9ea38fa3ae1320421943910a64d2a595)
e79494c to
c79249d
Compare
Summary
← currently in usemarker.Motivation
Closes #57578.
_prompt_model_selection()inhermes_cli/auth.pypresentedmodel_idsin whatever order they arrived from the provider probe / catalog. For Ollama Cloud (a live/v1/modelslist merged with the models.dev registry) and OpenRouter (models.dev catalog order) that order is non-deterministic and changes between invocations, so finding a specific model in a 30+ entry list is an unnecessary visual search.Fix
Sort
model_idswithsorted(model_ids, key=str.casefold)before building theorderedlist. The "current model first" behaviour and dedup are unchanged.Verification
python3 -m pytest tests/hermes_cli/test_terminal_menu_fallbacks.py— 8 passedtest_prompt_model_selection_sorts_models_alphabetically— unsorted/mixed-case input is presented alphabeticallytest_prompt_model_selection_keeps_current_first_then_sorted— current model stays pinned first, remainder sortedmainwithout the one-line sort change.