mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-06 12:52:11 +00:00
fix(models): live-first merge + update opencode-zen catalog + uncap aggregator picker
This commit is contained in:
parent
2e7e600eaa
commit
f98ffbc246
5 changed files with 110 additions and 26 deletions
|
|
@ -44,6 +44,11 @@ from agent.models_dev import (
|
|||
list_provider_models,
|
||||
)
|
||||
|
||||
# Providers whose picker model list should NOT be capped by max_models.
|
||||
# OpenCode Zen is an aggregator whose full catalog must be visible so
|
||||
# users can pick any model they have access to.
|
||||
_UNCAPPED_PICKER_PROVIDERS: frozenset[str] = frozenset({"opencode-zen"})
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
@ -1650,7 +1655,10 @@ def list_authenticated_providers(
|
|||
if hermes_id in _MODELS_DEV_PREFERRED:
|
||||
model_ids = _merge_with_models_dev(hermes_id, model_ids)
|
||||
total = len(model_ids)
|
||||
top = model_ids[:max_models] if max_models is not None else model_ids
|
||||
if hermes_id in _UNCAPPED_PICKER_PROVIDERS:
|
||||
top = model_ids # Aggregator: show full catalog regardless of max_models
|
||||
else:
|
||||
top = model_ids[:max_models] if max_models is not None else model_ids
|
||||
|
||||
slug = hermes_id
|
||||
pinfo = _mdev_pinfo(mdev_id)
|
||||
|
|
@ -1813,7 +1821,10 @@ def list_authenticated_providers(
|
|||
if hermes_slug in _MODELS_DEV_PREFERRED:
|
||||
model_ids = _merge_with_models_dev(hermes_slug, model_ids)
|
||||
total = len(model_ids)
|
||||
top = model_ids[:max_models] if max_models is not None else model_ids
|
||||
if hermes_slug in _UNCAPPED_PICKER_PROVIDERS:
|
||||
top = model_ids # Aggregator: show full catalog regardless of max_models
|
||||
else:
|
||||
top = model_ids[:max_models] if max_models is not None else model_ids
|
||||
|
||||
results.append({
|
||||
"slug": hermes_slug,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue