chroma-core/chroma · error · Error

Cohere image embedding supports one image at a time

Error message

Cohere image embedding supports one image at a time

What it means

Error "Cohere image embedding supports one image at a time" thrown in chroma-core/chroma.

Source

Thrown at clients/new-js/packages/ai-embeddings/cohere/src/index.ts:88

    if (!apiKey) {
      console.warn(
        `Cohere API key is not set. Please provide it in the constructor or set the environment variable ${apiKeyEnvVar}.`,
      );
    }

    this.client = new CohereClient({ token: apiKey });
    this.apiKeyEnvVar = apiKeyEnvVar;
    this.modelName = modelName;
    this.inputType = inputType;
    this.truncate = truncate;
    this.embeddingType = embeddingType;
    this.image = image;
  }

  public async generate(texts: string[]): Promise<number[][]> {
    if (this.image && texts.length > 1) {
      throw new Error("Cohere image embedding supports one image at a time");
    }

    if (!this.image && texts.length > 96) {
      throw new Error(
        "Cohere image embedding supports a maximum of 96 text inputs at a time",
      );
    }

    const response = await this.client.embed({
      model: this.modelName,
      inputType: this.image ? "image" : this.inputType,
      truncate: this.truncate,
      embeddingTypes: this.embeddingType ? [this.embeddingType] : undefined,
      images: this.image ? texts : undefined,
      texts: !this.image ? texts : undefined,
    });

    const embeddings = response.embeddings;

View on GitHub (pinned to aecdd12c8a)

When it happens

Trigger: Thrown at clients/new-js/packages/ai-embeddings/cohere/src/index.ts:88 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/afe93c8e9358e359. Report an issue: GitHub.