vercel/ai · error · Error

Google image models other than Gemini are no longer supporte

Error message

Google image models other than Gemini are no longer supported. Use a model ID that starts with `gemini-`.

What it means

Error "Google image models other than Gemini are no longer supported. Use a model ID that starts with `gemini-`." thrown in vercel/ai.

Source

Thrown at packages/google-vertex/src/google-vertex-image-model.ts:61

    return new GoogleVertexImageModel(options.modelId, options.config);
  }

  readonly maxImagesPerCall = 10;

  get provider(): string {
    return this.config.provider;
  }

  constructor(
    readonly modelId: GoogleVertexImageModelId,
    private config: GoogleVertexImageModelConfig,
  ) {}

  async doGenerate(
    options: Parameters<ImageModelV4['doGenerate']>[0],
  ): Promise<Awaited<ReturnType<ImageModelV4['doGenerate']>>> {
    if (!this.modelId.startsWith('gemini-')) {
      throw new Error(
        'Google image models other than Gemini are no longer supported. Use a model ID that starts with `gemini-`.',
      );
    }

    const {
      prompt,
      n,
      size,
      aspectRatio,
      seed,
      providerOptions,
      headers,
      abortSignal,
      files,
      mask,
    } = options;
    const warnings: Array<SharedV4Warning> = [];

View on GitHub (pinned to 69428b1f8b)

When it happens

Trigger: Thrown at packages/google-vertex/src/google-vertex-image-model.ts:61 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30). Data as JSON: /api/errors/61331142e47be3c7. Report an issue: GitHub.