chroma-core/chroma · error · ChromaValueError

Model name cannot be updated

Error message

Model name cannot be updated

What it means

Error "Model name cannot be updated" thrown in chroma-core/chroma.

Source

Thrown at clients/new-js/packages/ai-embeddings/google-gemini/src/index.ts:127

    return "cosine";
  }

  public supportedSpaces(): EmbeddingFunctionSpace[] {
    return ["cosine", "l2", "ip"];
  }

  public getConfig(): GoogleGeminiConfig {
    return {
      api_key_env_var: this.apiKeyEnvVar,
      model_name: this.modelName,
      task_type: this.taskType,
      ...(this.dimension && { dimension: this.dimension }),
    };
  }

  public validateConfigUpdate(newConfig: Record<string, any>): void {
    if (this.getConfig().model_name !== newConfig.model_name) {
      throw new ChromaValueError("Model name cannot be updated");
    }
    if (this.getConfig().dimension !== newConfig.dimension) {
      throw new ChromaValueError("Dimension cannot be updated");
    }
  }

  public static validateConfig(config: GoogleGeminiConfig): void {
    validateConfigSchema(config, NAME);
  }
}

registerEmbeddingFunction(NAME, GoogleGeminiEmbeddingFunction);

View on GitHub (pinned to aecdd12c8a)

When it happens

Trigger: Thrown at clients/new-js/packages/ai-embeddings/google-gemini/src/index.ts:127 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/ea8b813489f4c939. Report an issue: GitHub.