You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
honor model.picker_providers when building /model picker rows across classic CLI, gateway, and TUI picker surfaces
support the custom family so user-defined endpoints can be allowed as a group
add focused regression coverage for filter semantics, gateway wiring, and the inventory/TUI path used by model.options
Scope
This PR is intentionally narrow:
it filters picker rows only
it does not change typed /model <name> behavior
it does not include unrelated TUI model-switch/provider-context fixes
Behavior
When config.yaml sets:
model:
picker_providers:
- anthropic
- custom
then picker surfaces will only show:
the anthropic built-in provider family
user-defined/custom endpoint families (custom)
Unknown or malformed filter values are ignored, and an empty list disables filtering.
Test Plan
scripts/run_tests.sh tests/hermes_cli/test_inventory.py tests/hermes_cli/test_list_picker_providers.py tests/hermes_cli/test_model_picker_provider_filter.py tests/gateway/test_model_command_custom_providers.py tests/test_tui_gateway_server.py -k 'picker_provider or model_options_forwards_picker_provider_allowlist'
scripts/run_tests.sh tests/test_tui_gateway_server.py -k 'model_options_does_not_overwrite_curated_models or model_options_propagates_list_exception or model_options_forwards_picker_provider_allowlist'
Note: a broader run of tests/test_tui_gateway_server.py still hits an unrelated existing browser assertion in this environment; this PR does not touch that area.
Synced this PR with latest main again and resolved the current conflicts. GitHub now reports it as mergeable again.\n\nValidated locally:\n- scripts/run_tests.sh tests/cli/test_cli_provider_resolution.py tests/gateway/test_model_command_custom_providers.py tests/hermes_cli/test_model_picker_provider_filter.py tests/hermes_cli/test_list_picker_providers.py\n- Result: 40 passed\n- scripts/run_tests.sh tests/cli/test_cli_provider_resolution.py tests/gateway/test_model_command_custom_providers.py tests/hermes_cli/test_model_picker_provider_filter.py tests/hermes_cli/test_list_picker_providers.py tests/test_tui_gateway_server.py -k 'model_options or config_set_model'\n- Result: 11 passed\n\nWould appreciate a review/merge when someone has bandwidth.
Rebased this PR onto current main, narrowed the scope, and force-pushed a clean single-commit diff.
What this PR now covers:
model.picker_providers filters picker rows consistently across classic CLI, gateway, and TUI picker/inventory surfaces
custom is treated as a provider family for user-defined endpoints
malformed/unknown filter values degrade safely instead of breaking picker discovery
What this PR no longer tries to do:
unrelated TUI model-switch/provider-context fixes
any behavior change for typed /model <name> paths
Verified with:
scripts/run_tests.sh tests/hermes_cli/test_inventory.py tests/hermes_cli/test_list_picker_providers.py tests/hermes_cli/test_model_picker_provider_filter.py tests/gateway/test_model_command_custom_providers.py tests/test_tui_gateway_server.py -k 'picker_provider or model_options_forwards_picker_provider_allowlist'
scripts/run_tests.sh tests/test_tui_gateway_server.py -k 'model_options_does_not_overwrite_curated_models or model_options_propagates_list_exception or model_options_forwards_picker_provider_allowlist'
There is still an unrelated existing browser assertion failure in the full tests/test_tui_gateway_server.py file on this machine; this diff does not touch that path.
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
comp/cliCLI entry point, hermes_cli/, setup wizardcomp/gatewayGateway runner, session dispatch, deliverycomp/tuiTerminal UI (ui-tui/ + tui_gateway/)P3Low — cosmetic, nice to havetype/featureNew feature or request
2 participants
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
model.picker_providerswhen building/modelpicker rows across classic CLI, gateway, and TUI picker surfacescustomfamily so user-defined endpoints can be allowed as a groupmodel.optionsScope
This PR is intentionally narrow:
/model <name>behaviorBehavior
When
config.yamlsets:then picker surfaces will only show:
anthropicbuilt-in provider familycustom)Unknown or malformed filter values are ignored, and an empty list disables filtering.
Test Plan
scripts/run_tests.sh tests/hermes_cli/test_inventory.py tests/hermes_cli/test_list_picker_providers.py tests/hermes_cli/test_model_picker_provider_filter.py tests/gateway/test_model_command_custom_providers.py tests/test_tui_gateway_server.py -k 'picker_provider or model_options_forwards_picker_provider_allowlist'scripts/run_tests.sh tests/test_tui_gateway_server.py -k 'model_options_does_not_overwrite_curated_models or model_options_propagates_list_exception or model_options_forwards_picker_provider_allowlist'Note: a broader run of
tests/test_tui_gateway_server.pystill hits an unrelated existing browser assertion in this environment; this PR does not touch that area.Fixes #12655