From 2bb3f604a783c91ee4b7cd29c6ac5c558cb41abf Mon Sep 17 00:00:00 2001 From: Yucheng Zhu Date: Sat, 11 Jul 2026 17:55:27 -0700 Subject: [PATCH] fix(guardrails): use builtin frozenset generic for TEXT_PART_TYPES annotation Frozenset is not a defined name (typing exports FrozenSet, the builtin is frozenset), so module import raised NameError and broke every proxy test suite. The builtin generic is valid on the supported python floor (3.10) and keeps the UP006 ruff-strict budget at its ceiling, which the typing alias would exceed --- litellm/proxy/guardrails/_content_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/guardrails/_content_utils.py b/litellm/proxy/guardrails/_content_utils.py index 7b15bdcf6f7..311b092bce9 100644 --- a/litellm/proxy/guardrails/_content_utils.py +++ b/litellm/proxy/guardrails/_content_utils.py @@ -32,7 +32,7 @@ def is_text_content_call_type(call_type: str) -> bool: return call_type in TEXT_CONTENT_CALL_TYPES -TEXT_PART_TYPES: Frozenset[str] = frozenset({"text", "input_text", "output_text", "summary_text"}) +TEXT_PART_TYPES: frozenset[str] = frozenset({"text", "input_text", "output_text", "summary_text"}) def _iter_summary_texts(summary: Any) -> Iterator[str]: