chroma-core/chroma · error · Error
Failed to generate VoyageAI embeddings
Error message
Failed to generate VoyageAI embeddings
What it means
Error "Failed to generate VoyageAI embeddings" thrown in chroma-core/chroma.
Source
Thrown at clients/new-js/packages/ai-embeddings/voyageai/src/index.ts:60
`Voyage API key is not set. Please provide it in the constructor or set the environment variable ${apiKeyEnvVar}.`,
);
}
this.modelName = modelName;
this.apiKeyEnvVar = apiKeyEnvVar;
this.inputType = inputType;
this.truncation = truncation !== undefined ? truncation : true;;
this.client = new VoyageAIClient({ apiKey });
}
public async generate(texts: string[]): Promise<number[][]> {
const response = await this.client.embed({
input: texts,
model: this.modelName,
});
if (!response.data || !response.data.every((e) => e !== undefined)) {
throw new Error("Failed to generate VoyageAI embeddings");
}
return response.data?.map((e) => e.embedding!);
}
public static buildFromConfig(
config: VoyageAIConfig,
): VoyageAIEmbeddingFunction {
return new VoyageAIEmbeddingFunction({
modelName: config.model_name,
apiKeyEnvVar: config.api_key_env_var,
inputType: config.input_type,
truncation: config.truncation,
});
}
public defaultSpace(): EmbeddingFunctionSpace {
return "cosine";View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at clients/new-js/packages/ai-embeddings/voyageai/src/index.ts:60 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/1512f7723e479f6f.
Report an issue: GitHub.