Skip to content

feat(/model): honor picker_providers across pickers#14571

Open
taosiyuan163 wants to merge 1 commit into
NousResearch:mainfrom
taosiyuan163:feat-model-picker-provider-filter-12655-mainwd
Open

feat(/model): honor picker_providers across pickers#14571
taosiyuan163 wants to merge 1 commit into
NousResearch:mainfrom
taosiyuan163:feat-model-picker-provider-filter-12655-mainwd

Conversation

@taosiyuan163

@taosiyuan163 taosiyuan163 commented Apr 23, 2026

Copy link
Copy Markdown

Summary

  • 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.

Fixes #12655

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Apr 23, 2026
@taosiyuan163

Copy link
Copy Markdown
Author

Synced with latest main, resolved conflicts, and re-ran the targeted tests.

Current status:

  • PR is mergeable again
  • 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/test_tui_gateway_server.py
  • Result: 121 passed

Would appreciate a review when someone has time.

@taosiyuan163

Copy link
Copy Markdown
Author

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.

@taosiyuan163

Copy link
Copy Markdown
Author

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.

Tagging likely owners for a quick look: @alt-glitch @Brooklyn-Dev

@taosiyuan163 taosiyuan163 changed the title feat: add model picker provider filtering feat(/model): honor picker_providers across pickers May 15, 2026
@taosiyuan163 taosiyuan163 force-pushed the feat-model-picker-provider-filter-12655-mainwd branch from afde487 to 2eeec59 Compare May 15, 2026 15:04
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 comp/gateway Gateway runner, session dispatch, delivery comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(model-picker): add picker_providers config to filter which providers appear in /model

2 participants