BerriAI/litellm · error · Exception
collection_name must be provided, passed None
Error message
collection_name must be provided, passed None
What it means
Raised in QdrantSemanticCache.__init__ when the caching layer is instantiated without a collection_name. The Qdrant semantic cache needs a named collection to read/write embeddings, so a None value aborts setup before any client is created.
Solutions
- Pass a non-None collection_name when constructing the Qdrant semantic cache.
- Set collection_name in your cache configuration before making cached calls.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/caching/qdrant_semantic_cache.py:51 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/35bab968542ec5bf.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/caching/qdrant_semantic_cache.py:51
self,
qdrant_api_base=None,
qdrant_api_key=None,
collection_name=None,
similarity_threshold=None,
quantization_config=None,
embedding_model="text-embedding-ada-002",
host_type=None,
vector_size=None,
):
from litellm.llms.custom_httpx.http_handler import (
_get_httpx_client,
get_async_httpx_client,
httpxSpecialProvider,
)
from litellm.secret_managers.main import get_secret_str
if collection_name is None:
raise Exception("collection_name must be provided, passed None")
self.collection_name = collection_name
print_verbose(f"qdrant semantic-cache initializing COLLECTION - {self.collection_name}")
if similarity_threshold is None:
raise Exception("similarity_threshold must be provided, passed None")
self.similarity_threshold = similarity_threshold
self.embedding_model = embedding_model
self.vector_size = vector_size if vector_size is not None else QDRANT_VECTOR_SIZE
headers = {}
# check if defined as os.environ/ variable
if qdrant_api_base:
if isinstance(qdrant_api_base, str) and qdrant_api_base.startswith("os.environ/"):
qdrant_api_base = get_secret_str(qdrant_api_base)
if qdrant_api_key:
if isinstance(qdrant_api_key, str) and qdrant_api_key.startswith("os.environ/"):
qdrant_api_key = get_secret_str(qdrant_api_key)View on GitHub (pinned to 77b7c6c40c)