From 4e4ff11bcafb3019b7bd75da97f643f47f77b548 Mon Sep 17 00:00:00 2001 From: Jonathan Neufeld Date: Thu, 1 Oct 2026 12:41:30 -0600 Subject: [PATCH] fix(valkey): keep basedpyright arg-type budget green after main merge The from_url client's return type is unknown under the types-redis 4.6 stubs, so raw_result reaches _to_response as an unknown-typed argument. Suppress reportUnknownArgumentType on those two returns, matching the existing stub-gap ignores on the same calls. No runtime change. Signed-off-by: Jonathan Neufeld --- litellm/llms/valkey/vector_stores/transformation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/llms/valkey/vector_stores/transformation.py b/litellm/llms/valkey/vector_stores/transformation.py index 6b8fb4b03a6..d36228eb50c 100644 --- a/litellm/llms/valkey/vector_stores/transformation.py +++ b/litellm/llms/valkey/vector_stores/transformation.py @@ -254,7 +254,7 @@ class ValkeyVectorStoreConfig(BaseDirectVectorStoreConfig): ) try: raw_result: Final = client.ft(vector_store_id).search(knn, query_params=vec_params) - return self._to_response(raw_result, query_text, params.text_field) + return self._to_response(raw_result, query_text, params.text_field) # pyright: ignore[reportUnknownArgumentType] # raw_result flows from the from_url client whose return type the types-redis 4.6 stubs leave unknown; the shape is validated inside _to_response finally: client.close() @@ -307,7 +307,7 @@ class ValkeyVectorStoreConfig(BaseDirectVectorStoreConfig): raw_result: Final = await client.ft(vector_store_id).search( # pyright: ignore[reportGeneralTypeIssues] # types-redis 4.6 stubs shadow redis 5.3.1 and type the async client's ft() as the sync Search, so search() returns a non-awaitable Result; it is a coroutine at runtime knn, query_params=vec_params ) - return self._to_response(raw_result, query_text, params.text_field) + return self._to_response(raw_result, query_text, params.text_field) # pyright: ignore[reportUnknownArgumentType] # raw_result flows from the from_url client whose return type the types-redis 4.6 stubs leave unknown; the shape is validated inside _to_response finally: await client.aclose()