# What changed in firebase

> 37 changes in firebase 12 to 13 from its official release notes, upgrade guides and advisories: 9 breaking, 6 deprecations, 1 security, 3 new APIs and options. Each one cited. Sources checked 2026-10-20. HTML: https://unstale.sh/npm/firebase/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## firebase 13

### Breaking changes

- The previously deprecated backend type was removed; use BackendType.AGENT_PLATFORM instead. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- ChatSession is now exported as an interface instead of a class. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- Part is now a discriminated union with explicit type properties; type discriminators are stripped on wire egress. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- templateVariables is now required in StartTemplateChatParams. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- Now accepts a unified TemplateRequest object as its first parameter. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- Now accepts a unified TemplateRequest object as its first parameter. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- templateVariables is now required in TemplateRequest. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- The previously deprecated VertexAIBackend API was removed; use AgentPlatformBackend instead. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)

### Deprecations

- Deprecated in GenerationConfig and LiveGenerationConfig because the parameter is unsupported in Gemini 3.x and later models. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- Deprecated in GenerationConfig and LiveGenerationConfig because the parameter is unsupported in Gemini 3.x and later models. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- Deprecated in GenerationConfig and LiveGenerationConfig because the parameter is unsupported in Gemini 3.x and later models. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- Deprecated in GenerationConfig and LiveGenerationConfig because the parameter is unsupported in Gemini 3.x and later models. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- Deprecated in GenerationConfig and LiveGenerationConfig because the parameter is unsupported in Gemini 3.x and later models. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- Deprecated in GenerationConfig and LiveGenerationConfig because the parameter is unsupported in Gemini 3.x and later models. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)

### New APIs and options

- Firestore now supports BSON types. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- Added UnknownPart for raw wire and user-provided inputs. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)

### Behavior and default changes

- Its default model-access location is global; specify us-central1 explicitly when needed. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- The default hybrid-in-cloud model is now gemini-3.5-flash-lite. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- UpdateData<T> now allows indexed types or Record<X, T> for T. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)

### Fixes and other changes

- Suppresses false-positive CONFIG_UPDATE_STREAM_ERROR events when the application enters the background and reconnects if it returns to the foreground before closing finishes. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- Auth initialization now preserves the persisted user when the initial reload fails due to transient quota or rate-limit errors. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)
- The Temporal namespace declaration is now included in global_index.d.ts. (13.0.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4013.0.0)

## firebase 12

### Breaking changes

- Imagen methods and types have been removed because Imagen models were shut down; migrate apps to Gemini Image models as a replacement. (12.18.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.18.0)

### Security

- Fixed recognition of App Check tokens sent in Firebase SQL Connect Realtime requests. (12.18.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.18.0)

### New APIs and options

- Firestore now supports conversion and serialization between Temporal.Instant and Firestore Timestamp. (12.19.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.19.0)

### Performance

- Updated the WebSocket URL path for SQL Connect server affinity to improve server resource usage efficiency and performance. (12.18.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.18.0)

### Behavior and default changes

- The debug token log message now includes Firebase CLI commands, a Firebase Console registration link, and a debug token guide. (12.18.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.18.0)
- FunctionsError now includes the HTTP status code in its message and the URL in customData, providing more details about the error. (12.18.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.18.0)

### Fixes and other changes

- Firestore fetch connection error messages are no longer undefined. (12.19.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.19.0)
- Storage and persistence errors during current user updates are wrapped as FirebaseError with code auth/internal-error; the original exception is attached under error.customData.originalError. (12.19.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.19.0)
- The SDK no longer hardcodes an invalid function role, preventing 400 errors during function calling on gemini-3.6-flash. (12.19.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.19.0)
- Persistence can reconnect on demand after pagehide events, fixing Database is closing errors during signInWithPopup on iPadOS and iOS Safari. (12.19.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.19.0)
- When persistence initialization fails or storage is inaccessible, the SDK falls back to in-memory persistence, preventing initialization deadlocks and ensuring authStateReady() resolves. (12.19.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.19.0)
- Structured outputs now accept text/x.enum alongside application/json when responseSchema or responseJsonSchema is provided. (12.19.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.19.0)
- Corrected the log to name the referenced document rather than the document that contains the reference. (12.18.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.18.0)
- Removed the visibilitychange listener to fix signInWithPopup and other background-tab operations failing with “Database is closing/hidden.” (12.18.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.18.0)
- Fixed LanguageModel detection that prevented on-device models from being used in Chrome Extensions. (12.18.0) — [release notes](https://github.com/firebase/firebase-js-sdk/releases/tag/firebase%4012.18.0)
