Enable Image Generation
The image generation tool can be enabled via thechatModelOptions parameter of
the Agent constructor:
ImageGenerationConfig lets you request progressive previews (partialImages),
choose the quality profile, and select a size. Omit these values to fall back to
the provider defaults.
Streaming Previews
Partial renders arrive as base64-encoded bytes inside metadata events:response.image_generation_call.*) so
you can display progress indicators while the image renders.
Final Image
Completed images are attached to the assistant message asDataPart instances
with an image/* MIME type:

