From dcf17449981a142069b387caa402568722cbdadd Mon Sep 17 00:00:00 2001 From: Yujong Lee Date: Sun, 30 Aug 2026 18:03:24 -0700 Subject: [PATCH] fix(vector-stores): preserve S3 ingest embedding model --- litellm/proxy/rag_endpoints/endpoints.py | 5 +++++ ui/litellm-dashboard/src/components/networking.tsx | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/rag_endpoints/endpoints.py b/litellm/proxy/rag_endpoints/endpoints.py index 4d62f1d6d71..2f088a41d26 100644 --- a/litellm/proxy/rag_endpoints/endpoints.py +++ b/litellm/proxy/rag_endpoints/endpoints.py @@ -225,6 +225,11 @@ async def _save_vector_store_to_db_from_rag_ingest( if key not in excluded_keys and value is not None: provider_specific_params[key] = value + embedding_config: Final = ingest_options.get("embedding") + embedding_model: Final = embedding_config.get("model") if embedding_config else None + if custom_llm_provider == "s3_vectors" and isinstance(embedding_model, str) and embedding_model: + provider_specific_params["embedding_model"] = embedding_model + # Build file metadata entry using helper file_entry: Final = _build_file_metadata_entry( response=response, diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index b53a67f9bcc..f6a18af00d5 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -5805,12 +5805,19 @@ export const ragIngestCall = async ( const formData = new FormData(); formData.append("file", file); + const vectorStoreParams = { ...(providerSpecificParams ?? {}) }; + const s3EmbeddingModel = customLlmProvider === "s3_vectors" ? vectorStoreParams.embedding_model : undefined; + if (customLlmProvider === "s3_vectors") { + delete vectorStoreParams.embedding_model; + } + const ingestOptions: any = { ingest_options: { + ...(typeof s3EmbeddingModel === "string" && s3EmbeddingModel && { embedding: { model: s3EmbeddingModel } }), vector_store: { custom_llm_provider: customLlmProvider, ...(vectorStoreId && { vector_store_id: vectorStoreId }), - ...(providerSpecificParams && providerSpecificParams), + ...vectorStoreParams, }, }, };