fix(model-picker): load all models in interactive pickers instead of capping at 50#35447
Closed
liuhao1024 wants to merge 1 commit into
Closed
fix(model-picker): load all models in interactive pickers instead of capping at 50#35447liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
…capping at 50 The /model picker (CLI, TUI, gateway, dashboard) truncated the model list to 50 entries via max_models=50. Providers with >50 models (e.g. Nous Portal with 247) showed the real total but only let users select from the first 50. Fix: support max_models=None in list_authenticated_providers() and list_picker_providers() to skip slicing, then pass None from all interactive picker call sites. The max_models=5 limit in gateway status display is unchanged (different purpose). Fixes NousResearch#35443
Collaborator
Contributor
|
Fixed on 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 |
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.
What does this PR do?
Removes the hard-coded
max_models=50cap from all interactive model pickers (CLI/model, TUI, gateway inline keyboards, dashboard API). Providers with more than 50 models (e.g. Nous Portal with 247) now show the full model list so users can select any model.Related Issue
Fixes #35443
Type of Change
Changes Made
hermes_cli/model_switch.py: Acceptmax_models: int | Noneinlist_authenticated_providers()andlist_picker_providers(). WhenNone, skip themodel_ids[:max_models]slice so the full list passes through. Guard applied to all 4 slicing sites (Sections 1, 2a, 2b, and picker variant).hermes_cli/inventory.py: Changebuild_models_payload()default frommax_models=50tomax_models=Noneso callers get the full list by default.cli.py: CLI/modelpicker — passmax_models=None.gateway/run.py: Gateway inline-keyboard picker — passmax_models=None. (The separatemax_models=5in the status display is intentionally unchanged.)tui_gateway/server.py: TUI model picker and provider refresh — passmax_models=None.hermes_cli/web_server.py: Dashboard/api/model/options— passmax_models=None.How to Test
hermesCLI and type/model.hermes --tui) and dashboard (hermes dashboard).pytest tests/hermes_cli/test_model_switch_custom_providers.py tests/hermes_cli/test_overlay_slug_resolution.py tests/test_tui_gateway_server.py -k model -q— all should pass.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/ACode Intelligence
hermes_cli/model_switch.py:list_authenticated_providers(called bybuild_models_payload→ CLI/TUI/gateway/dashboard picker paths)50→None) plus null-safe slicing guardslist_picker_providerswrapslist_authenticated_providersfor interactive pickers (Telegram/Discord inline keyboards)