From f81161a05cbe62eee96bfd3c7b6beb16819bf716 Mon Sep 17 00:00:00 2001 From: xywei Date: Tue, 22 Jul 2025 21:16:39 -0500 Subject: [PATCH 1/2] Remove vector store methods from global scope --- litellm/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/litellm/__init__.py b/litellm/__init__.py index c056e667269..a8fe5063709 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -1195,7 +1195,6 @@ from .router import Router from .assistants.main import * from .batches.main import * from .images.main import * -from .vector_stores import * from .batch_completion.main import * # type: ignore from .rerank_api.main import * from .llms.anthropic.experimental_pass_through.messages.handler import * From ed0ad6fd599812b16b0b012aabe35328e31e4054 Mon Sep 17 00:00:00 2001 From: xywei Date: Tue, 22 Jul 2025 22:18:02 -0500 Subject: [PATCH 2/2] Help mypy with typing asearch --- .../vector_store_integrations/vector_store_pre_call_hook.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/integrations/vector_store_integrations/vector_store_pre_call_hook.py b/litellm/integrations/vector_store_integrations/vector_store_pre_call_hook.py index 59c378f8204..8ef160dd783 100644 --- a/litellm/integrations/vector_store_integrations/vector_store_pre_call_hook.py +++ b/litellm/integrations/vector_store_integrations/vector_store_pre_call_hook.py @@ -8,6 +8,7 @@ It searches the vector store for relevant context and appends it to the messages from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, cast import litellm +import litellm.vector_stores from litellm._logging import verbose_logger from litellm.integrations.custom_logger import CustomLogger from litellm.types.llms.openai import AllMessageValues, ChatCompletionUserMessage @@ -192,4 +193,4 @@ class VectorStorePreCallHook(CustomLogger): modified_messages.insert(-1, cast(AllMessageValues, context_message)) return modified_messages - return messages \ No newline at end of file + return messages