npm / firebase
firebase
What changed in firebase 11 to 13, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
21 breaking4 security6 deprecations46 new APIs and options3 performance19 behavior and defaults38 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initfirebase 1326 changes
Breaking changes 7
The previously deprecated backend type was removed; use BackendType.AGENT_PLATFORM instead.
ChatSession is now exported as an interface instead of a class.
Part is now a discriminated union with explicit type properties; type discriminators are stripped on wire egress.
templateVariables is now required in StartTemplateChatParams.
Now accepts a unified TemplateRequest object as its first parameter.
templateVariables is now required in TemplateRequest.
The previously deprecated VertexAIBackend API was removed; use AgentPlatformBackend instead.
Deprecations 1
Deprecated in GenerationConfig and LiveGenerationConfig because the parameter is unsupported in Gemini 3.x and later models.
New APIs and options 6
Crashlytics is released for public preview.
Added as a DML stage to Pipelines.
Added as a source stage to Pipelines.
Added the
atomicoption for executing a pipeline in a single transaction.Firestore now supports BSON types.
Added UnknownPart for raw wire and user-provided inputs.
Behavior and default changes 4
Pipeline Search graduates from Public Preview to GA.
Its default model-access location is global; specify us-central1 explicitly when needed.
The default hybrid-in-cloud model is now gemini-3.5-flash-lite.
UpdateData<T> now allows indexed types or Record<X, T> for T.
Fixes and other changes 8
Fixes an unhandled promise rejection if the page navigates away or is backgrounded while the initial cache is loading.
Fixes an uncatchable unhandled promise rejection when background reCAPTCHA Enterprise token verification fails during initialization or phone sign-in.
The buffer increases from 30 seconds to 5 minutes to match User.getIdToken() documentation and the proactive refresh offset.
Fixes an unhandled exception when a popup or redirect operation is cancelled by a second call before the first operation finishes initializing.
The persisted user is cleared only when the initial user reload fails with a user invalidation error, preserving sessions across transient server errors such as HTTP 5xx UNAVAILABLE.
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.
Auth initialization now preserves the persisted user when the initial reload fails due to transient quota or rate-limit errors.
The Temporal namespace declaration is now included in global_index.d.ts.
firebase 12104 changes
Breaking changes 11
Imagen methods and types have been removed because Imagen models were shut down; migrate apps to Gemini Image models as a replacement.
Calling initializeAppCheck without a provider is no longer supported.
All timegranularity values are changed to lowercase.
The beta API changes Type from a string union to a raw string.
The minimum supported Node.js version is now 20 for the affected Firebase packages.
Firebase AI TypeScript enum exports are now const variables, which may require changes to code relying on enum exports.
The fix for document snapshots becoming undefined after clearing browser site data was reverted because it caused issues for some customers.
GroundingAttribution has been removed.
The minimum Node.js version is now Node 20.
The vertexai import path has been removed.
VertexAI APIs have been removed.
Security 4
Fixed recognition of App Check tokens sent in Firebase SQL Connect Realtime requests.
Fixes a ReDoS vulnerability in FirebaseError template replacement.
Auth API requests use strict-origin-when-cross-origin instead of no-referrer, supporting HTTP Referrer-restricted API keys in browser environments.
Hardened streaming transport with intelligent reconnection, query de-duplication, and resume optimizations.
Deprecations 5
VertexAIBackend is deprecated in favor of AgentPlatformBackend; the replacement defaults to the global model location instead of us-central1.
GoogleMaps.enableWidget is deprecated following the announcement by the Grounding for Google Maps service.
All Imagen models are deprecated and will shut down as early as June 2026; migrate apps to Gemini Image models.
The temperature property is deprecated for hybrid inference mode.
The topK property is deprecated for hybrid inference mode.
New APIs and options 38
Firestore now supports conversion and serialization between Temporal.Instant and Firestore Timestamp.
Adds the grpcFlowControlWindow setting and increases the HTTP/2 flow control window from 64 KB to 256 KB in Node environments.
Adds text-to-speech support for non-Live API models, with single- and multi-speaker configurations.
A new API for creating and deleting FCM registrations is available, and the old API is deprecated.
Adds a method for explicitly initializing the on-device model in hybrid mode.
Adds minimum and maximum FieldValue operations.
Added the contextWindowCompression feature.
Expanded FinishReason values to include all currently available values provided by the models.
Added support for Grounding with Google Maps in AI Logic.
Added support for ImageConfig, including aspect ratio and size.
Added a method to resume a previous LiveSession.
Added support for languageCode, offset, limit, and retrievalDepth in the search stage.
Adds support for the coalesce pipeline expression.
Adds streaming support for Firebase Data Connect.
Adds support for the ifNull pipeline expression.
Adds support for the nor logical expression.
Adds support for the parent expression in Firestore Pipelines.
Adds startChat() for TemplateGenerativeModel.
Adds subquery support to Pipelines.
Adds support for the switchOn logical expression.
Adds support for the timestamp_diff expression.
Adds support for the timestamp_extract expression.
Adds support for the timestamp_trunc expression.
Firestore adds support for the arrayFirst array expression.
Firestore adds support for the arrayFirstN array expression.
Firestore adds support for the arrayIndexOf array expression.
Firestore adds support for the arrayIndexOfAll array expression.
Firestore adds support for the arrayLast array expression.
Firestore adds support for the arrayLastIndexOf array expression.
Firestore adds support for the arrayLastN array expression.
Firestore adds support for the arrayMaximum array expression.
Firestore adds support for the arrayMaximumN array expression.
Firestore adds support for the arrayMinimum array expression.
Firestore adds support for the arrayMinimumN array expression.
Added responseJsonSchema to GenerationConfig.
Firebase AI schemas now support anyOf.
Firebase AI now supports Grounding with Google Search.
Firebase AI now supports Thinking Budget.
Performance 3
Updated the WebSocket URL path for SQL Connect server affinity to improve server resource usage efficiency and performance.
Removes the one-minute delay before closing idle backend connections to save resources.
Performance of UTF-8 string ordering logic was further improved.
Behavior and default changes 13
The debug token log message now includes Firebase CLI commands, a Firebase Console registration link, and a debug token guide.
FunctionsError now includes the HTTP status code in its message and the URL in customData, providing more details about the error.
Requests include platform name and SDK version headers to enable metrics collection in cloud monitoring.
Calling initializeAppCheck without a provider now attempts initialization with ReCaptchaEnterpriseProvider using the recaptchaSiteKey in the Firebase project config.
Hybrid inference features are marked public rather than beta, indicating general availability.
Code execution is generally available and no longer in public preview.
URL context is generally available and no longer in public preview.
Adds public preview support for full-text search in Pipelines.
Adds public preview support for geo search in Pipelines.
The peer dependency range supports both v2 and v3.
Server prompt templates support automatic function calling and chat history.
Pipeline user data validation is deferred from initialization to execute().
initializeServerApp now supports auto-initialization for Firebase App Hosting.
Fixes and other changes 30
Firestore fetch connection error messages are no longer undefined.
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.
The SDK no longer hardcodes an invalid function role, preventing 400 errors during function calling on gemini-3.6-flash.
Persistence can reconnect on demand after pagehide events, fixing Database is closing errors during signInWithPopup on iPadOS and iOS Safari.
When persistence initialization fails or storage is inaccessible, the SDK falls back to in-memory persistence, preventing initialization deadlocks and ensuring authStateReady() resolves.
Structured outputs now accept text/x.enum alongside application/json when responseSchema or responseJsonSchema is provided.
Corrected the log to name the referenced document rather than the document that contains the reference.
Removed the visibilitychange listener to fix signInWithPopup and other background-tab operations failing with “Database is closing/hidden.”
Fixed LanguageModel detection that prevented on-device models from being used in Chrome Extensions.
Fixes a regression that caused peer dependencies to be unbundled in the standalone bundle.
Its exponential backoff parameters are aligned with those of other platform SDKs.
Prevents null hydration and unexpected sign-out on pagehide or reload when using IndexedDB persistence.
ABT realtime is supported when a variant value matches the default value of a parameter.
Fixes an error when Auth and AppCheck both use ReCAPTCHA Enterprise.
The ChatSession constructor now wraps params.systemInstruction with formatSystemInstruction().
Fixes duplicate user turns being sent in the request.
Flush scheduling and queued-event processing are adjusted so export starts promptly, staged logs can start the service, and disabling export clears queued events and timers.
Fixes limited-use token retrieval by sending the
limited_useparameter.Retries the initial IndexedDB availability check to prevent incorrect fallbacks to in-memory persistence when startup transactions occasionally drop.
Query listen stream creation and re-creation are more robust and provide improved logging.
Updates the experiment when the last running experiment is stopped.
Fixed an assertion failure caused by a target creation race condition.
Fixed the TemplateChatSession type so it no longer errors during a TypeScript build.
Fixes header names for auth and app check tokens over streaming.
Fixes a bug that caused the model to error when responseJsonSchema was specified.
Fixes a bug that caused the model to error when responseSchema was specified.
Fixed “X is not a function” issues observed in server side rendering APIs.
Fixed a regression that prevented the SDK from reconnecting to IndexedDb after disconnect.
Typings for functionDeclaration.parameters have been fixed.
Fixes events not being sent when they exceed the sendBeacon payload limit.
firebase 117 changes
Breaking changes 3
ES5 bundles were removed, making ES2017 the minimum required ES version.
Calling executeQuery with mutations now throws an error.
The node bundle was removed after node-specific fetch code was removed in favor of native fetch throughout the SDK.
New APIs and options 2
The FunctionsError class is now publicly exported.
reCAPTCHA Enterprise can now be used for app verification during phone authentication.
Behavior and default changes 2
VertexAI in Firebase is generally available.
Node bundles no longer depend on undici and node-fetch; they use the native fetch implementation instead.