fix: LLM таймаут + debug-лог для диагностики

This commit is contained in:
Marker689
2026-05-10 05:01:31 +03:00
parent 46e79ceab1
commit 0a22c2cce8

View File

@@ -83,5 +83,9 @@ async def analyze_finding(finding_data: dict) -> dict | None:
content = body["choices"][0]["message"]["content"]
return json.loads(content)
except (KeyError, IndexError, json.JSONDecodeError) as e:
log.warning("LLM response parse error for rule=%s: %s", finding_data.get("rule"), e)
log.warning(
"LLM response parse error for rule=%s: %s",
finding_data.get("rule"),
e,
)
return None