From ed916038be8fb0f5e5392edcf05b18c5fc6dce21 Mon Sep 17 00:00:00 2001 From: Aryan Deshmukh Date: Sat, 24 Oct 2026 12:27:38 +0530 Subject: [PATCH] fix(proxy): type the equality operand in the stream buffer list(other) on an isinstance-narrowed Sequence[Unknown] added one reportUnknownArgumentType, which tripped the basedpyright delta gate. Bind it to Sequence[object] first; behaviour is unchanged. --- litellm/proxy/pass_through_endpoints/bounded_chunk_buffer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/pass_through_endpoints/bounded_chunk_buffer.py b/litellm/proxy/pass_through_endpoints/bounded_chunk_buffer.py index 3c6e296f375..fc68f3de7a9 100644 --- a/litellm/proxy/pass_through_endpoints/bounded_chunk_buffer.py +++ b/litellm/proxy/pass_through_endpoints/bounded_chunk_buffer.py @@ -108,7 +108,10 @@ class BoundedChunkBuffer(Sequence[bytes]): return len(self._frames()) def __eq__(self, other: object) -> bool: - return isinstance(other, Sequence) and list(self) == list(other) + if not isinstance(other, Sequence): + return False + other_items: Final[Sequence[object]] = other + return list(self) == list(other_items) def __bool__(self) -> bool: return self.total_bytes > 0