From e1b0a578e30c4cc4239511fef01669482c3bd2b1 Mon Sep 17 00:00:00 2001 From: Vineeth Sai Date: Thu, 27 Aug 2026 10:25:36 -0700 Subject: [PATCH] fix(streaming): annotate the narrowing helper with object rather than Any The helper isinstance-narrows its argument, so it does not need a dynamically typed annotation; object works and keeps the repo's ANN401 budget unchanged. Signed-off-by: Vineeth Sai --- litellm/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/main.py b/litellm/main.py index 4d8708752fe..8fab6dbf0d0 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -8629,7 +8629,7 @@ def _chunks_for_streaming_choice_index( ] -def _renumbered_first_choice(response: Any, index: int) -> Choices | None: +def _renumbered_first_choice(response: object, index: int) -> Choices | None: """The single choice a per-index build produced, renumbered to that index. None when the build did not yield a usable non-streaming choice: `stream_chunk_builder`