Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Add migration script for the new table

Sameer Kankutebd2787478667
diff --git a/litellm-proxy-extras/litellm_proxy_extras/migrations/20260213105436_add_managed_vector_store_table/migration.sql b/litellm-proxy-extras/litellm_proxy_extras/migrations/20260213105436_add_managed_vector_store_table/migration.sql
new file mode 100644
index 00000000000..0835875220f
--- /dev/null
+++ b/litellm-proxy-extras/litellm_proxy_extras/migrations/20260213105436_add_managed_vector_store_table/migration.sql
@@ -0,0 +1,22 @@
+-- CreateTable
+CREATE TABLE "LiteLLM_ManagedVectorStoreTable" (
+ "id" TEXT NOT NULL,
+ "unified_resource_id" TEXT NOT NULL,
+ "resource_object" JSONB,
+ "model_mappings" JSONB NOT NULL,
+ "flat_model_resource_ids" TEXT[] DEFAULT ARRAY[]::TEXT[],
+ "storage_backend" TEXT,
+ "storage_url" TEXT,
+ "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ "created_by" TEXT,
+ "updated_at" TIMESTAMP(3) NOT NULL,
+ "updated_by" TEXT,
+
+ CONSTRAINT "LiteLLM_ManagedVectorStoreTable_pkey" PRIMARY KEY ("id")
+);
+
+-- CreateIndex
+CREATE UNIQUE INDEX "LiteLLM_ManagedVectorStoreTable_unified_resource_id_key" ON "LiteLLM_ManagedVectorStoreTable"("unified_resource_id");
+
+-- CreateIndex
+CREATE INDEX "LiteLLM_ManagedVectorStoreTable_unified_resource_id_idx" ON "LiteLLM_ManagedVectorStoreTable"("unified_resource_id");
diff --git a/litellm-proxy-extras/litellm_proxy_extras/schema.prisma b/litellm-proxy-extras/litellm_proxy_extras/schema.prisma
index 558dfcc9517..2963c0c4fa3 100644
--- a/litellm-proxy-extras/litellm_proxy_extras/schema.prisma
+++ b/litellm-proxy-extras/litellm_proxy_extras/schema.prisma
@@ -766,6 +766,22 @@ model LiteLLM_ManagedObjectTable { // for batches or finetuning jobs which use t
@@index([model_object_id])
}
+model LiteLLM_ManagedVectorStoreTable {
+ id String @id @default(uuid())
+ unified_resource_id String @unique // The base64 encoded unified vector store ID
+ resource_object Json? // Stores the VectorStoreCreateResponse
+ model_mappings Json // Maps model_id -> provider_vector_store_id
+ flat_model_resource_ids String[] @default([]) // Flat list of provider vector store IDs for faster querying
+ storage_backend String? // Storage backend name (if applicable)
+ storage_url String? // Storage URL (if applicable)
+ created_at DateTime @default(now())
+ created_by String?
+ updated_at DateTime @updatedAt
+ updated_by String?
+
+ @@index([unified_resource_id])
+}
+
model LiteLLM_ManagedVectorStoresTable {
vector_store_id String @id
custom_llm_provider String
diff --git a/litellm/proxy/schema.prisma b/litellm/proxy/schema.prisma
index 37ed0182663..7979faf5501 100644
--- a/litellm/proxy/schema.prisma
+++ b/litellm/proxy/schema.prisma
@@ -764,6 +764,22 @@ model LiteLLM_ManagedObjectTable { // for batches or finetuning jobs which use t
@@index([model_object_id])
}
+model LiteLLM_ManagedVectorStoreTable {
+ id String @id @default(uuid())
+ unified_resource_id String @unique // The base64 encoded unified vector store ID
+ resource_object Json? // Stores the VectorStoreCreateResponse
+ model_mappings Json // Maps model_id -> provider_vector_store_id
+ flat_model_resource_ids String[] @default([]) // Flat list of provider vector store IDs for faster querying
+ storage_backend String? // Storage backend name (if applicable)
+ storage_url String? // Storage URL (if applicable)
+ created_at DateTime @default(now())
+ created_by String?
+ updated_at DateTime @updatedAt
+ updated_by String?
+
+ @@index([unified_resource_id])
+}
+
model LiteLLM_ManagedVectorStoresTable {
vector_store_id String @id
custom_llm_provider String