Skip to content

The agent that grows with you

fix(runtime_provider): log the per-model api_mode hook failure instead of a blind catch

Tekniumef4e50ebd3ed
diff --git a/hermes_cli/runtime_provider.py b/hermes_cli/runtime_provider.py
index eb6c83e36d0..78a9251767c 100644
--- a/hermes_cli/runtime_provider.py
+++ b/hermes_cli/runtime_provider.py
@@ -292,7 +292,8 @@ def _profile_runtime_api_mode(provider: str, model_cfg: dict[str, Any], api_key:
return "chat_completions"
try:
return profile.api_mode_for_model(model_name, api_key=api_key) or "chat_completions"
- except Exception:
+ except Exception: # plugin hook (live catalog fetch): degrade to chat_completions, never fail resolution
+ logger.debug("%s api_mode_for_model(%s) failed", provider, model_name, exc_info=True)
return "chat_completions"