{"record":{"id":"b85d96f7ef8448d7","repo":"chroma-core/chroma","slug":"the-defaultembeddingfunction-s-model-cannot-be-c","errorCode":null,"errorMessage":"The DefaultEmbeddingFunction's 'model' cannot be changed after initialization.","messagePattern":"The DefaultEmbeddingFunction's 'model' cannot be changed after initialization\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"clients/new-js/packages/ai-embeddings/default-embed/src/index.ts","lineNumber":115,"sourceCode":"    return \"cosine\";\n  }\n\n  public supportedSpaces(): EmbeddingFunctionSpace[] {\n    return [\"cosine\", \"l2\", \"ip\"];\n  }\n\n  public getConfig(): DefaultEmbeddingFunctionConfig {\n    return {\n      model_name: this.modelName,\n      revision: this.revision,\n      dtype: this.dtype,\n      quantized: this.quantized,\n    };\n  }\n\n  public validateConfigUpdate(newConfig: DefaultEmbeddingFunctionConfig): void {\n    if (this.getConfig().model_name !== newConfig.model_name) {\n      throw new Error(\n        \"The DefaultEmbeddingFunction's 'model' cannot be changed after initialization.\",\n      );\n    }\n  }\n\n  public static validateConfig(config: DefaultEmbeddingFunctionConfig): void {\n    validateConfigSchema(config, \"transformers\");\n  }\n}\n","sourceCodeStart":97,"sourceCodeEnd":125,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/clients/new-js/packages/ai-embeddings/default-embed/src/index.ts#L97-L125","documentation":"Error \"The DefaultEmbeddingFunction's 'model' cannot be changed after initialization.\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at clients/new-js/packages/ai-embeddings/default-embed/src/index.ts:115 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"}