fix(litellm): add missing api_key to vector_store_registry
Without it, litellm's pg_vector provider sent Authorization: Bearer None, which round-tripped to the real api.openai.com and came back with 'Incorrect API key provided: None' — masking the actual problem and making every vector store call fail. Points at litellm-pgvector's own LITELLM_PGVECTOR_API_KEY (its SERVER_API_KEY), already present in .env. Smoke-tested end-to-end against the live deploy for issue #24, alongside the litellm-pgvector fixes in the following commits.
This commit is contained in:
+15
-4
@@ -53,16 +53,27 @@ search_tools:
|
||||
# Qdrant — LiteLLM's native vector-store feature has no Qdrant provider, see
|
||||
# docs/research/litellm-knowledgebase.md). vector_store_id is this proxy's
|
||||
# own identifier for the store, not assigned by a backend.
|
||||
# ponytail: field names here (custom_llm_provider: pg_vector, api_base
|
||||
# pointed at litellm-pgvector) are the best fit from the litellm-pgvector
|
||||
# README, not confirmed against a running deploy yet — smoke-test before
|
||||
# relying on it. See issue #24.
|
||||
# Smoke-tested end-to-end against a running deploy (issue #24): search via
|
||||
# both /v1/vector_stores/{id}/search directly and the file_search tool on a
|
||||
# chat completion. Needed several fixes beyond this block to work — a
|
||||
# missing api_key here, litellm-pgvector's Prisma schema never having been
|
||||
# pushed, a 1536- vs 768-dim mismatch, and its create endpoint ignoring any
|
||||
# caller-supplied id — see scripts/update.sh, scripts/ingest-memory.sh, and
|
||||
# vendor/litellm-pgvector/'s local patches (models.py, main.py,
|
||||
# prisma/schema.prisma).
|
||||
vector_store_registry:
|
||||
- vector_store_name: memory-and-notes
|
||||
litellm_params:
|
||||
vector_store_id: "memory-and-notes"
|
||||
custom_llm_provider: pg_vector
|
||||
api_base: http://litellm-pgvector:8000
|
||||
# Required by litellm's pg_vector provider (see
|
||||
# PGVectorStoreConfig.validate_environment in litellm's source) — it's
|
||||
# the Bearer token litellm-pgvector's own API checks against its
|
||||
# SERVER_API_KEY. Was missing entirely, which is why every vector
|
||||
# store call was failing with "Incorrect API key provided: None"
|
||||
# before litellm-pgvector was ever reached. See issue #24.
|
||||
api_key: os.environ/LITELLM_PGVECTOR_API_KEY
|
||||
embedding_model: local-embedding
|
||||
|
||||
router_settings:
|
||||
|
||||
Reference in New Issue
Block a user