BerriAI/litellm · error · ValueError

Error from qdrant checking if /collections exist

Error message

Error from qdrant checking if /collections exist {collection_exists.text}

What it means

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.

Solutions

  1. Check that the Qdrant server is reachable and the API key (if required) is valid; the response body contains the server error.
  2. Confirm the Qdrant URL and credentials, then retry.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at litellm/caching/qdrant_semantic_cache.py:96 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/2462300341391360. Report an issue: GitHub.

Appendix: source

Thrown at litellm/caching/qdrant_semantic_cache.py:96

            raise ValueError("Qdrant url must be provided")

        self.qdrant_api_base = qdrant_api_base
        self.qdrant_api_key = qdrant_api_key
        print_verbose(f"qdrant semantic-cache qdrant_api_base: {self.qdrant_api_base}")

        self.headers = headers

        self.sync_client = _get_httpx_client()
        self.async_client = get_async_httpx_client(llm_provider=httpxSpecialProvider.Caching)

        if quantization_config is None:
            print_verbose("Quantization config is not provided. Default binary quantization will be used.")
        collection_exists: Final = self.sync_client.get(
            url=f"{self.qdrant_api_base}/collections/{self.collection_name}/exists",
            headers=self.headers,
        )
        if collection_exists.status_code != 200:
            raise ValueError(f"Error from qdrant checking if /collections exist {collection_exists.text}")

        if collection_exists.json()["result"]["exists"]:
            collection_details = self.sync_client.get(
                url=f"{self.qdrant_api_base}/collections/{self.collection_name}",
                headers=self.headers,
            )
            self.collection_info = collection_details.json()
            print_verbose(f"Collection already exists.\nCollection details:{self.collection_info}")
            self._ensure_cache_key_payload_index()
        else:
            quantization_params: dict[str, Any]
            if quantization_config is None or quantization_config == "binary":
                quantization_params = {
                    "binary": {
                        "always_ram": False,
                    }
                }
            elif quantization_config == "scalar":

View on GitHub (pinned to 77b7c6c40c)