LiteLLM Managed Vector Stores
LiteLLM Managed Vector Stores
기존 제공자 벡터 스토어(Bedrock Knowledge Base, Vertex AI Search datastore, Azure AI Search index, Milvus collection, Valkey search index, MongoDB Vector Search index(BETA) 등)를 LiteLLM에 등록하면, proxy의 모든 소비자가 제공자를 알거나 자격 증명을 보유하지 않아도 하나의 OpenAI 호환 API로 사용할 수 있어요.
관리형 벡터 스토어는 config.yaml 또는 LiteLLM 데이터베이스에 저장된 다음의 매핑입니다:
| Field | Required | Description |
| vector_store_id | Yes | The id clients will reference, typically the provider's own store id (Knowledge Base id, datastore id, index name) |
| custom_llm_provider | Yes | Which provider backend to route to, e.g. bedrock, vertex_ai/search_api, azure_ai, milvus, mongodb (BETA), valkey, gemini, openai, pg_vector |
| vector_store_name | No | Human readable name shown in the UI |
| vector_store_description | No | Description shown in the UI |
| vector_store_metadata | No | Free-form metadata object |
| litellm_credential_name | No | Name of a stored credential to authenticate with |
| litellm_params | No | Provider parameters, e.g. vertex_project and vertex_location for Vertex AI, aws_region_name for Bedrock |
등록은 제공자에 아무것도 만들지 않습니다. 상류에 새 스토어를 만들려면 POST /v1/vector_stores를 사용하세요.
벡터 스토어 등록
- config.yaml
- Management API
- Admin UI
config.yaml
vector_store_registry:
- vector_store_name: "docs-knowledgebase"
litellm_params:
vector_store_id: "T37J8R4WTM"
custom_llm_provider: "bedrock"
aws_region_name: "us-west-2"
- vector_store_name: "website-search"
litellm_params:
vector_store_id: "my-datastore_1234567890"
custom_llm_provider: "vertex_ai/search_api"
vertex_project: "my-gcp-project"
vertex_location: "global"
litellm_params 안에서 vector_store_id와 custom_llm_provider는 필수입니다. 없으면 proxy 시작이 실패합니다.
Register a Vertex AI Search datastore
curl -X POST 'http://localhost:4000/vector_store/new' \
-H "Authorization: Bearer ***" \
-H 'Content-Type: application/json' \
-d '{
"vector_store_id": "my-datastore_1234567890",
"custom_llm_provider": "vertex_ai/search_api",
"vector_store_name": "website-search",
"litellm_params": {
"vertex_project": "my-gcp-project",
"vertex_location": "global"
}
}'
스토어는 LiteLLM 데이터베이스에 기록되고 즉시 직접 검색에 사용 가능해지며 재시작이 필요 없어요. proxy가 등록된 벡터 스토어 없이 시작됐다면, 첫 UI 또는 API 등록에 대한 채팅 검색은 데이터베이스 동기화 후 또는 proxy 재시작 후에 가능해집니다. 응답은 민감한 litellm_params 값을 redact한 상태로 저장된 객체를 반영합니다.
Admin UI에서는 Tools > Vector Stores > Add new vector store로 이동해 제공자를 선택하고 스토어 id와 제공자 파라미터를 채우세요. UI는 같은 POST /vector_store/new 엔드포인트를 호출합니다. 스크린샷은 chat completions 가이드에 있습니다.
등록된 스토어 사용
통합 엔드포인트를 통해 검색하세요. LiteLLM이 등록에서 제공자와 자격 증명을 해석합니다:
Unified search
curl -X POST 'http://localhost:4000/v1/vector_stores/my-datastore_1234567890/search' \
-H "Authorization: Bearer ***" \
-H 'Content-Type: application/json' \
-d '{"query": "How do I authenticate?"}'
응답은 제공자와 무관하게 OpenAI vector_store.search_results.page 형태입니다. 모든 요청 파라미터는 Search를 참고하세요.
또는 채팅 completion에 첨부하면 LiteLLM이 스토어를 검색하고 모델을 호출하기 전에 결과를 컨텍스트로 주입합니다:
RAG in /chat/completions
curl -X POST 'http://localhost:4000/v1/chat/completions' \
-H "Authorization: Bearer ***" \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-5.6",
"messages": [{"role": "user", "content": "What is LiteLLM?"}],
"tools": [{"type": "file_search", "vector_store_ids": ["my-datastore_1234567890"]}]
}'
요청은 스토어를 명시적으로 참조해야 합니다(최상위 vector_store_ids 또는 tools 안). 스토어를 등록하는 것만으로 어떤 채팅 completion도 바뀌지 않아요. 세부 사항, 인용, 스트리밍 동작: Using Vector Stores with Chat Completions.
Management API 참조
모든 엔드포인트는 LiteLLM 키가 필요합니다(Authorization: Bearer ***). 접근은 general_settings.disable_vector_stores_for_internal_users와 allow_vector_stores_for_team_admins로 제한할 수 있고, proxy 관리자는 항상 접근할 수 있어요.
| Endpoint | Method | Body / params |
| /vector_store/new | POST | The fields from the table above |
| /vector_store/list | GET | page, page_size (also available as /v1/vector_store/list) |
| /vector_store/info | POST | {"vector_store_id": "..."} |
| /vector_store/update | POST | vector_store_id plus any of custom_llm_provider, vector_store_name, vector_store_description, vector_store_metadata |
| /vector_store/delete | POST | {"vector_store_id": "..."} |
GET /vector_store/list는 {"object": "list", "data": [...], "total_count": n, "current_page": n, "total_pages": n}을 반환합니다. API나 UI를 통해 등록된 스토어에는 생성한 키의 team_id와 user_id가 찍히고, 팀으로 생성된 스토어는 목록과 검색 결과에서 그 팀으로 범위가 한정됩니다(proxy 관리자는 모든 것을 봅니다).
키와 팀을 특정 스토어로 제한
키나 팀을 만들 때 object_permission.vector_stores를 설정해 해당 LLM 요청이 참조할 수 있는 스토어 id를 제어하세요:
Key limited to one store
curl -X POST 'http://localhost:4000/key/generate' \
-H "Authorization: Bearer ***" \
-H 'Content-Type: application/json' \
-d '{
"object_permission": {"vector_stores": ["my-datastore_1234567890"]}
}'
그 키를 통한 요청이 vector_store_ids에서 다른 등록된 스토어 id를 사용하면 거부됩니다. 빈 목록이나 미설정 목록은 키가 제한되지 않았음을 의미합니다. 같은 필드가 팀에서도 동작합니다.