chroma-core/chroma · error · Error
The DefaultEmbeddingFunction's 'model' cannot be changed aft
Error message
The DefaultEmbeddingFunction's 'model' cannot be changed after initialization.
What it means
Error "The DefaultEmbeddingFunction's 'model' cannot be changed after initialization." thrown in chroma-core/chroma.
Source
Thrown at clients/new-js/packages/ai-embeddings/default-embed/src/index.ts:115
return "cosine";
}
public supportedSpaces(): EmbeddingFunctionSpace[] {
return ["cosine", "l2", "ip"];
}
public getConfig(): DefaultEmbeddingFunctionConfig {
return {
model_name: this.modelName,
revision: this.revision,
dtype: this.dtype,
quantized: this.quantized,
};
}
public validateConfigUpdate(newConfig: DefaultEmbeddingFunctionConfig): void {
if (this.getConfig().model_name !== newConfig.model_name) {
throw new Error(
"The DefaultEmbeddingFunction's 'model' cannot be changed after initialization.",
);
}
}
public static validateConfig(config: DefaultEmbeddingFunctionConfig): void {
validateConfigSchema(config, "transformers");
}
}
View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at clients/new-js/packages/ai-embeddings/default-embed/src/index.ts:115 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/b85d96f7ef8448d7.
Report an issue: GitHub.