fix: resolve 'auto' provider in /model display + update gateway handler
- normalize_provider('auto') now returns 'openrouter' (the default)
so /model shows the curated model list instead of nothing
- CLI /model display uses normalize_provider before looking up labels
- Gateway /model handler now uses the same validation logic as CLI:
live API probe, provider:model syntax, curated model list display
This commit is contained in:
parent
66d3e6a0c2
commit
132e5ec179
3 changed files with 85 additions and 22 deletions
10
cli.py
10
cli.py
|
|
@ -2131,15 +2131,13 @@ class HermesCLI:
|
|||
if message:
|
||||
print(f" Warning: {message}")
|
||||
else:
|
||||
from hermes_cli.models import curated_models_for_provider, _PROVIDER_LABELS
|
||||
provider_label = _PROVIDER_LABELS.get(
|
||||
self.provider or "openrouter",
|
||||
self.provider or "openrouter",
|
||||
)
|
||||
from hermes_cli.models import curated_models_for_provider, normalize_provider, _PROVIDER_LABELS
|
||||
display_provider = normalize_provider(self.provider)
|
||||
provider_label = _PROVIDER_LABELS.get(display_provider, display_provider)
|
||||
print(f"\n Current model: {self.model}")
|
||||
print(f" Current provider: {provider_label}")
|
||||
print()
|
||||
curated = curated_models_for_provider(self.provider)
|
||||
curated = curated_models_for_provider(display_provider)
|
||||
if curated:
|
||||
print(f" Available models ({provider_label}):")
|
||||
for mid, desc in curated:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue