{"record":{"id":"35bab968542ec5bf","repo":"BerriAI/litellm","slug":"collection-name-must-be-provided-passed-none","errorCode":null,"errorMessage":"collection_name must be provided, passed None","messagePattern":"collection_name must be provided, passed None","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/caching/qdrant_semantic_cache.py","lineNumber":51,"sourceCode":"        self,\n        qdrant_api_base=None,\n        qdrant_api_key=None,\n        collection_name=None,\n        similarity_threshold=None,\n        quantization_config=None,\n        embedding_model=\"text-embedding-ada-002\",\n        host_type=None,\n        vector_size=None,\n    ):\n        from litellm.llms.custom_httpx.http_handler import (\n            _get_httpx_client,\n            get_async_httpx_client,\n            httpxSpecialProvider,\n        )\n        from litellm.secret_managers.main import get_secret_str\n\n        if collection_name is None:\n            raise Exception(\"collection_name must be provided, passed None\")\n\n        self.collection_name = collection_name\n        print_verbose(f\"qdrant semantic-cache initializing COLLECTION - {self.collection_name}\")\n\n        if similarity_threshold is None:\n            raise Exception(\"similarity_threshold must be provided, passed None\")\n        self.similarity_threshold = similarity_threshold\n        self.embedding_model = embedding_model\n        self.vector_size = vector_size if vector_size is not None else QDRANT_VECTOR_SIZE\n        headers = {}\n\n        # check if defined as os.environ/ variable\n        if qdrant_api_base:\n            if isinstance(qdrant_api_base, str) and qdrant_api_base.startswith(\"os.environ/\"):\n                qdrant_api_base = get_secret_str(qdrant_api_base)\n        if qdrant_api_key:\n            if isinstance(qdrant_api_key, str) and qdrant_api_key.startswith(\"os.environ/\"):\n                qdrant_api_key = get_secret_str(qdrant_api_key)","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/caching/qdrant_semantic_cache.py#L33-L69","documentation":"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.","triggerScenarios":"Thrown at litellm/caching/qdrant_semantic_cache.py:51 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-None collection_name when constructing the Qdrant semantic cache.","Set collection_name in your cache configuration before making cached calls."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}