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.
This commit is contained in:
user 2026-05-04 22:10:59 +00:00
parent af7794272b
commit 7d7244986e
No known key found for this signature in database

View file

@ -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": {