{"record":{"id":"2970fa91389b90d0","repo":"BerriAI/litellm","slug":"qdrant-url-must-be-provided","errorCode":null,"errorMessage":"Qdrant url must be provided","messagePattern":"Qdrant url must be provided","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/caching/qdrant_semantic_cache.py","lineNumber":78,"sourceCode":"        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)\n\n        qdrant_api_base = qdrant_api_base or os.getenv(\"QDRANT_URL\") or os.getenv(\"QDRANT_API_BASE\")\n        qdrant_api_key = qdrant_api_key or os.getenv(\"QDRANT_API_KEY\")\n        headers = {\"Content-Type\": \"application/json\"}\n        if qdrant_api_key:\n            headers[\"api-key\"] = qdrant_api_key\n\n        if qdrant_api_base is None:\n            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}\")","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/caching/qdrant_semantic_cache.py#L60-L96","documentation":"QdrantSemanticCache could not resolve a Qdrant endpoint: qdrant_api_base was not passed (or did not resolve via os.environ/ lookup) and the QDRANT_URL environment variable is unset, so there is no server to create or query collections on.","triggerScenarios":"Thrown at litellm/caching/qdrant_semantic_cache.py:78 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the Qdrant instance URL via the qdrant_url parameter or the QDRANT_URL environment variable.","Verify the URL points to a reachable Qdrant server, e.g. http://localhost:6333."],"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"}