mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
fix: respect Honcho env var fallback in doctor and honcho status
hermes doctor and hermes honcho status warned 'Honcho config not found' whenever ~/.honcho/config.json was absent, even though HONCHO_API_KEY in .env resolves a working config via HonchoClientConfig.from_global_config() -> from_env(). Both now check hcfg.api_key/base_url before warning. Co-authored-by: oxngon <98992931+oxngon@users.noreply.github.com>
This commit is contained in:
parent
fa8fd513ea
commit
e2cc24e331
2 changed files with 24 additions and 4 deletions
|
|
@ -878,9 +878,21 @@ def cmd_status(args) -> None:
|
|||
write_path = _local_config_path()
|
||||
|
||||
if not cfg:
|
||||
print(f" No Honcho config found at {active_path}")
|
||||
print(" Run 'hermes honcho setup' to configure.\n")
|
||||
return
|
||||
# Config file missing — try env var fallback before giving up.
|
||||
try:
|
||||
from plugins.memory.honcho.client import HonchoClientConfig
|
||||
_env_cfg = HonchoClientConfig.from_global_config(host=_host_key())
|
||||
if _env_cfg.api_key or _env_cfg.base_url:
|
||||
# Env var fallback worked — use that config instead.
|
||||
cfg = {"apiKey": _env_cfg.api_key, "enabled": _env_cfg.enabled}
|
||||
else:
|
||||
print(f" No Honcho config found at {active_path}")
|
||||
print(" Run 'hermes honcho setup' to configure.\n")
|
||||
return
|
||||
except Exception:
|
||||
print(f" No Honcho config found at {active_path}")
|
||||
print(" Run 'hermes honcho setup' to configure.\n")
|
||||
return
|
||||
|
||||
try:
|
||||
from plugins.memory.honcho.client import HonchoClientConfig, get_honcho_client
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue