From 7d7244986ed242e6807142ee2559ddf64d7b5c6f Mon Sep 17 00:00:00 2001 From: user <70670632+stuxf@users.noreply.github.com> Date: Mon, 4 May 2026 22:10:59 +0000 Subject: [PATCH] chore(caching): annotate qdrant quantization_params dict type Mypy infers the dict's value type from the first branch (Dict[str, bool]) which clashes with the scalar branch's mixed-type inner dict. Explicit Dict[str, Any] annotation lifts the inference. --- litellm/caching/qdrant_semantic_cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/caching/qdrant_semantic_cache.py b/litellm/caching/qdrant_semantic_cache.py index a9f01a4c902..9206f326ecd 100644 --- a/litellm/caching/qdrant_semantic_cache.py +++ b/litellm/caching/qdrant_semantic_cache.py @@ -12,7 +12,7 @@ import ast import asyncio import json import os -from typing import Any, Optional, cast +from typing import Any, Dict, Optional, cast import litellm from litellm._logging import print_verbose @@ -135,6 +135,7 @@ class QdrantSemanticCache(BaseCache): ) self._ensure_cache_key_payload_index() else: + quantization_params: Dict[str, Any] if quantization_config is None or quantization_config == "binary": quantization_params = { "binary": {