chroma-core/chroma · error · ChromaValueError

Keyword argument '${key}' has a value of type '${typeof valu

Error message

Keyword argument '${key}' has a value of type '${typeof value}', which is not supported. Only JSON-serializable values are allowed.

What it means

Error "Keyword argument '${key}' has a value of type '${typeof value}', which is not supported. Only JSON-serializable values are allowed." thrown in chroma-core/chroma.

Source

Thrown at clients/new-js/packages/ai-embeddings/sentence-transformer/src/index.ts:49

    private readonly modelName: string;
    private readonly device: string;
    private readonly normalizeEmbeddings: boolean;
    private readonly kwargs: Record<string, any>;
    private pipelinePromise: Promise<any> | null = null;
    private pipeline: any = null;

    constructor(args: SentenceTransformersArgs = {}) {
        const {
            modelName = "all-MiniLM-L6-v2",
            device = "cpu",
            normalizeEmbeddings = false,
            kwargs = {},
        } = args;

        // Validate kwargs are JSON-serializable (no functions or symbols)
        for (const [key, value] of Object.entries(kwargs)) {
            if (typeof value === "function" || typeof value === "symbol") {
                throw new ChromaValueError(
                    `Keyword argument '${key}' has a value of type '${typeof value}', which is not supported. Only JSON-serializable values are allowed.`
                );
            }
        }

        this.modelName = modelName;
        this.device = device;
        this.normalizeEmbeddings = normalizeEmbeddings;
        this.kwargs = kwargs;
    }

    private async getPipeline(): Promise<any> {
        if (this.pipeline) {
            return this.pipeline;
        }

        if (!this.pipelinePromise) {
            // Resolve model name: if it doesn't contain a '/', prefix with 'Xenova/'

View on GitHub (pinned to aecdd12c8a)

When it happens

Trigger: Thrown at clients/new-js/packages/ai-embeddings/sentence-transformer/src/index.ts:49 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/9f58bb55ca629f50. Report an issue: GitHub.