feat(scripts): auto-register memory-and-notes in litellm's DB for the Admin UI

The vector_store_registry block in litellm-config.yaml only seeds the
store into litellm's in-memory registry at boot — the Admin UI's Vector
Stores page (/ui/vector-stores) reads litellm's own DB
(LiteLLM_ManagedVectorStoresTable) instead, via /vector_store/list. A
config-only entry there gets silently deleted from memory the first time
anyone loads that page, since /vector_store/list treats the DB as the
source of truth and removes anything not also present there.

update.sh now registers it in the DB too, via POST /vector_store/new
(idempotent, same pattern as the existing virtual-key minting) — with the
literal resolved key, not the os.environ/... form used in
litellm-config.yaml, since the management API doesn't do config.yaml-style
substitution on request bodies.

Found in the process: /vector_store/update in this litellm version can't
touch litellm_params at all (VectorStoreUpdateRequest has no such field,
so PGVECTOR_API_KEY sent through it is silently dropped) — worth knowing
if this key ever needs rotating; documented in update.sh's comment.

Verified live: registered via the API, confirmed the row appears in
/vector_store/list (what the Admin UI page reads) with the real key, and
re-verified search still works end-to-end afterward.
This commit is contained in:
2026-09-02 21:51:02 +00:00
parent 47bdb22457
commit 124053cf89
2 changed files with 38 additions and 0 deletions
+8
View File
@@ -61,6 +61,14 @@ search_tools:
# 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).
#
# This block only seeds the store into litellm's in-memory registry at
# boot — it does NOT make it appear on the Admin UI's Vector Stores page
# (/ui/vector-stores). That page reads litellm's own DB
# (LiteLLM_ManagedVectorStoresTable), a separate registration scripts/
# update.sh also does via POST /vector_store/new. Keep both in sync by
# hand if you change api_base/api_key here — see update.sh's comment on
# why there's no automatic sync from this block to the DB row.
vector_store_registry:
- vector_store_name: memory-and-notes
litellm_params: