Mintplex-Labs/anything-llm · warning
ChromaCloud::Embedding dimension too large (default max is $
Error message
ChromaCloud::Embedding dimension too large (default max is ${this.limits.maxEmbeddingDim}). Got ${testSubmission.embedding.length}. Upsert may fail! What it means
ChromaCloud (the hosted Chroma vector DB in AnythingLLM) pre-flights every upsert in smartAdd() against static account quotas (see docs.trychroma.com/cloud/quotas-limits): maxEmbeddingDim is 4096. It samples only the first record of the submission (embeddings[0]) and prints this warning when that embedding's dimension exceeds 4096 — a strong signal the cloud service will reject the write (typically HTTP 422). The warning does not block the call; the failure surfaces afterwards.
Source
Thrown at server/utils/vectorDbProviders/chromacloud/index.js:67
* Local deployments do not have these limitations since they are self-hosted.
*
* This method, if cloud, will do some simple logic/heuristics to ensure that the upserts are not too large.
* Otherwise, it may throw a 422.
* @param {import("chromadb").Collection} collection
* @param {{ids: string[], embeddings: number[], metadatas: Record<string, any>[], documents: string[]}[]} submissions
* @returns {Promise<boolean>} True if the upsert was successful, false otherwise.
* If the upsert was not successful, the error message will be returned.
*/
async smartAdd(collection, submission) {
const testSubmission = {
id: submission.ids[0],
embedding: submission.embeddings[0],
metadata: submission.metadatas[0],
document: submission.documents[0],
};
if (testSubmission.embedding.length > this.limits.maxEmbeddingDim)
console.warn(
`ChromaCloud::Embedding dimension too large (default max is ${this.limits.maxEmbeddingDim}). Got ${testSubmission.embedding.length}. Upsert may fail!`
);
if (testSubmission.document.length > this.limits.maxDocumentBytes)
console.warn(
`ChromaCloud::Document length too large (default max is ${this.limits.maxDocumentBytes}). Got ${testSubmission.document.length}. Upsert may fail!`
);
if (
JSON.stringify(testSubmission.metadata).length >
this.limits.maxMetadataBytes
)
console.warn(
`ChromaCloud::Metadata length too large (default max is ${this.limits.maxMetadataBytes}). Got ${JSON.stringify(testSubmission.metadata).length}. Upsert may fail!`
);
// If the submissions are not too large, just add them directly.
if (submission.ids.length <= this.limits.maxRecordsPerWrite) {
await collection.add(submission);
return true;View on GitHub (pinned to 3aec848f28)
Solutions
- Switch the workspace's embedder to a model with ≤4096 dimensions (most 1536/3072-dim models are safe) and re-embed the affected workspace.
- If you must keep the large-dimension model, move off Chroma Cloud to self-hosted Chroma (VECTOR_DB=chroma) or another provider without the cap.
- Check the Chroma Cloud quotas page for your account tier in case your plan raises the ceiling.
- After changing embedders, clear and re-create the workspace vectors — mixed dimensions in one collection cause additional upsert failures.
Example fix
# before: 8192-dim embedder on Chroma Cloud → upserts rejected VECTOR_DB=chromacloud EMBEDDING_MODEL_PROVIDER=... EMBEDDING_MODEL=... (8192 dimensions) # after: dimension within the 4096 quota VECTOR_DB=chromacloud EMBEDDING_MODEL=... (3072 dimensions) # then re-embed the workspace
Defensive patterns
Strategy: validation
Validate before calling
const CHROMA_CLOUD_MAX_EMBEDDING_DIM = 4096;
const dim =
embedder?.dimensions ??
(await embedder.embedTextInput("dimension probe")).length;
if (process.env.VECTOR_DB === "chromacloud" && dim > CHROMA_CLOUD_MAX_EMBEDDING_DIM) {
throw new Error(
`Selected embedder produces ${dim}-dim vectors; Chroma Cloud allows at most ${CHROMA_CLOUD_MAX_EMBEDDING_DIM}. Choose a smaller model or self-host Chroma.`
);
} Prevention
- Before switching VECTOR_DB to chromacloud, probe your embedder's dimension and compare with the provider quotas page (embedding dim, document bytes, metadata bytes).
- Keep one embedder per workspace and re-embed after any change — mixed dimensions break upserts independently of the quota.
- Prefer mainstream 1024–3072-dim models for cloud vector DBs; the 4096 ceiling excludes several large models.
When it happens
Trigger: Calling addDocuments()/smartAdd on a chromacloud-backed workspace with an embedding model whose output dimension exceeds 4096 — e.g. a 6144- or 8192-dimension model — or after switching a workspace to a larger-dimension embedder so new chunks trip the sampled first record.
Common situations: Selecting a high-dimension embedder (large voyage/open-class models) while VECTOR_DB=chromacloud; migrating from local Chroma (which has no such limits) to Chroma Cloud and re-embedding existing workspaces; dimension mismatches between old and new vectors in the same collection.
Related errors
- ChromaCloud::Document length too large (default max is ${thi
- ChromaCloud::Metadata length too large (default max is ${thi
- ChromaCloud::Invalid ENV settings
- ChromaCloud::Invalid Heartbeat received - is the instance on
- Type "${type}" is not a valid type to sync.
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/e5fe9ae58a43867e.
Report an issue: GitHub.