Skip to content

feat(ai): migrate Imagen pages to Nano Banana#1846

Merged
daymxn merged 3 commits intomainfrom
dlr/migrate-imagen
Apr 8, 2026
Merged

feat(ai): migrate Imagen pages to Nano Banana#1846
daymxn merged 3 commits intomainfrom
dlr/migrate-imagen

Conversation

@daymxn
Copy link
Copy Markdown
Member

@daymxn daymxn commented Apr 2, 2026

Per b/498982262,

This PR migrates all of our existing Imagen screens to Nano Banana alternatives. This aligns with the deprecation of the Imagen API, and should offer consumers a prime example of what migration looks like.

Note that for the template, I created a template in the Firebase console that matched the Imagen one. Although, since there's not a default dropdown for a Nano Banana template, I'd be fine with just removing that screen entirely.

@daymxn daymxn self-assigned this Apr 2, 2026
@daymxn daymxn enabled auto-merge (squash) April 2, 2026 17:09
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request rebrands the "Imagen" features to "Nano Banana" throughout the application, updating screen names, view models, and model configurations to utilize the GenerativeModel with the gemini-2.5-flash-image model. Key changes include updating copyright headers, navigation titles, and adapting response handling to use inlineDataParts. Review feedback suggests replacing print statements with the existing logger instance for better log management and correcting a typo in the sample data titles.

print("Image(s) Blocked: \(filteredReason)")
// 2. Print the reason images were blocked, if any.
if let blockReason = response.promptFeedback?.blockReason {
print("Image(s) Blocked: \(blockReason)")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Consider using the class's logger instance instead of print for consistency and better log management.

Suggested change
print("Image(s) Blocked: \(blockReason)")
logger.info("Image(s) Blocked: \(blockReason)")

print("Image(s) Blocked: \(filteredReason)")
// 2. Print the reason images were blocked, if any.
if let blockReason = response.promptFeedback?.blockReason {
print("Image(s) Blocked: \(blockReason)")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Consider using the class's logger instance instead of print for consistency and better log management.

Suggested change
print("Image(s) Blocked: \(blockReason)")
logger.info("Image(s) Blocked: \(blockReason)")

Comment thread firebaseai/FirebaseAIExample/Shared/Models/Sample.swift Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@daymxn daymxn merged commit 234ffe5 into main Apr 8, 2026
8 checks passed
@daymxn daymxn deleted the dlr/migrate-imagen branch April 8, 2026 16:38
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.

2 participants