Skip to content

Conversation

@larskoole
Copy link

Description

Adds imageSize to generationConfig.

Breaking Changes

No breaking changes

Copilot AI review requested due to automatic review settings January 22, 2026 10:58
@larskoole
Copy link
Author

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for configuring Gemini image generation size by mapping a new image_size provider option into the Gemini generationConfig.imageConfig.imageSize request payload.

Changes:

  • Add imageSize mapping under generationConfig.imageConfig for Gemini image requests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

'responseModalities' => $providerOptions['response_modalities'] ?? ['TEXT', 'IMAGE'],
'imageConfig' => [
'aspectRatio' => $providerOptions['aspect_ratio'] ?? null,
'imageSize' => $providerOptions['image_size'] ?? null,
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imageSize is newly supported here, but there’s no test asserting that the image_size provider option is mapped into generationConfig.imageConfig.imageSize for Gemini image models (similar to the existing aspectRatio assertion). Please add/extend a Gemini images request test to cover this new field so regressions are caught.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant