fix(litellm-pgvector): honor caller-supplied id on vector store create
POST /v1/vector_stores always minted a random UUID for the new store's id, ignoring the request entirely. litellm-config.yaml's vector_store_registry addresses this store by a fixed id (memory-and-notes), which could never match a real row as a result — every search/write 404'd. Added an optional id field to VectorStoreCreateRequest; create_vector_store uses it when given, falls back to a random UUID otherwise (unchanged behavior for callers that don't care).
This commit is contained in:
Vendored
+6
@@ -5,6 +5,12 @@ from datetime import datetime
|
||||
|
||||
class VectorStoreCreateRequest(BaseModel):
|
||||
name: str
|
||||
# ponytail: not part of upstream litellm-pgvector — added locally so
|
||||
# callers (litellm's vector_store_registry, scripts/ingest-memory.sh)
|
||||
# can pin a human-readable id instead of getting a random UUID back.
|
||||
# litellm-config.yaml's vector_store_registry addresses stores by a
|
||||
# fixed vector_store_id, which only works if creation can honor it.
|
||||
id: Optional[str] = None
|
||||
file_ids: Optional[List[str]] = None
|
||||
expires_after: Optional[Dict[str, Any]] = None
|
||||
chunking_strategy: Optional[Dict[str, Any]] = None
|
||||
|
||||
Reference in New Issue
Block a user