Skip to content

feat(ai): add deprecation notices to Imagen types#15985

Merged
daymxn merged 9 commits intomainfrom
dlr/deprecate-imagen-models
Mar 27, 2026
Merged

feat(ai): add deprecation notices to Imagen types#15985
daymxn merged 9 commits intomainfrom
dlr/deprecate-imagen-models

Conversation

@daymxn
Copy link
Copy Markdown
Member

@daymxn daymxn commented Mar 26, 2026

Per b/496563474,

This PR adds deprecation notices to all of the imagen related APIs, to prepare for removal of said APIs in June.

@available markers have been added for each related type, with a descriptive message of what's going on, and how to migrate. Although, since we can't provide links within the annotation message, a matching @DeprecationSummary has also been included for each marker.

Some minor notes:

  • The positioning of @DeprecationSummary may appear to be odd in a few of the usages. This is due to the way xcode renders the notice. If it's not put after the first summary, then xcode won't render anything else (such as the arguments, or the discussion portion).
  • The @available markers still include a message, as this is the message that's actually used in the IDE for warnings. The one in the @DeprecationSummary is instead used in the generated docs.
  • Some internal types also have had these markers added. Even though these aren't public facing, it avoids a few warning messages from popping up in our build system. It also maintains consistency, and makes things a bit easier to audit.

#ai-logic-imagen-shutdown

@daymxn daymxn self-assigned this Mar 26, 2026
@daymxn daymxn requested a review from a team as a code owner March 26, 2026 16:02
@gemini-code-assist
Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Contributor

@andrewheard andrewheard left a comment

Choose a reason for hiding this comment

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

Please replace imagen with Imagen throughout.

@andrewheard andrewheard changed the title feat(ai): add deprecation notices to imagen types feat(ai): add deprecation notices to Imagen types Mar 26, 2026
@daymxn daymxn requested a review from andrewheard March 26, 2026 16:20
@andrewheard
Copy link
Copy Markdown
Contributor

@daymxn Would you mind merging from main to verify that the tests are fixed?

Copy link
Copy Markdown
Contributor

@andrewheard andrewheard left a comment

Choose a reason for hiding this comment

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

Thanks, @daymxn!

@daymxn daymxn merged commit 701e8a3 into main Mar 27, 2026
87 checks passed
@daymxn daymxn deleted the dlr/deprecate-imagen-models branch March 27, 2026 15:34
Copy link
Copy Markdown
Contributor

@rachelsaunders rachelsaunders left a comment

Choose a reason for hiding this comment

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

In each of the messages, is it possible to add the link to the migration guide? I just want to make sure folks don't have to go hunting for that info if they see one of these deprecation messages, ya know?

/// @DeprecationSummary {
/// All Imagen models are deprecated and will shut down as early as June 2026.
/// As a replacement, you can [migrate your apps to use Gemini Image models
/// (the "Nano Banana" models).](https://firebase.google.com/docs/ai-logic/imagen-models-migration)
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.

Suggested change
/// (the "Nano Banana" models).](https://firebase.google.com/docs/ai-logic/imagen-models-migration)
/// (the "Nano Banana" models)](https://firebase.google.com/docs/ai-logic/imagen-models-migration).

IF you spin up a new PR to address my high-level comment that I just posted, could you pls make this change throughout? It's just a nit, so if you're NOT spinning up a new PR, then don't worry about it at all.

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.

5 participants