Implementation:BerriAI Litellm Vector Store Endpoints
| Attribute | Value |
|---|---|
| Sources | enterprise/litellm_enterprise/proxy/vector_stores/endpoints.py |
| Domains | Vector Stores, REST API, Management Endpoints, Enterprise |
| Last Updated | 2026-02-15 16:00 GMT |
Overview
This module defines FastAPI management endpoints for creating, listing, retrieving, updating, and deleting vector store configurations in the LiteLLM proxy database and in-memory registry.
Description
The module provides a FastAPI APIRouter with five endpoints for vector store CRUD operations:
- POST /vector_store/new -- Creates a new vector store entry in the database and registers it in the in-memory
VectorStoreRegistry. - GET /vector_store/list -- Lists all vector stores with pagination, using the database as the source of truth and syncing the in-memory registry.
- POST /vector_store/delete -- Deletes a vector store from both the database and the in-memory registry.
- POST /vector_store/info -- Retrieves detailed information about a specific vector store by ID.
- POST /vector_store/update -- Updates vector store fields (name, description, metadata, litellm_params).
All endpoints require authentication via user_api_key_auth. Vector store metadata is JSON-serialized for database storage. The litellm_params field is validated through GenericLiteLLMParams before storage.
Usage
These endpoints are mounted on the LiteLLM proxy FastAPI application to provide administrative management of vector store configurations.
Code Reference
Source Location
enterprise/litellm_enterprise/proxy/vector_stores/endpoints.py
Signature
router = APIRouter()
@router.post("/vector_store/new")
async def new_vector_store(
vector_store: LiteLLM_ManagedVectorStore,
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
): ...
@router.get("/vector_store/list", response_model=LiteLLM_ManagedVectorStoreListResponse)
async def list_vector_stores(
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
page: int = 1, page_size: int = 100,
): ...
@router.post("/vector_store/delete")
async def delete_vector_store(
data: VectorStoreDeleteRequest,
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
): ...
@router.post("/vector_store/info", response_model=ResponseLiteLLM_ManagedVectorStore)
async def get_vector_store_info(
data: VectorStoreInfoRequest,
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
): ...
@router.post("/vector_store/update")
async def update_vector_store(
data: VectorStoreUpdateRequest,
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
): ...
Import
from litellm_enterprise.proxy.vector_stores.endpoints import router
I/O Contract
Inputs
| Endpoint | Parameter | Type | Description |
|---|---|---|---|
| POST /vector_store/new | vector_store |
LiteLLM_ManagedVectorStore |
Vector store ID, provider, name, description, metadata, litellm_params. |
| GET /vector_store/list | page, page_size |
int |
Pagination parameters (defaults: 1, 100). |
| POST /vector_store/delete | data |
VectorStoreDeleteRequest |
Contains vector_store_id.
|
| POST /vector_store/info | data |
VectorStoreInfoRequest |
Contains vector_store_id.
|
| POST /vector_store/update | data |
VectorStoreUpdateRequest |
Fields to update including vector_store_id.
|
Outputs
| Endpoint | Response Type | Description |
|---|---|---|
| POST /vector_store/new | dict |
{"status": "success", "message": ..., "vector_store": ...}
|
| GET /vector_store/list | LiteLLM_ManagedVectorStoreListResponse |
Paginated list with data, total_count, current_page, total_pages.
|
| POST /vector_store/delete | dict |
{"message": "Vector store ... deleted successfully"}
|
| POST /vector_store/info | ResponseLiteLLM_ManagedVectorStore |
{"vector_store": ...}
|
| POST /vector_store/update | dict |
{"vector_store": ...} with updated values.
|
Usage Examples
import httpx
# Create a new vector store
response = httpx.post(
"http://localhost:4000/vector_store/new",
json={
"vector_store_id": "vs-openai-001",
"custom_llm_provider": "openai",
"vector_store_name": "Product Knowledge Base",
},
headers={"Authorization": "Bearer sk-..."},
)
# List all vector stores
response = httpx.get(
"http://localhost:4000/vector_store/list?page=1&page_size=50",
headers={"Authorization": "Bearer sk-..."},
)
Related Pages
- BerriAI_Litellm_Managed_Vector_Stores -- Proxy hook for managed vector store operations