Title: `ng update` rewrites Vertex AI calls to a deprecated backend class, in a location where current models are not served · Issue #3758 · angular/angularfire · GitHub
Open Graph Title: `ng update` rewrites Vertex AI calls to a deprecated backend class, in a location where current models are not served · Issue #3758 · angular/angularfire
X Title: `ng update` rewrites Vertex AI calls to a deprecated backend class, in a location where current models are not served · Issue #3758 · angular/angularfire
Description: Summary The v21 migration rewrites an AngularFire 20 app's getVertexAI(...) calls to getAI(app, { backend: new VertexAIBackend() }). Two things are wrong with the class it picks. VertexAIBackend is marked @deprecated - Use AgentPlatformB...
Open Graph Description: Summary The v21 migration rewrites an AngularFire 20 app's getVertexAI(...) calls to getAI(app, { backend: new VertexAIBackend() }). Two things are wrong with the class it picks. VertexAIBackend is...
X Description: Summary The v21 migration rewrites an AngularFire 20 app's getVertexAI(...) calls to getAI(app, { backend: new VertexAIBackend() }). Two things are wrong with the class it picks. VertexAIBacken...
Opengraph URL: https://github.com/angular/angularfire/issues/3758
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`ng update` rewrites Vertex AI calls to a deprecated backend class, in a location where current models are not served","articleBody":"### Summary\n\nThe v21 migration rewrites an AngularFire 20 app's `getVertexAI(...)` calls to\n`getAI(app, { backend: new VertexAIBackend() })`. Two things are wrong with the class it picks.\n\n`VertexAIBackend` is marked `@deprecated - Use AgentPlatformBackend instead` in the Firebase SDK.\n`AgentPlatformBackend` does not appear anywhere in `src/` or `docs/`, so the deprecation is unaddressed\nacross the whole package, not only in the migration.\n\nThe larger problem is where that class sends requests. `new VertexAIBackend()` with no argument resolves\nto `us-central1`, and `new AgentPlatformBackend()` resolves to `global`, which is the location Firebase\nsuggests when a model supports it and the only location that serves the Gemini 3.x models.\n\n### What a developer sees\n\nAn AngularFire 20 app calling `getVertexAI(app)` runs `ng update`, changes nothing else, and lands on a\ndeprecated class in a location where a current model returns a bare 404 with no explanation.\n\nMeasured against one live project, two calls a few minutes apart differing only in the backend class:\n\n| Backend | Location | Result for `gemini-3.7-flash` |\n|---|---|---|\n| `new VertexAIBackend()` | `us-central1` | `404`, `Publisher model ... was not found` |\n| `new AgentPlatformBackend()` | `global` | `200`, model responded |\n\n### The fix\n\nEmit `AgentPlatformBackend`. A call that passed a `location` option would keep it, so only calls that\npassed none, or a falsy one, would change location. That is a behavior change an automated rewrite\nshould not make quietly, so the migration should warn once for each file whose location moved, and\nseparately where a `location` is an expression that only runtime can resolve.\n\nOne case would need its own warning. Firebase does not serve the Live API models from `global`, so an\napp calling `getLiveGenerativeModel` or `startAudioConversation` should not be left there. The\nmigration could look for either of those across the workspace and say so in the warning.\n\n### Dependency\n\n`AgentPlatformBackend` first appears in `@firebase/ai` 2.14.0, which firebase 12.17.0 is the first\nrelease to bundle. The package declares `firebase ^12.4.0`, so the emitted class does not exist at the\nbottom of its own supported range. This cannot ship until that minimum rises, which is #3756.\n\n","author":{"url":"https://github.com/armando-navarro","@type":"Person","name":"armando-navarro"},"datePublished":"2026-09-01T04:11:58Z","url":"https://github.com/angular/angularfire/issues/3758"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:864e3e21-88a8-6c9b-6bd5-060008a5875d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BD7A:30BA3B:9C4C66:C7705B:6B036639 |
| html-safe-nonce | 31370b5ff2020ba21bd21545f24a31d85fcb7747d2dd3267a6d619860c65098a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDdBOjMwQkEzQjo5QzRDNjY6Qzc3MDVCOjZCMDM2NjM5IiwidmlzaXRvcl9pZCI6IjQ3ODY1MzQ3MDE0ODM2NDg1NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e300f1d455851838b8d14ef789e0c73bde72fd196a0feefc600f36c96387a9d3 |
| hovercard-subject-tag | issue:5307714666 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angularfire/3758/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dd7ef88872109f61d45fe2a7942d55a981bf38b3ddc7e1927eeaef693c3977ec/angular/angularfire/issues/3758 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dd7ef88872109f61d45fe2a7942d55a981bf38b3ddc7e1927eeaef693c3977ec/angular/angularfire/issues/3758 |
| og:image:alt | Summary The v21 migration rewrites an AngularFire 20 app's getVertexAI(...) calls to getAI(app, { backend: new VertexAIBackend() }). Two things are wrong with the class it picks. VertexAIBackend is... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | armando-navarro |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angularfire git https://github.com/angular/angularfire.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49453413 |
| octolytics-dimension-repository_nwo | angular/angularfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49453413 |
| octolytics-dimension-repository_network_root_nwo | angular/angularfire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width