{"record":{"id":"56e55f45c60e4b2e","repo":"chroma-core/chroma","slug":"dimension-cannot-be-updated","errorCode":null,"errorMessage":"Dimension cannot be updated","messagePattern":"Dimension cannot be updated","errorType":"validation","errorClass":"ChromaValueError","httpStatus":null,"severity":"error","filePath":"clients/new-js/packages/ai-embeddings/google-gemini/src/index.ts","lineNumber":130,"sourceCode":"  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":112,"sourceCodeEnd":140,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/clients/new-js/packages/ai-embeddings/google-gemini/src/index.ts#L112-L140","documentation":"Error \"Dimension cannot be updated\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at clients/new-js/packages/ai-embeddings/google-gemini/src/index.ts:130 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"}