fix(cli): probe /v1/models for custom providers in model picker#20760
fix(cli): probe /v1/models for custom providers in model picker#20760dusterbloom wants to merge 1 commit into
Conversation
Custom providers only showed models from config (the singular model: field and models: dict). Now probes the live /v1/models endpoint and merges results, matching the existing behavior for user-defined providers. Also resolves key_env/api_key_env from environment variables so env-backed credentials trigger the probe. Closes NousResearch#20582
|
Thanks @alt-glitch — I see #19072 and #20763 cover the same core fix (adding This PR adds two things the others don't:
Happy to contribute the |
|
Superseded by upstream — main now ships an equivalent fix in Will open a follow-up PR with the four edge-case tests this branch had that upstream doesn't cover yet (dedupe, no-key skip, probe-failure fallback, |
Summary
/v1/modelsendpoint and merge results into the model picker, matching existing behavior for user-defined providers (Section 3)key_env/api_key_envfrom environment variables so env-backed credentials also trigger the probeRoot cause
list_authenticated_providers()Section 4 (custom_providers) only read the staticmodel:field andmodels:dict from config. Unlike Section 3 (user_providers), it never calledfetch_api_models()to discover all available models from the server.Changes
hermes_cli/model_switch.pytests/hermes_cli/test_model_switch_custom_providers.pyTest plan
Closes #20582