GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(ai): drop the getImagenModel wrapper, removed in firebase 12.18 by armando-navarro · Pull Request #3750 · angular/angularfire

Conversation

@armando-navarro

@armando-navarro armando-navarro commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Checklist

  • Issue number for this PR: @angular/fire/ai fails to build against firebase 12.18, which removed getImagenModel #3749
  • Docs included?: yes, the upgrade guide and docs/ai.md
  • Test units included?: yes, a migration spec for the new removed-symbol guidance (227 specs, 0 failures)
  • In a clean directory, yarn install, yarn test run successfully?: yes

Description

Fixes #3749.

Firebase shut the Imagen models down in August 2026 and removed the Imagen API in @firebase/ai 2.15.0, which ships in firebase 12.18.0. The ai entry point imports getImagenModel, so any app whose install resolves firebase 12.18.0 fails to build.

The fix

  • The generator excludes getImagenModel from the wrapped named imports (a null override in tools/build.ts).
  • Installs whose firebase still includes the symbol (12.17 and older) keep compiling, because the entry point re-exports everything from firebase/ai with export *. That is compile-time grace only: the models are shut down, so the calls fail at the service on any firebase version.
  • The package deliberately keeps building against firebase 12.4.0, the lowest version the published ^12.4.0 range allows. That way every symbol the generated file imports by name exists in every firebase version a user's install can resolve.

Verification

  • A sweep of every wrapped @firebase package between the 12.4.0-mapped and 12.18.0-mapped versions confirmed getImagenModel is the only export removed in that window.
  • A typecheck of all generated named imports against a real firebase 12.18.0 install passes with this change and fails without it.
  • 227 specs, 0 failures.

Also in this change

  • The ng update Vertex AI migration treats getImagenModel as a removed symbol, leaving the import in place and logging guidance to move image generation to the Gemini image models through getGenerativeModel, with a new spec covering it.
  • The upgrade guide documents the removal, and its migration section is restructured into labeled cases and subheadings.
  • docs/ai.md no longer advertises Imagen models.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@armando-navarro
fix(ai): drop the getImagenModel wrapper, removed in firebase 12.18
a7e74c4
Firebase shut the Imagen models down in August 2026 and @firebase/ai
2.15.0 (firebase 12.18.0) removed the API. Our ai entry point
named-imports getImagenModel, so any install resolving firebase
12.18.0, which ^12.4.0 does on every fresh install, fails to build.

The generator now excludes getImagenModel from the wrapped named
imports. Installs whose firebase still includes the symbol (12.17
and older) keep compiling, because the entry point re-exports
everything from firebase/ai with export *. That is compile-time
grace only: the models are shut down, so the calls fail at the
service on any firebase version. The package keeps building against
firebase 12.4.0, the lowest version the published ^12.4.0 range
allows, so every symbol the generated file imports by name exists in
every firebase version a user's install can resolve: a sweep of every
wrapped @firebase package between the 12.4.0- and 12.18.0-mapped
versions found getImagenModel to be the only removed export.

The ng update migration now warns on getImagenModel imports with
guidance to move image generation to the Gemini image models via
getGenerativeModel, with a spec. The upgrade guide documents the
removal and its migration section is restructured for readability.
@armando-navarro
armando-navarro requested a review from tyler-reitz August 21, 2026 00:21
@armando-navarro armando-navarro added bump: patch Size of the change: a fix or docs change that reaches users comp: ai Firebase AI Logic / Vertex AI (src/ai). comp: docs Documentation. comp: schematics ng add / deploy schematics (src/schematics). type: bug Defect: expected behavior doesn't happen. labels Aug 21, 2026
tyler-reitz
tyler-reitz approved these changes Aug 21, 2026
View reviewed changes

@tyler-reitz tyler-reitz left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Verified independently: the named imports of all 14 generated firebase.ts files typecheck against a real firebase 12.18.0 install, and re-adding getImagenModel reproduces the TS2305 from #3749; regenerating every entry point with this branch's tools/build.ts produces zero drift against the committed files; the new migration spec goes red with the tables.ts entry removed; and the published rc tarball keeps export * from 'firebase/ai' verbatim in the shipped .d.ts and fesm, so the fix carries through to the artifact users install.

One note, not a change request: on firebase 12.17 and older, getImagenModel is still reachable through the star export but now unwrapped, where the zone-wrapped named export used to shadow it (ran both shapes to confirm the precedence). Since every call fails at the shut-down service, the only effect is the rejection settling outside the Angular zone, consistent with the compile-time-grace framing in the description.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@armando-navarro
armando-navarro merged commit b83343d into angular:main Aug 21, 2026
24 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@armando-navarro armando-navarro mentioned this pull request Sep 1, 2026
build: require firebase ^12.18.0 and wrap the functions it adds #3761
Merged
@armando-navarro armando-navarro added this to the 21.0.0-rc.1 milestone Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tyler-reitz tyler-reitz tyler-reitz approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bump: patch Size of the change: a fix or docs change that reaches users comp: ai Firebase AI Logic / Vertex AI (src/ai). comp: docs Documentation. comp: schematics ng add / deploy schematics (src/schematics). type: bug Defect: expected behavior doesn't happen.

Projects

None yet

Milestone

21.0.0-rc.1

Development

Successfully merging this pull request may close these issues.

@angular/fire/ai fails to build against firebase 12.18, which removed getImagenModel

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@armando-navarro @tyler-reitz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.