fix(cli): non-zero /model counts for native OpenAI and direct API rows#14753
fix(cli): non-zero /model counts for native OpenAI and direct API rows#14753XieNBi wants to merge 1 commit into
Conversation
|
Thanks for flagging overlap with #13190. #13190 was closed as partially redundant: the duplicate-row work landed on #14753 is intentionally narrower than #13190: it adds a native Happy to adjust if maintainers prefer a different approach, but this is meant as the #14651 follow-up, not a re-submission of the full #13190 bundle. |
|
Thanks for this fix, @XieNBi! These changes have already landed on Automated hermes-sweeper review confirms the implementation is present:
The fix is pending inclusion in the next tagged release. Closing as implemented on main. |
Summary
Fixes misleading
total_models: 0inlist_authenticated_providers()for:openai— the Hermes↔models.dev mapping existed, but_PROVIDER_MODELShad no"openai"entry, so the curated list was always empty.providers:rows that point at the official OpenAI API (api.openai.com) but omit an explicitmodels/default_modellist — the picker now falls back to the same native OpenAI curated catalog instead of showing zero.Also extends
provider_model_ids("openai")to probe/v1/modelswhenOPENAI_API_KEYis set, with static catalog as fallback.Aligns with upstream issue: #14651
Changes
hermes_cli/models.py— add_PROVIDER_MODELS["openai"]; optional live model list viafetch_api_models+ envOPENAI_API_KEY/OPENAI_BASE_URL.hermes_cli/model_switch.py— for userproviders:entries with empty model lists and an official OpenAI base URL, backfill from the built-inopenaicurated list.tests/hermes_cli/test_user_providers_model_switch.py— regression tests for static catalog, built-in row totals, and user-provider fallback.Test plan