{"record":{"id":"edd7a2b8bbb16810","repo":"BerriAI/litellm","slug":"valkey-semantic-does-not-support-cluster-mode-enab","errorCode":null,"errorMessage":"valkey-semantic does not support cluster-mode-enabled (multi-shard) endpoints. The async cluster client cannot route the FT.* search commands reliably. Point it at a cluster-mode-disabled endpoint instead (a primary with replicas is fine; only horizontal sharding is unsupported), or pass a single redis_url. On AWS, vector search needs ElastiCache for Valkey 8.2+ on a node-based cluster.","messagePattern":"valkey-semantic does not support cluster-mode-enabled \\(multi-shard\\) endpoints\\. The async cluster client cannot route the FT\\.\\* search commands reliably\\. Point it at a cluster-mode-disabled endpoint instead \\(a primary with replicas is fine; only horizontal sharding is unsupported\\), or pass a single redis_url\\. On AWS, vector search needs ElastiCache for Valkey 8\\.2\\+ on a node-based cluster\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/caching/valkey_semantic_cache.py","lineNumber":70,"sourceCode":"        self,\n        host: str | None = None,\n        port: str | None = None,\n        password: str | None = None,\n        redis_url: str | None = None,\n        similarity_threshold: float | None = None,\n        embedding_model: str = \"text-embedding-ada-002\",\n        index_name: str | None = None,\n        ssl: bool = False,\n        startup_nodes: list | None = None,\n        sync_client: Redis | None = None,\n        async_client: AsyncRedis | None = None,\n        **kwargs: Any,\n    ):\n        if similarity_threshold is None:\n            raise ValueError(\"similarity_threshold must be provided, passed None\")\n\n        if startup_nodes:\n            raise ValueError(\n                \"valkey-semantic does not support cluster-mode-enabled (multi-shard) \"\n                \"endpoints. The async cluster client cannot route the FT.* search \"\n                \"commands reliably. Point it at a cluster-mode-disabled endpoint \"\n                \"instead (a primary with replicas is fine; only horizontal sharding \"\n                \"is unsupported), or pass a single redis_url. On AWS, vector search \"\n                \"needs ElastiCache for Valkey 8.2+ on a node-based cluster.\"\n            )\n\n        self.similarity_threshold = similarity_threshold\n        self.embedding_model = embedding_model\n        self.index_name = index_name or self.DEFAULT_VALKEY_INDEX_NAME\n        self.key_prefix = f\"{self.index_name}:\"\n        self._index_dim: int | None = None\n\n        resolved_url = None\n        if sync_client is None or async_client is None:\n            resolved_url = redis_url or self._build_valkey_url(host, port, password, ssl)\n        self.sync_client = sync_client if sync_client is not None else Redis.from_url(resolved_url)","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/caching/valkey_semantic_cache.py#L52-L88","documentation":"Error \"valkey-semantic does not support cluster-mode-enabled (multi-shard) endpoints. The async cluster client cannot route the FT.* search commands reliably. Point it at a cluster-mode-disabled endpoint instead (a primary with replicas is fine; only horizontal sharding is unsupported), or pass a single redis_url. On AWS, vector search needs ElastiCache for Valkey 8.2+ on a node-based cluster.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/caching/valkey_semantic_cache.py:70 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point the Valkey semantic cache at a cluster-mode-disabled endpoint (a primary with replicas is fine; horizontal sharding is unsupported).","Pass a single redis_url instead of cluster endpoints. On AWS use ElastiCache for Valkey 8.2+ on a node-based cluster."],"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"}