{"record":{"id":"9f58bb55ca629f50","repo":"chroma-core/chroma","slug":"keyword-argument-key-has-a-value-of-type-t","errorCode":null,"errorMessage":"Keyword argument '${key}' has a value of type '${typeof value}', which is not supported. Only JSON-serializable values are allowed.","messagePattern":"Keyword argument '(.+?)' has a value of type '(.+?)', which is not supported\\. Only JSON-serializable values are allowed\\.","errorType":"validation","errorClass":"ChromaValueError","httpStatus":null,"severity":"error","filePath":"clients/new-js/packages/ai-embeddings/sentence-transformer/src/index.ts","lineNumber":49,"sourceCode":"    private readonly modelName: string;\n    private readonly device: string;\n    private readonly normalizeEmbeddings: boolean;\n    private readonly kwargs: Record<string, any>;\n    private pipelinePromise: Promise<any> | null = null;\n    private pipeline: any = null;\n\n    constructor(args: SentenceTransformersArgs = {}) {\n        const {\n            modelName = \"all-MiniLM-L6-v2\",\n            device = \"cpu\",\n            normalizeEmbeddings = false,\n            kwargs = {},\n        } = args;\n\n        // Validate kwargs are JSON-serializable (no functions or symbols)\n        for (const [key, value] of Object.entries(kwargs)) {\n            if (typeof value === \"function\" || typeof value === \"symbol\") {\n                throw new ChromaValueError(\n                    `Keyword argument '${key}' has a value of type '${typeof value}', which is not supported. Only JSON-serializable values are allowed.`\n                );\n            }\n        }\n\n        this.modelName = modelName;\n        this.device = device;\n        this.normalizeEmbeddings = normalizeEmbeddings;\n        this.kwargs = kwargs;\n    }\n\n    private async getPipeline(): Promise<any> {\n        if (this.pipeline) {\n            return this.pipeline;\n        }\n\n        if (!this.pipelinePromise) {\n            // Resolve model name: if it doesn't contain a '/', prefix with 'Xenova/'","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/clients/new-js/packages/ai-embeddings/sentence-transformer/src/index.ts#L31-L67","documentation":"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.","triggerScenarios":"Thrown at clients/new-js/packages/ai-embeddings/sentence-transformer/src/index.ts:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}