fix(models): pass model.base_url to fetch_models in /model picker
The /model interactive picker resolved a base_url from user credentials but never passed it to ProviderProfile.fetch_models(), causing the picker to always query the provider's hardcoded default endpoint instead of the user's custom URL (e.g. a company litellm proxy). - providers/base.py: add optional base_url parameter to fetch_models() - hermes_cli/models.py: pass resolved base_url to fetch_models() - Update all subclass overrides for signature compatibility - Add 6 regression tests covering override, fallback, and integration
This commit is contained in:
@@ -2371,7 +2371,7 @@ def provider_model_ids(provider: Optional[str], *, force_refresh: bool = False)
|
||||
if not base_url:
|
||||
base_url = _p.base_url
|
||||
if api_key:
|
||||
live = _p.fetch_models(api_key=api_key)
|
||||
live = _p.fetch_models(api_key=api_key, base_url=base_url or None)
|
||||
if live:
|
||||
# Merge static curated list with live API results so
|
||||
# models that the live endpoint omits (stale cache,
|
||||
|
||||
Reference in New Issue
Block a user