fix(delegate): tool_trace false-positive error detection for short outputs

This commit is contained in:
flooryyyy 2026-05-15 15:01:32 +01:00 committed by Teknium
parent 4279da4db6
commit 7d09bb1915

View file

@ -1649,7 +1649,7 @@ def _run_single_child(
trace_by_id[tc_id] = entry_t
elif msg.get("role") == "tool":
content = msg.get("content", "")
is_error = bool(content and "error" in content[:80].lower())
is_error = _looks_like_error_output(content)
result_meta = {
"result_bytes": len(content),
"status": "error" if is_error else "ok",