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:
nidhi-singh02 2026-03-24 14:42:16 +05:30 committed by Teknium
parent 59c7cc64f0
commit c4a21d7831

View file

@ -102,8 +102,10 @@ def _auto_detect_local_model(base_url: str) -> str:
model_id = models[0].get("id", "")
if model_id:
return model_id
except Exception:
pass
except Exception as exc:
# 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 ""