Skip to content

[AI] Add config for image aspect ratio / size with Nano Banana#15920

Closed
andrewheard wants to merge 6 commits intomainfrom
ah/ai-image-config
Closed

[AI] Add config for image aspect ratio / size with Nano Banana#15920
andrewheard wants to merge 6 commits intomainfrom
ah/ai-image-config

Conversation

@andrewheard
Copy link
Contributor

@andrewheard andrewheard commented Mar 10, 2026

Add support for configuring image aspect ratios and sizes when generating images using Nano Banana. Also adds support for 2K images with Imagen (previously only the default 1K was possible).

TODOs:

  • Add changelog entry
  • Add integration tests

#no-changelog

@gemini-code-assist
Copy link
Contributor

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@danger-firebase-ios
Copy link

1 Warning
⚠️ New public headers were added, did you remember to add them to the umbrella header?

Generated by 🚫 Danger

let storageURI: String?
let negativePrompt: String?
let aspectRatio: String?
let sampleImageSize: String?
Copy link
Member

Choose a reason for hiding this comment

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

Why sampleImageSize and not imageSize to align with the gemini docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an internal type just used for serializing JSON to send to the :predict endpoint (solely for Imagen). The size parameter for Imagen is sampleImageSize. I see what you mean by the Gemini docs but I believe they are wrong based on the schema. We should verify though.

@paulb777
Copy link
Member

Continued in #15923

@andrewheard
Copy link
Contributor Author

Closing; continued in #15923.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants