chroma-core/chroma · error · Error
Failed to generate Mistral embeddings
Error message
Failed to generate Mistral embeddings
What it means
Error "Failed to generate Mistral embeddings" thrown in chroma-core/chroma.
Source
Thrown at clients/new-js/packages/ai-embeddings/mistral/src/index.ts:52
if (!apiKey) {
console.warn(
`Mistral API key is not set. Please provide it in the constructor or set the environment variable ${apiKeyEnvVar}.`,
);
}
this.model = model;
this.apiKeyEnvVar = apiKeyEnvVar;
this.client = new Mistral({ apiKey });
}
public async generate(texts: string[]): Promise<number[][]> {
const response = await this.client.embeddings.create({
model: this.model,
inputs: texts,
});
if (!response.data || !response.data.every((e) => e !== undefined)) {
throw new Error("Failed to generate Mistral embeddings");
}
return response.data?.map((e) => e.embedding!);
}
public defaultSpace(): EmbeddingFunctionSpace {
return "cosine";
}
public supportedSpaces(): EmbeddingFunctionSpace[] {
return ["cosine", "l2", "ip"];
}
public static buildFromConfig(
config: MistralConfig,
): MistralEmbeddingFunction {
return new MistralEmbeddingFunction({
model: config.model,View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at clients/new-js/packages/ai-embeddings/mistral/src/index.ts:52 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/7a95e4089677b190.
Report an issue: GitHub.