hermes-agent/hermes_cli
Ubuntu ec9bf9e378 feat(model-picker): group custom_providers by name into a single row per provider
The /model picker currently renders one row per ``custom_providers``
entry. When several entries share the same provider name (e.g. four
``ollama-cloud`` entries for ``qwen3-coder``, ``glm-5.1``, ``kimi-k2``,
``minimax-m2.7``), users see four separate "Ollama Cloud" rows in the
picker, which is confusing UX — there is only one Ollama Cloud
provider, so there should be one row containing four models.

This PR groups ``custom_providers`` entries that share the same provider
name into a single picker row while keeping entries with distinct names
as separate rows. So:

* Four entries named ``Ollama Cloud`` → one "Ollama Cloud" row with
  four models inside.
* One entry named ``Ollama Cloud`` and one named ``Moonshot`` → two
  separate rows, one model each.

Implementation
--------------
Replaces the single-pass loop in ``list_authenticated_providers()`` with
a two-pass approach:

1. First pass: build an ``OrderedDict`` keyed by ``custom_provider_slug(name)``,
   accumulating ``models`` per group while preserving discovery order.
2. Second pass: iterate the groups and append one result row per group,
   skipping any slug that already appeared in an earlier provider source
   (the existing ``seen_slugs`` guard).

Insertion order is preserved via ``OrderedDict``, so providers and
their models still appear in the order the user listed them in
``custom_providers``. No new dependencies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 16:41:30 -07:00
..
__init__.py chore: release v0.9.0 (v2026.4.13) (#9182) 2026-04-13 11:52:09 -07:00
auth.py fix: dashboard shows Nous Portal as 'not connected' despite active auth (#9261) 2026-04-13 16:32:11 -07:00
auth_commands.py fix(config): restore custom providers after v11→v12 migration 2026-04-13 10:50:52 -07:00
backup.py feat: fix SQLite safety in hermes backup + add --quick snapshots + /snapshot command (#8971) 2026-04-13 04:46:13 -07:00
banner.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
callbacks.py refactor: remove 24 confirmed dead functions — 432 lines of unused code 2026-04-07 11:41:26 -07:00
claw.py fix: unify OpenClaw detection, add isatty guard, fix print_warning import 2026-04-12 16:40:37 -07:00
cli_output.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
clipboard.py feat(gateway): WSL-aware gateway with smart systemd detection (#7510) 2026-04-10 21:15:47 -07:00
codex_models.py fix: add gpt-5.4-mini to Codex fallback catalog (#3855) 2026-03-29 20:10:00 -07:00
colors.py feat: respect NO_COLOR env var and TERM=dumb (#4079) 2026-03-30 17:07:21 -07:00
commands.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
config.py fix(config): include model field in custom_providers dedup key 2026-04-13 16:41:30 -07:00
copilot_auth.py fix(copilot): resolve GHE token poisoning when GITHUB_TOKEN is set 2026-04-13 05:12:36 -07:00
cron.py feat(cron): track delivery failures in job status (#6042) 2026-04-07 22:49:01 -07:00
curses_ui.py feat(cli): add native /model picker modal for provider → model selection 2026-04-11 17:16:06 -07:00
debug.py feat: add hermes debug share — upload debug report to pastebin (#8681) 2026-04-12 18:05:14 -07:00
default_soul.py fix: reset default SOUL.md to baseline identity text (#3159) 2026-03-26 01:34:27 -07:00
doctor.py fix: add kimi-coding-cn to remaining provider touchpoints 2026-04-13 11:20:37 -07:00
dump.py fix(gateway): harden Docker/container gateway pathway 2026-04-12 16:36:11 -07:00
env_loader.py fix: sanitize .env before loading to prevent token duplication (#8908) 2026-04-13 04:35:37 -07:00
gateway.py docs: add slack files:read scope 2026-04-13 16:31:38 -07:00
logs.py feat: component-separated logging with session context and filtering (#7991) 2026-04-11 17:23:36 -07:00
main.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
mcp_config.py feat: add --env and --preset support to hermes mcp add 2026-04-11 15:34:57 -07:00
memory_setup.py refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
model_normalize.py fix: add kimi-coding-cn to remaining provider touchpoints 2026-04-13 11:20:37 -07:00
model_switch.py feat(model-picker): group custom_providers by name into a single row per provider 2026-04-13 16:41:30 -07:00
models.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
nous_subscription.py feat(tools): add Voxtral TTS provider (Mistral AI) 2026-04-11 01:56:55 -07:00
pairing.py chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119) 2026-03-25 19:47:58 -07:00
platforms.py docs: add platform adapter developer guide + WeCom Callback docs (#7969) 2026-04-11 15:50:54 -07:00
plugins.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
plugins_cmd.py fix: no auto-activation + unified hermes plugins UI with provider categories 2026-04-10 19:15:50 -07:00
profiles.py fix: improve profile creation UX — seed SOUL.md + credential warning (#8553) 2026-04-12 12:22:34 -07:00
providers.py fix: add kimi-coding-cn to remaining provider touchpoints 2026-04-13 11:20:37 -07:00
runtime_provider.py fix: add kimi-coding-cn to remaining provider touchpoints 2026-04-13 11:20:37 -07:00
setup.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
skills_config.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
skills_hub.py fix(skills): cache GitHub repo trees to avoid rate-limit exhaustion on install 2026-04-12 16:39:04 -07:00
skin_engine.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
status.py fix(gateway): harden Docker/container gateway pathway 2026-04-12 16:36:11 -07:00
tips.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
tools_config.py refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
uninstall.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
web_server.py fix: dashboard shows Nous Portal as 'not connected' despite active auth (#9261) 2026-04-13 16:32:11 -07:00
webhook.py refactor: replace inline HERMES_HOME re-implementations with get_hermes_home() 2026-04-07 10:40:34 -07:00