Skip to content

fix(cli): raise model picker cap from 50 to 200 to surface all provider models#42496

Closed
liuhao1024 wants to merge 1 commit into
NousResearch:mainfrom
liuhao1024:fix/model-picker-cap-50
Closed

fix(cli): raise model picker cap from 50 to 200 to surface all provider models#42496
liuhao1024 wants to merge 1 commit into
NousResearch:mainfrom
liuhao1024:fix/model-picker-cap-50

Conversation

@liuhao1024

Copy link
Copy Markdown
Contributor

What does this PR do?

Raises the model picker cap from 50 to 200 across all picker entry points, so providers with 100+ models (like NVIDIA NIM) surface all available models instead of only the first 50 alphabetically.

Related Issue

Fixes #42270

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • hermes_cli/model_switch.py: Raised max_models default from 8 to 200 in list_authenticated_providers() and list_picker_providers(); updated prewarm caller from 50 to 200
  • hermes_cli/inventory.py: Raised build_models_payload() default from 50 to 200
  • hermes_cli/web_server.py: Updated both /api/model/options callers from 50 to 200

How to Test

  1. Authenticate with a provider that has 100+ models (e.g., NVIDIA NIM, OpenRouter)
  2. Run hermes --tui and type /model to open the picker
  3. Select the provider — verify all models are listed (not just 50)
  4. Check the Desktop model picker — same behavior
  5. Verify total_models count in the API response matches the actual model count

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Code Intelligence

  • Analyzed: model_switch.py::list_authenticated_providers, inventory.py::build_models_payload
  • Blast radius: LOW — numeric constant change only, no control flow changes
  • Related patterns: cached_provider_model_ids() provides the full model list; total_models field already reports real count

…er models

Providers like NVIDIA NIM expose 100+ models but the picker hard-capped
at 50 entries via max_models=50 in three call sites.  Users could only
see the first 50 (alphabetical) models, hiding the rest.

Raise the cap to 200 across all picker entry points:
- list_authenticated_providers() default: 8 → 200
- list_picker_providers() default: 8 → 200
- build_models_payload() default: 50 → 200
- prewarm_picker_cache_async(): 50 → 200
- web_server /api/model/options: 50 → 200
- web_server build_models_payload: 50 → 200

The total_models field already reports the real count so the UI can
show 'showing 200 of N' when a provider has more models.

Fixes NousResearch#42270
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard labels Jun 9, 2026

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Configuration

  • Raises the model picker cap from 50 to 200 across all call sites: build_models_payload(), list_authenticated_providers(), list_picker_providers(), and get_recommended_default_model().

Reason

  • Some providers now offer 100+ models. A cap of 50 was too restrictive and was preventing all available models from appearing in the picker.

Looks Good

  • Simple config change, no risk.

Reviewed by Hermes Agent

@teknium1

Copy link
Copy Markdown
Contributor

Fixed on main via PR #48611 — the interactive model pickers no longer cap at 50 models; large provider catalogs are fully searchable.

This was one of several PRs targeting the same picker cap. We merged @islam666's #48297 as the implementation (cleanest scope — it correctly keeps the Telegram/Discord inline-keyboard cap, which genuinely needs a bound) plus a follow-up tightening max_models=0 semantics and a regression test. Closing this as a duplicate — thanks for the contribution and for flagging the issue.

#48611

@teknium1 teknium1 closed this Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hermes --tui /model picker hard-caps model list at 50 entries, hiding models for providers with large catalogs (e.g. NVIDIA NIM)

4 participants