mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-07 02:25:34 +00:00
fix(router): sync vector store wrapper missing model argument
The sync wrapper for vector_store_retrieve, vector_store_list, vector_store_update, and vector_store_delete was routing through _generic_api_call_with_fallbacks which requires a model argument. These operations don't require a model. Mirror the async path: call the function directly when no model is provided. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
8ca744036a
commit
600bf031cf
+22
-4
@@ -4846,10 +4846,6 @@ class Router:
|
||||
"generate_content_stream",
|
||||
"vector_store_search",
|
||||
"vector_store_create",
|
||||
"vector_store_retrieve",
|
||||
"vector_store_list",
|
||||
"vector_store_update",
|
||||
"vector_store_delete",
|
||||
"ocr",
|
||||
"search",
|
||||
"video_generation",
|
||||
@@ -4874,6 +4870,28 @@ class Router:
|
||||
|
||||
return sync_wrapper
|
||||
|
||||
if call_type in (
|
||||
"vector_store_retrieve",
|
||||
"vector_store_list",
|
||||
"vector_store_update",
|
||||
"vector_store_delete",
|
||||
):
|
||||
|
||||
def vector_store_sync_wrapper(
|
||||
custom_llm_provider: Optional[str] = None,
|
||||
client: Optional[Any] = None,
|
||||
**kwargs,
|
||||
):
|
||||
if custom_llm_provider and "custom_llm_provider" not in kwargs:
|
||||
kwargs["custom_llm_provider"] = custom_llm_provider
|
||||
if kwargs.get("model"):
|
||||
return self._generic_api_call_with_fallbacks(
|
||||
original_function=original_function, **kwargs
|
||||
)
|
||||
return original_function(**kwargs)
|
||||
|
||||
return vector_store_sync_wrapper
|
||||
|
||||
if call_type in (
|
||||
"vector_store_file_create",
|
||||
"vector_store_file_list",
|
||||
|
||||
Reference in New Issue
Block a user