diff --git a/docs/memory-knowledgebase.md b/docs/memory-knowledgebase.md index 3ab6f38..a48015f 100644 --- a/docs/memory-knowledgebase.md +++ b/docs/memory-knowledgebase.md @@ -2,7 +2,7 @@ Three gateway-level capabilities added on top of the [AI gateway/proxy](https://git.arthurerlich.de/haylan/LLM-Server/issues/9), so every client behind LiteLLM gets them — not just Open WebUI. See [issue #21](https://git.arthurerlich.de/haylan/LLM-Server/issues/21) for the rationale. -**Not yet verified on real hardware** — see [issue #24](https://git.arthurerlich.de/haylan/LLM-Server/issues/24). In particular: `litellm-pgvector`'s Prisma migrations on first boot, and the exact `vector_store_registry` field names for the `pg_vector` provider. +**Verified against a live deploy** — see [issue #24](https://git.arthurerlich.de/haylan/LLM-Server/issues/24), closed after smoke-testing found and fixed several bugs: a missing `api_key` in `vector_store_registry` (was silently falling through to the real `api.openai.com`), `litellm-pgvector`'s Prisma schema never actually being pushed to `pgvector-db` (now handled by `./scripts/update.sh`), a 1536- vs 768-dim vector column mismatch, and its create endpoint ignoring any caller-supplied store id (both fixed locally — see `vendor/litellm-pgvector/VENDORED.md`). `scripts/ingest-memory.sh` was also silently broken (posted chunks with no embedding attached) and has been fixed to embed via LiteLLM before inserting. ## Web search (SearXNG) diff --git a/vendor/litellm-pgvector/VENDORED.md b/vendor/litellm-pgvector/VENDORED.md index fd7efac..79a6178 100644 --- a/vendor/litellm-pgvector/VENDORED.md +++ b/vendor/litellm-pgvector/VENDORED.md @@ -1,8 +1,25 @@ Vendored from https://github.com/BerriAI/litellm-pgvector at commit -`b553f84a32f580b4303297df5567f25912b59d93` (main, 2026-09-02) — no changes -made to the source. See `docker-compose.yml`'s `litellm-pgvector` service -comment for why this is vendored instead of built from a remote git context. +`b553f84a32f580b4303297df5567f25912b59d93` (main, 2026-09-02). See +`docker-compose.yml`'s `litellm-pgvector` service comment for why this is +vendored instead of built from a remote git context. + +**Local changes on top of that commit** (found smoke-testing issue #24 — +without these, the store can never be searched or written to): + +- `prisma/schema.prisma`: `Embedding.embedding` was `vector(1536)` + (OpenAI ada-002's size); changed to `vector(768)` to match this stack's + actual embedding model (nomic-embed-text-v1.5). +- `models.py` / `main.py`: `POST /v1/vector_stores` always minted a random + UUID for the new store's `id`, ignoring anything the caller asked for. + Added an optional `id` field to `VectorStoreCreateRequest` and made + `create_vector_store` use it when given — `litellm-config.yaml`'s + `vector_store_registry` addresses this store by a fixed id + (`memory-and-notes`), which never matched a real row otherwise. + +Re-applying these after a re-vendor: diff this directory against upstream +before overwriting, or just redo the three edits above. To update: `git clone https://github.com/BerriAI/litellm-pgvector.git` -somewhere, copy everything except `.git/` over this directory, update the -commit hash above, and run `./scripts/update.sh`. +somewhere, copy everything except `.git/` over this directory, re-apply the +local changes above, update the commit hash above, and run +`./scripts/update.sh`.