{"record":{"id":"21f268fc9ff6468e","repo":"chroma-core/chroma","slug":"model-name-cannot-be-updated-21f268","errorCode":null,"errorMessage":"Model name cannot be updated","messagePattern":"Model name cannot be updated","errorType":"validation","errorClass":"ChromaValueError","httpStatus":null,"severity":"error","filePath":"clients/new-js/packages/ai-embeddings/mistral/src/index.ts","lineNumber":84,"sourceCode":"  public static buildFromConfig(\n    config: MistralConfig,\n  ): MistralEmbeddingFunction {\n    return new MistralEmbeddingFunction({\n      model: config.model,\n      apiKeyEnvVar: config.api_key_env_var,\n    });\n  }\n\n  public getConfig(): MistralConfig {\n    return {\n      api_key_env_var: this.apiKeyEnvVar,\n      model: this.model,\n    };\n  }\n\n  public validateConfigUpdate(newConfig: Record<string, any>): void {\n    if (this.getConfig().model !== newConfig.model) {\n      throw new ChromaValueError(\"Model name cannot be updated\");\n    }\n  }\n\n  public static validateConfig(config: MistralConfig): void {\n    validateConfigSchema(config, NAME);\n  }\n}\n\nregisterEmbeddingFunction(NAME, MistralEmbeddingFunction);\n","sourceCodeStart":66,"sourceCodeEnd":94,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/clients/new-js/packages/ai-embeddings/mistral/src/index.ts#L66-L94","documentation":"Raised by MistralEmbeddingFunction.validateConfigUpdate when an attempted configuration update includes a model value that differs from the function's current model. The embedding model is fixed at construction time because changing it would make existing stored embeddings incomparable, so any config update that alters it is rejected.","triggerScenarios":"Thrown at clients/new-js/packages/ai-embeddings/mistral/src/index.ts:84 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Keep `model` unchanged in the update config","Create a new MistralEmbeddingFunction with the new model and a fresh collection","Compare against getConfig().model first"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","contentChangedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}