EMBEDDING_DIMENSIONS
@forge/monorepo / backend/src / EMBEDDING_DIMENSIONS
Variable: EMBEDDING_DIMENSIONS
constEMBEDDING_DIMENSIONS:1536=1536
Defined in: backend/src/persistence/index.ts:1351
The embedding width every adapter stores.
On the port, not in an adapter, for the reason DEFAULT_SESSION_STATE_MAX_BYTES is (#97): a vector column has
one width and a vector index cannot span widths, so "every adapter agrees on the size" must be a property
rather than a coincidence. The reference adapter accepted 768 while pgvector refused it, which is exactly the
laxness that turns a production write failure into a passing test.
1536 is OpenAI's text-embedding-3-small and -large at its default reduction, and Cohere's v3 — the sizes
a deployment is most likely to have. Changing it is a migration, not a re-index, which is why
EmbeddingModelRef carries dimensions and a mismatch is refused rather than queued for re-embedding.