From 8d39a86e453a04ac0218999d6f8d9f5ed98c38dc Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 17:07:44 +0000 Subject: [PATCH] fix(vector_stores): track config-defined vector store ids as an immutable frozenset Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/vector_stores/vector_store_registry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/vector_stores/vector_store_registry.py b/litellm/vector_stores/vector_store_registry.py index efb6405cb5c..4d38c65f85d 100644 --- a/litellm/vector_stores/vector_store_registry.py +++ b/litellm/vector_stores/vector_store_registry.py @@ -104,7 +104,7 @@ class VectorStoreRegistry: def __init__(self, vector_stores: list[LiteLLM_ManagedVectorStore] = []): self.vector_stores: list[LiteLLM_ManagedVectorStore] = vector_stores self.vector_store_ids_to_vector_store_map: dict[str, LiteLLM_ManagedVectorStore] = {} - self.config_vector_store_ids: set[str] = set() + self.config_vector_store_ids: frozenset[str] = frozenset() def _extract_tool_params(self, tool: dict) -> VectorStoreToolParams: """ @@ -430,7 +430,7 @@ class VectorStoreRegistry: updated_at=datetime.now(timezone.utc), ) self.vector_stores.append(litellm_managed_vector_store) - self.config_vector_store_ids.add(vector_store_id) + self.config_vector_store_ids = self.config_vector_store_ids | frozenset((vector_store_id,)) verbose_logger.debug( "all loaded vector stores = %s", @@ -476,7 +476,7 @@ class VectorStoreRegistry: for vector_store in self.vector_stores if vector_store.get("vector_store_id") != vector_store_id ] - self.config_vector_store_ids.discard(vector_store_id) + self.config_vector_store_ids = self.config_vector_store_ids - frozenset((vector_store_id,)) def update_vector_store_in_registry(self, vector_store_id: str, updated_data: LiteLLM_ManagedVectorStore): """Update or add a vector store in the registry"""