Mintplex-Labs/anything-llm · error · Error
ChromaCloud::Invalid ENV settings
Error message
ChromaCloud::Invalid ENV settings
What it means
ChromaCloudVectorDb.connect() guards on process.env.VECTOR_DB !== 'chromacloud' and throws before building the CloudClient. The Chroma Cloud provider is only valid when the app-wide vector-db selection is chromacloud; using the class under any other VECTOR_DB value is a wiring error.
Source
Thrown at server/utils/vectorDbProviders/chromacloud/index.js:31
get name() {
return "ChromaCloud";
}
/**
* Basic quota/limitations for Chroma Cloud for accounts. Does not lookup client-specific limits.
* @see https://docs.trychroma.com/cloud/quotas-limits
*/
limits = {
maxEmbeddingDim: 4_096,
maxDocumentBytes: 16_384,
maxMetadataBytes: 4_096,
maxRecordsPerWrite: 300,
};
async connect() {
if (process.env.VECTOR_DB !== "chromacloud")
throw new Error("ChromaCloud::Invalid ENV settings");
const client = new CloudClient({
apiKey: process.env.CHROMACLOUD_API_KEY,
tenant: process.env.CHROMACLOUD_TENANT,
database: process.env.CHROMACLOUD_DATABASE,
});
const isAlive = await client.heartbeat();
if (!isAlive)
throw new Error(
"ChromaCloud::Invalid Heartbeat received - is the instance online?"
);
return { client };
}
/**
* Chroma Cloud has some basic limitations on upserts to protect performance and latency.
* Local deployments do not have these limitations since they are self-hosted.View on GitHub (pinned to 3aec848f28)
Solutions
- Set VECTOR_DB=chromacloud in server/.env along with CHROMACLOUD_API_KEY, CHROMACLOUD_TENANT, CHROMACLOUD_DATABASE.
- Restart every server/container so all processes agree on the value.
- In custom code, go through the vector-db factory instead of requiring vectorDbProviders/chromacloud directly.
- Print process.env.VECTOR_DB at runtime to confirm no stale value.
Example fix
# before (.env) VECTOR_DB=chroma # but ChromaCloudVectorDb used directly -> throw # after (.env) VECTOR_DB=chromacloud CHROMACLOUD_API_KEY=<secret> CHROMACLOUD_TENANT=<tenant> CHROMACLOUD_DATABASE=<database>
Defensive patterns
Strategy: validation
Validate before calling
function requireChromaCloud() {
if (process.env.VECTOR_DB !== 'chromacloud') {
throw new Error("VECTOR_DB must be 'chromacloud' to use ChromaCloudVectorDb.");
}
for (const k of ['CHROMACLOUD_API_KEY','CHROMACLOUD_TENANT','CHROMACLOUD_DATABASE']) {
if (!process.env[k]) throw new Error(`${k} is required for Chroma Cloud.`);
}
} Type guard
function isChromaCloudConfigured() {
return process.env.VECTOR_DB === 'chromacloud' && !!process.env.CHROMACLOUD_API_KEY;
} Prevention
- Migrate env (VECTOR_DB + three CHROMACLOUD_* vars) as one unit and restart everything.
- Route provider selection through the factory keyed on VECTOR_DB, never direct requires.
When it happens
Trigger: Invoking ChromaCloudVectorDb methods while VECTOR_DB is unset or set to another provider ('chroma', 'lance', ...) - typically direct instantiation in custom code, or .env changed to/from chromacloud without a full restart.
Common situations: Migrating a deployment from local Chroma to Chroma Cloud (or back) and restarting only one process; scripts requiring the chromacloud provider without env setup; stale container env after editing docker-compose.
Related errors
- Chroma::Invalid ENV settings
- Type "${type}" is not a valid type to sync.
- No OpenAI API key was set.
- No OpenAI compatible endpoint was set. Please set this to us
- No ElevenLabs API key was set.
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/277f8257f185ae69.
Report an issue: GitHub.