mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
fix(doctor): skip /models health check for providers that don't support it
Xiaomi MiMo's /v1/models endpoint returns 401 even with a valid API key, causing hermes doctor to falsely report 'invalid API key'. Add a `supports_health_check` field to ProviderProfile (default True). Providers whose /models endpoint doesn't support auth verification can set it to False. The doctor's dynamic provider discovery now reads this field instead of hardcoding True. The xiaomi provider plugin sets supports_health_check=False.
This commit is contained in:
parent
a54d4b0e46
commit
0c233e70f8
3 changed files with 4 additions and 1 deletions
|
|
@ -287,7 +287,8 @@ def _build_apikey_providers_list() -> list:
|
|||
(_pp.models_url or (_pp.base_url.rstrip("/") + "/models"))
|
||||
if _pp.base_url else None
|
||||
)
|
||||
_static.append((_label, _key_vars, _models_url, _base_var, True))
|
||||
_hc = getattr(_pp, "supports_health_check", True)
|
||||
_static.append((_label, _key_vars, _models_url, _base_var, _hc))
|
||||
except Exception:
|
||||
pass
|
||||
return _static
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue