Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(voyage): drop redundant isinstance list check to satisfy basedpyright budget

fzowl8c8cd890adcc
diff --git a/litellm/llms/voyage/embedding/transformation_contextual.py b/litellm/llms/voyage/embedding/transformation_contextual.py
index 0c02f00fbd5..a9a4a01f8e3 100644
--- a/litellm/llms/voyage/embedding/transformation_contextual.py
+++ b/litellm/llms/voyage/embedding/transformation_contextual.py
@@ -152,9 +152,9 @@ class VoyageContextualEmbeddingConfig(BaseEmbeddingConfig):
return [input], {} # mutable-ok: fresh list returned to caller
return [input], cls._auto_chunk_params(optional_params) # mutable-ok: fresh list returned to caller
- if isinstance(input, list) and all(isinstance(i, str) for i in input):
+ if all(isinstance(i, str) for i in input):
if optional_params.get("input_type") == "query":
- return input, {} # pyright: ignore[reportReturnType] # narrowed to list[str] by isinstance+all check
+ return input, {} # pyright: ignore[reportReturnType] # narrowed to list[str] by all(isinstance) check
return input, cls._auto_chunk_params(optional_params) # pyright: ignore[reportReturnType] # narrowed to list[str]
return input, {} # pyright: ignore[reportReturnType] # list[list[str]] branch