{"record":{"id":"ea8b813489f4c939","repo":"chroma-core/chroma","slug":"model-name-cannot-be-updated-ea8b81","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/google-gemini/src/index.ts","lineNumber":127,"sourceCode":"    return \"cosine\";\n  }\n\n  public supportedSpaces(): EmbeddingFunctionSpace[] {\n    return [\"cosine\", \"l2\", \"ip\"];\n  }\n\n  public getConfig(): GoogleGeminiConfig {\n    return {\n      api_key_env_var: this.apiKeyEnvVar,\n      model_name: this.modelName,\n      task_type: this.taskType,\n      ...(this.dimension && { dimension: this.dimension }),\n    };\n  }\n\n  public validateConfigUpdate(newConfig: Record<string, any>): void {\n    if (this.getConfig().model_name !== newConfig.model_name) {\n      throw new ChromaValueError(\"Model name cannot be updated\");\n    }\n    if (this.getConfig().dimension !== newConfig.dimension) {\n      throw new ChromaValueError(\"Dimension cannot be updated\");\n    }\n  }\n\n  public static validateConfig(config: GoogleGeminiConfig): void {\n    validateConfigSchema(config, NAME);\n  }\n}\n\nregisterEmbeddingFunction(NAME, GoogleGeminiEmbeddingFunction);\n","sourceCodeStart":109,"sourceCodeEnd":140,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/clients/new-js/packages/ai-embeddings/google-gemini/src/index.ts#L109-L140","documentation":"Error \"Model name cannot be updated\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at clients/new-js/packages/ai-embeddings/google-gemini/src/index.ts:127 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"}