From 27dcfc8c8318798bf89b0977de5965641565a12c Mon Sep 17 00:00:00 2001 From: yucheng Date: Wed, 30 Sep 2026 21:50:41 +0000 Subject: [PATCH] style(guardrails): shorten Azure cast-ok reasons to fit the line limit Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/proxy/guardrails/guardrail_hooks/azure/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/guardrails/guardrail_hooks/azure/base.py b/litellm/proxy/guardrails/guardrail_hooks/azure/base.py index acf0e12b8e0..ec183ddf7e7 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/azure/base.py +++ b/litellm/proxy/guardrails/guardrail_hooks/azure/base.py @@ -139,10 +139,10 @@ class AzureGuardrailBase: responses_input: Final = data.get("input") if not isinstance(responses_input, (str, list)): return None - validated_input: Final = cast(ResponseInputParam, responses_input) # cast-ok: isinstance narrowed to str | list, the ResponseInputParam shape + validated_input: Final = cast(ResponseInputParam, responses_input) # cast-ok: narrowed to str | list return get_last_user_message(ResponsesAPIRequestUtils.responses_input_to_chat_messages(validated_input)) messages: Final = data.get("messages") if not isinstance(messages, list): return None - return get_last_user_message(cast(list[AllMessageValues], messages)) # cast-ok: isinstance narrowed to list, the message list shape + return get_last_user_message(cast(list[AllMessageValues], messages)) # cast-ok: narrowed to list