From 4a9b5d1d2687d7c5eb11290383212df55dfddb42 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Mon, 16 Feb 2026 18:12:56 -0800 Subject: [PATCH] feat: add risk_score field to StandardLoggingGuardrailInformation --- litellm/types/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/litellm/types/utils.py b/litellm/types/utils.py index 5fbfd23b2db..5f8798c7712 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -2644,6 +2644,9 @@ class StandardLoggingGuardrailInformation(TypedDict, total=False): alert_recipients: Optional[List[str]] """Email addresses that were notified""" + risk_score: Optional[float] + """Risk score 0-10 indicating how risky the request was (higher = riskier). Computed by the guardrail provider.""" + class GuardrailTracingDetail(TypedDict, total=False): """ @@ -2661,6 +2664,7 @@ class GuardrailTracingDetail(TypedDict, total=False): match_details: Optional[List[dict]] patterns_checked: Optional[int] alert_recipients: Optional[List[str]] + risk_score: Optional[float] StandardLoggingPayloadStatus = Literal["success", "failure"]