From 5b9c7aeb15d8924f4aa224d994fd75352db07ec1 Mon Sep 17 00:00:00 2001 From: dajiaohuang Date: Fri, 4 Sep 2026 14:15:04 +0800 Subject: [PATCH] test: isolate vector store registry defaults --- .../vector_stores/test_vector_store_registry.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_litellm/vector_stores/test_vector_store_registry.py b/tests/test_litellm/vector_stores/test_vector_store_registry.py index f19c3706845..4d8b16ada5e 100644 --- a/tests/test_litellm/vector_stores/test_vector_store_registry.py +++ b/tests/test_litellm/vector_stores/test_vector_store_registry.py @@ -71,6 +71,22 @@ def test_get_credentials_for_vector_store(): assert result == {} +def test_vector_store_registries_do_not_share_default_list(): + first = VectorStoreRegistry() + second = VectorStoreRegistry() + + first.vector_stores.append( + LiteLLM_ManagedVectorStore( + vector_store_id="first", + custom_llm_provider="openai", + created_at=datetime.now(timezone.utc), + updated_at=datetime.now(timezone.utc), + ) + ) + + assert second.vector_stores == [] + + def test_add_vector_store_to_registry(): """Test that add_vector_store_to_registry adds vector store correctly when there are pre-existing stores""" # Create pre-existing vector stores