fix: evaluate_turn_regex crashes on a non-string agent_reply (#1723)

This commit is contained in:
Afonso Coutinho
2026-06-03 05:31:26 +01:00
committed by GitHub
parent 290d398900
commit ada30aa039
2 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ def evaluate_turn_regex(
return ("failure", f"tool result matched error pattern {pat.pattern!r}: {snippet!r}")
# Agent verbally gave up?
if agent_reply:
if isinstance(agent_reply, str) and agent_reply:
for pat in _REPLY_GIVE_UP_PATTERNS:
m = pat.search(agent_reply)
if m: