Skip to content

The agent that grows with you

fix(models): clear probe negative-cache entry on a successful probe

kshitijk4poor4e2a871adbfe
diff --git a/hermes_cli/models.py b/hermes_cli/models.py
index ab83fe72720..c082e776b79 100644
--- a/hermes_cli/models.py
+++ b/hermes_cli/models.py
@@ -2256,6 +2256,8 @@ def probe_api_models(
data = _get_json(url, timeout=timeout, headers=headers, **_open_kwargs)
except Exception:
continue
+ if _neg_key is not None:
+ _probe_neg_cache.pop(_neg_key, None)
return _probe_result(
[m.get("id", "") for m in data.get("data", [])], url, candidate_base.rstrip("/"),
alternate_base if alternate_base != candidate_base else normalized, is_fallback)