You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added _check_image_config_support() method to identify Gemini 3 image models
- Updated _check_image_generation_support() to include Gemini 3 image models
- Modified _configure_generation() to only apply ImageConfig for Gemini 3 models
- Updated documentation to clarify ImageConfig is only for Gemini 3 models
- Added model compatibility table showing which models support ImageConfig
- Gemini 2.5 image models still support image generation but use defaults
Co-authored-by: owndev <69784886+owndev@users.noreply.github.com>
The Google Gemini pipeline supports configurable aspect ratios and resolutions for image generation with image-capable models (e.g., `gemini-2.5-flash-image-preview`).
216
+
The Google Gemini pipeline supports configurable aspect ratios and resolutions for image generation with **Gemini 3 image models** (e.g., `gemini-3-pro-image-preview`, `gemini-3-flash-image-preview`).
217
+
218
+
> [!IMPORTANT]
219
+
> **Model Compatibility**: The `aspect_ratio` and `image_size` parameters (ImageConfig) are **only supported by Gemini 3 image models**. Gemini 2.5 image models (e.g., `gemini-2.5-flash-image-preview`) support image generation but do not support these configuration parameters. When using Gemini 2.5 image models, default aspect ratio and resolution will be used automatically.
216
220
217
221
### Aspect Ratio
218
222
@@ -263,9 +267,9 @@ from google.genai import types
263
267
264
268
client = genai.Client(api_key="your-api-key")
265
269
266
-
# Generate a 4K widescreen image
270
+
# Generate a 4K widescreen image with Gemini 3
267
271
response = client.models.generate_content(
268
-
model="gemini-2.5-flash-image-preview",
272
+
model="gemini-3-pro-image-preview",
269
273
contents="A serene mountain landscape at sunset",
270
274
config=types.GenerateContentConfig(
271
275
response_modalities=["TEXT", "IMAGE"],
@@ -304,6 +308,16 @@ for part in response.parts:
304
308
- TikTok content
305
309
- Mobile app screens
306
310
311
+
### Model Compatibility
312
+
313
+
| Model | ImageConfig Support (aspect_ratio, image_size) |
| gemini-2.5-flash-image-\*| ❌ Not supported (uses defaults) |
318
+
| Other gemini-3-\* models | ❌ Not image generation models |
319
+
| Other models | ❌ Not image generation models |
320
+
307
321
## Web search and access
308
322
309
323
[Grounding with Google search](https://ai.google.dev/gemini-api/docs/google-search) together with the [URL context tool](https://ai.google.dev/gemini-api/docs/url-context) are enabled/disabled together via the `google_search_tool` feature, which can be switched on/off in a Filter.
0 commit comments