diff --git a/src/GoogleProvider.php b/src/GoogleProvider.php index e9a4b87..49a3c4c 100644 --- a/src/GoogleProvider.php +++ b/src/GoogleProvider.php @@ -297,7 +297,10 @@ public function supportsImageEditing(): bool */ public function generateImage(string $prompt, array $options = []): array { - $model = $options['model'] ?? self::MODEL_3_1_FLASH_IMAGE; + // Imagen, not one of the Gemini image models: the request below is Imagen-shaped + // (instances/parameters on :predict) and the Gemini models do not speak that endpoint. + // Imagen shuts down 17 August 2026, so this path needs replacing before then. + $model = $options['model'] ?? self::IMAGEN_4_FAST; $numberOfImages = $options['numberOfImages'] ?? 1; $aspectRatio = $options['aspectRatio'] ?? '1:1';