mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-25 05:52:34 +00:00
fix(cli): log swallowed exception in runtime model auto-detection
Replaces bare `except Exception: pass` with debug-level logging so failures in local endpoint model discovery are diagnosable instead of silently hidden.
This commit is contained in:
parent
59c7cc64f0
commit
c4a21d7831
1 changed files with 4 additions and 2 deletions
|
|
@ -102,8 +102,10 @@ def _auto_detect_local_model(base_url: str) -> str:
|
||||||
model_id = models[0].get("id", "")
|
model_id = models[0].get("id", "")
|
||||||
if model_id:
|
if model_id:
|
||||||
return model_id
|
return model_id
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
pass
|
# Log instead of silently swallowing — aids debugging when
|
||||||
|
# local model auto-detection fails unexpectedly.
|
||||||
|
logger.debug("Auto-detect model from %s failed: %s", base_url, exc)
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue