fix(litellm-pgvector): correct embedding vector dimension 1536 -> 768

schema.prisma hardcoded vector(1536), OpenAI ada-002's size. This stack's
actual embedding model is nomic-embed-text-v1.5, confirmed 768-dim live
against /v1/embeddings. Left as-is, the first insert after a schema push
would fail on a pgvector dimension mismatch.
This commit is contained in:
2026-09-02 21:32:13 +00:00
parent ec476c7950
commit b627edb949
+6 -1
View File
@@ -30,7 +30,12 @@ model Embedding {
id String @id @default(cuid())
vector_store_id String
content String
embedding Unsupported("vector(1536)")
// 768, not OpenAI's ada-002-sized 1536 — this stack's embedding_model is
// nomic-embed-text-v1.5 (see docker-compose.yml's embedding-server and
// litellm-config.yaml's local-embedding entry), confirmed 768-dim live
// against /v1/embeddings. A push with the wrong size here makes every
// insert fail on a pgvector dimension mismatch.
embedding Unsupported("vector(768)")
metadata Json?
created_at DateTime @default(now())