chroma-core/chroma · error · ChromaValueError
Cannot specify both HNSW and SPANN configurations
Error message
Cannot specify both HNSW and SPANN configurations
What it means
Error "Cannot specify both HNSW and SPANN configurations" thrown in chroma-core/chroma.
Source
Thrown at clients/new-js/packages/chromadb/src/collection-configuration.ts:74
* CollectionConfiguration to be used in collection creation.
*/
export const processCreateCollectionConfig = async ({
configuration,
embeddingFunction,
metadata,
schema,
}: {
configuration?: CreateCollectionConfiguration;
embeddingFunction?: EmbeddingFunction | null;
metadata?: CollectionMetadata;
schema?: Schema;
}) => {
let schemaEmbeddingFunction: EmbeddingFunction | null | undefined = undefined;
if (schema) {
schemaEmbeddingFunction = schema.resolveEmbeddingFunction();
}
if (configuration?.hnsw && configuration?.spann) {
throw new ChromaValueError(
"Cannot specify both HNSW and SPANN configurations",
);
}
let embeddingFunctionConfiguration = serializeEmbeddingFunction({
embeddingFunction: embeddingFunction ?? undefined,
configEmbeddingFunction: configuration?.embeddingFunction,
});
if (
!embeddingFunctionConfiguration &&
embeddingFunction !== null &&
schemaEmbeddingFunction === undefined
) {
embeddingFunctionConfiguration = await getDefaultEFConfig();
}
const overallEf = embeddingFunction || configuration?.embeddingFunction;View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at clients/new-js/packages/chromadb/src/collection-configuration.ts:74 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/0e239e82f19ee061.
Report an issue: GitHub.