Skip to content

feat(AI): Replace Imagen with Nano Banana usage#985

Open
DellaBitta wants to merge 9 commits intomasterfrom
ddb-imagen-banana
Open

feat(AI): Replace Imagen with Nano Banana usage#985
DellaBitta wants to merge 9 commits intomasterfrom
ddb-imagen-banana

Conversation

@DellaBitta
Copy link
Copy Markdown
Contributor

Update the ai-react-app to:

  • Replace Imagen view with Nana Banana view.
  • Remove usage of Imagen generative model calls. Replace with standard regenerative models.
  • Update the supported models to the list of Nano Banana models.
  • Add an Aspect Ratio pull down for the supported Nano Banana aspect ratios. Selecting an Aspect Ratio appends the prompt with text with Use aspect ratio 21:9 for instance.
  • Add the ability to set the response modalities for image generation request.

Copy link
Copy Markdown

@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 replaces the 'Imagen Generation' feature with a new 'Nano Banana' mode, transitioning from a dedicated image generation model to a generative model capable of interleaved text and image output. Key changes include updating the application state to support the nanobanana mode, adding aspect ratio selection and response modality controls in the sidebar, and implementing the NanoBananaView component. Feedback highlights a missing dependency in a useCallback hook within NanoBananaView.tsx which could lead to stale state usage, and a redundant state assignment in RightSidebar.tsx.

Comment thread ai/ai-react-app/src/views/NanoBananaView.tsx Outdated
Comment thread ai/ai-react-app/src/components/Layout/RightSidebar.tsx Outdated
Comment thread ai/ai-react-app/src/components/Layout/RightSidebar.tsx Outdated
<option key={level} value={level}>
{level.replace(/_/g, " ")}
<option value="">None</option>
{["1:1", "3:2", "2:3", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"].map((ar) => (
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.

I thought we were only going to put a sample of aspect ratio text in the placeholder and not provide a UI select element? Is this because there are a limited number of aspect ratios that the model can handle?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it turns out that there's only a select set of supported aspect ratios. Seems easier to toy with if there's a pulldown, but I can remove the pull down and bake the aspect ratio into the sample prompts instead, if that's what you'd rather after all.

@DellaBitta
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown

@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 replaces the 'Imagen Generation' feature with 'Nano Banana,' transitioning from a dedicated image generation model to a generative model that supports interleaved text and image modalities. Key changes include updating UI components like MainLayout, RightSidebar, and PromptInput to handle new model parameters and aspect ratios, and replacing ImagenView with the new NanoBananaView. Review feedback identifies a critical security risk due to hardcoded Firebase credentials, the use of 'as any' for type casting, duplicated logic in the sidebar, and the need to properly handle content filtering reasons in the new view.

Comment thread ai/ai-react-app/src/views/NanoBananaView.tsx
Comment thread ai/ai-react-app/src/views/NanoBananaView.tsx Outdated
Comment thread ai/ai-react-app/src/components/Layout/RightSidebar.tsx Outdated
Comment thread ai/ai-react-app/src/components/Layout/RightSidebar.tsx Outdated
@firebase firebase deleted a comment from gemini-code-assist bot Apr 15, 2026
@DellaBitta
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown

@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 replaces the "Imagen Generation" feature with "Nano Banana," transitioning to a generative model that supports interleaved text and image modalities. Key updates include renaming application modes, adding controls for response modalities and aspect ratios in the sidebar, and implementing the NanoBananaView component. Review feedback identifies several missing CSS classes in the new view component and suggests enhancing prompt block error handling and updating legacy HTML identifiers for better consistency.

Comment thread ai/ai-react-app/src/views/NanoBananaView.tsx
Comment thread ai/ai-react-app/src/views/NanoBananaView.tsx
Comment thread ai/ai-react-app/src/views/NanoBananaView.tsx Outdated
Comment thread ai/ai-react-app/src/components/Layout/RightSidebar.tsx Outdated
@DellaBitta DellaBitta requested a review from hsubox76 April 15, 2026 16:13
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