{"record":{"id":"2462300341391360","repo":"BerriAI/litellm","slug":"error-from-qdrant-checking-if-collections-exist","errorCode":null,"errorMessage":"Error from qdrant checking if /collections exist {collection_exists.text}","messagePattern":"Error from qdrant checking if /collections exist (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/caching/qdrant_semantic_cache.py","lineNumber":96,"sourceCode":"            raise ValueError(\"Qdrant url must be provided\")\n\n        self.qdrant_api_base = qdrant_api_base\n        self.qdrant_api_key = qdrant_api_key\n        print_verbose(f\"qdrant semantic-cache qdrant_api_base: {self.qdrant_api_base}\")\n\n        self.headers = headers\n\n        self.sync_client = _get_httpx_client()\n        self.async_client = get_async_httpx_client(llm_provider=httpxSpecialProvider.Caching)\n\n        if quantization_config is None:\n            print_verbose(\"Quantization config is not provided. Default binary quantization will be used.\")\n        collection_exists: Final = self.sync_client.get(\n            url=f\"{self.qdrant_api_base}/collections/{self.collection_name}/exists\",\n            headers=self.headers,\n        )\n        if collection_exists.status_code != 200:\n            raise ValueError(f\"Error from qdrant checking if /collections exist {collection_exists.text}\")\n\n        if collection_exists.json()[\"result\"][\"exists\"]:\n            collection_details = self.sync_client.get(\n                url=f\"{self.qdrant_api_base}/collections/{self.collection_name}\",\n                headers=self.headers,\n            )\n            self.collection_info = collection_details.json()\n            print_verbose(f\"Collection already exists.\\nCollection details:{self.collection_info}\")\n            self._ensure_cache_key_payload_index()\n        else:\n            quantization_params: dict[str, Any]\n            if quantization_config is None or quantization_config == \"binary\":\n                quantization_params = {\n                    \"binary\": {\n                        \"always_ram\": False,\n                    }\n                }\n            elif quantization_config == \"scalar\":","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/caching/qdrant_semantic_cache.py#L78-L114","documentation":"The startup probe that checks whether the Qdrant collection exists returned a non-success body (echoed via collection_exists.text), meaning the endpoint was reachable but the /collections request itself errored — e.g. bad credentials, wrong URL path, or a server-side failure.","triggerScenarios":"Thrown at litellm/caching/qdrant_semantic_cache.py:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the Qdrant server is reachable and the API key (if required) is valid; the response body contains the server error.","Confirm the Qdrant URL and credentials, then retry."],"exampleFix":null,"handlingStrategy":"try-catch","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"}