fix(models): plugin providers without a static catalog row keep their pinned models in the GUI picker
model.options (Desktop/TUI) reads catalogs non-blocking from the disk cache; a cold cache falls back to the curated dict, which was built from _PROVIDER_MODELS only, so any plugin provider rendered an empty model list on first open. Seed the curated floor from the profile's fallback_models. Red on base via tests/tui_gateway/test_external_process_picker.py.
This commit is contained in:
@@ -1132,6 +1132,12 @@ def _build_curated_lists(current_provider: str, current_base_url: str, current_m
|
||||
from hermes_cli.models import OPENROUTER_MODELS, _PROVIDER_MODELS, get_curated_nous_model_ids
|
||||
curated: dict[str, list[str]] = dict(_PROVIDER_MODELS)
|
||||
curated["openrouter"] = [mid for mid, _ in OPENROUTER_MODELS]
|
||||
# Plugin profiles without a static row: their fallback_models are the curated floor, so the
|
||||
# non-blocking GUI read (cold catalog cache) lists them instead of an empty provider row.
|
||||
from providers import list_providers
|
||||
for _pp in list_providers():
|
||||
if _pp.fallback_models and not curated.get(_pp.name):
|
||||
curated[_pp.name] = list(_pp.fallback_models)
|
||||
# Remote manifest so new Portal models surface without a release; in-repo snapshot fallback.
|
||||
curated["nous"] = get_curated_nous_model_ids()
|
||||
if "ollama-cloud" not in curated:
|
||||
|
||||
Reference in New Issue
Block a user