From 6cd38fb64ec014fb8fbea27a10b20cb55405f9fe Mon Sep 17 00:00:00 2001 From: Cynthia J Date: Tue, 22 Sep 2026 21:45:37 -0700 Subject: [PATCH 1/4] remove deprecated apis --- .../firebase_ai/firebase_ai/lib/src/api.dart | 36 +------------ .../firebase_ai/lib/src/firebase_ai.dart | 53 +------------------ .../firebase_ai/lib/src/live_api.dart | 24 ++------- .../firebase_ai/lib/src/live_session.dart | 44 --------------- .../firebase_ai/test/api_test.dart | 25 ++++----- .../firebase_ai/test/developer_api_test.dart | 1 - .../test/firebase_vertexai_test.dart | 21 ++++---- .../firebase_ai/test/live_test.dart | 21 -------- 8 files changed, 26 insertions(+), 199 deletions(-) diff --git a/packages/firebase_ai/firebase_ai/lib/src/api.dart b/packages/firebase_ai/firebase_ai/lib/src/api.dart index c8df260b1981..394bdf5a7114 100644 --- a/packages/firebase_ai/firebase_ai/lib/src/api.dart +++ b/packages/firebase_ai/firebase_ai/lib/src/api.dart @@ -22,22 +22,13 @@ import 'tool.dart' show Tool, ToolConfig; /// Response for Count Tokens final class CountTokensResponse { // ignore: public_member_api_docs - CountTokensResponse(this.totalTokens, - {this.totalBillableCharacters, this.promptTokensDetails}); + CountTokensResponse(this.totalTokens, {this.promptTokensDetails}); /// The number of tokens that the `model` tokenizes the `prompt` into. /// /// Always non-negative. final int totalTokens; - /// The number of characters that the `model` could bill at. - /// - /// Always non-negative. - @Deprecated( - 'Use `totalTokens` instead; Gemini 2.0 series models and newer are always billed by token count.', - ) - final int? totalBillableCharacters; - /// List of modalities that were processed in the request input. final List? promptTokensDetails; } @@ -448,12 +439,6 @@ final class GroundingMetadata { /// page) that the model used to ground its response. final List groundingChunks; - /// A list of [GroundingSupport]s. - /// - /// Keeping for backwards compatibility. See b/477107542. - @Deprecated('Use groundingSupports instead') - List get groundingSupport => groundingSupports; - /// A list of [GroundingSupport]s. /// /// Each object details how specific segments of the @@ -1129,19 +1114,6 @@ enum ThinkingLevel { /// Config for thinking features. class ThinkingConfig { - /// Deprecated public constructor of [ThinkingConfig]. - /// - /// Keep for backwards compatibility. - /// [thinkingBudget] and [thinkingLevel] cannot be set at the same time. - @Deprecated( - 'Use ThinkingConfig.withThinkingBudget() or ThinkingConfig.withThinkingLevel() instead.') - ThinkingConfig( - {this.thinkingBudget, this.thinkingLevel, this.includeThoughts}) - : assert( - !(thinkingBudget != null && thinkingLevel != null), - 'thinkingBudget and thinkingLevel cannot be set at the same time.', - ); - // Private constructor ThinkingConfig._( {this.thinkingBudget, this.thinkingLevel, this.includeThoughts}); @@ -1540,11 +1512,6 @@ final class AgentPlatformSerialization implements SerializationStrategy { } final totalTokens = jsonObject['totalTokens'] as int; - final totalBillableCharacters = switch (jsonObject) { - {'totalBillableCharacters': final int totalBillableCharacters} => - totalBillableCharacters, - _ => null, - }; final promptTokensDetails = switch (jsonObject) { {'promptTokensDetails': final List promptTokensDetails} => promptTokensDetails.map(_parseModalityTokenCount).toList(), @@ -1553,7 +1520,6 @@ final class AgentPlatformSerialization implements SerializationStrategy { return CountTokensResponse( totalTokens, - totalBillableCharacters: totalBillableCharacters, promptTokensDetails: promptTokensDetails, ); } diff --git a/packages/firebase_ai/firebase_ai/lib/src/firebase_ai.dart b/packages/firebase_ai/firebase_ai/lib/src/firebase_ai.dart index 188e46dc015d..204c05d3606a 100644 --- a/packages/firebase_ai/firebase_ai/lib/src/firebase_ai.dart +++ b/packages/firebase_ai/firebase_ai/lib/src/firebase_ai.dart @@ -58,47 +58,6 @@ class FirebaseAI extends FirebasePlugin { static final Map _cachedInstances = {}; - /// Returns an instance using a specified [FirebaseApp]. - /// - /// If [app] is not provided, the default Firebase app will be used. - /// If pass in [appCheck], request session will get protected from abusing. - @Deprecated( - 'Use agentPlatform() instead. Note that the default location for agentPlatform is now "global" instead of "us-central1"') - static FirebaseAI vertexAI({ - FirebaseApp? app, - @Deprecated( - 'Passing an explicit instance is deprecated, internal handling is now automatic.') - FirebaseAppCheck? appCheck, - @Deprecated( - 'Passing an explicit instance is deprecated, internal handling is now automatic.') - FirebaseAuth? auth, - String? location, - bool? useLimitedUseAppCheckTokens, - }) { - app ??= Firebase.app(); - appCheck ??= app.getService(); - auth ??= app.getService(); - var instanceKey = '${app.name}::vertexai::$location'; - - if (_cachedInstances.containsKey(instanceKey)) { - return _cachedInstances[instanceKey]!; - } - - location ??= _defaultVertexAILocation; - - FirebaseAI newInstance = FirebaseAI._( - app: app, - location: location, - appCheck: appCheck, - auth: auth, - useAgentPlatform: true, - useLimitedUseAppCheckTokens: useLimitedUseAppCheckTokens ?? false, - ); - _cachedInstances[instanceKey] = newInstance; - - return newInstance; - } - /// Returns an instance using a specified [FirebaseApp]. /// /// If [app] is not provided, the default Firebase app will be used. @@ -135,17 +94,9 @@ class FirebaseAI extends FirebasePlugin { /// If pass in [appCheck], request session will get protected from abusing. static FirebaseAI googleAI({ FirebaseApp? app, - @Deprecated( - 'Passing an explicit instance is deprecated, internal handling is now automatic.') - FirebaseAppCheck? appCheck, - @Deprecated( - 'Passing an explicit instance is deprecated, internal handling is now automatic.') - FirebaseAuth? auth, bool? useLimitedUseAppCheckTokens, }) { app ??= Firebase.app(); - appCheck ??= app.getService(); - auth ??= app.getService(); var instanceKey = '${app.name}::googleai'; if (_cachedInstances.containsKey(instanceKey)) { @@ -155,8 +106,8 @@ class FirebaseAI extends FirebasePlugin { FirebaseAI newInstance = FirebaseAI._( app: app, location: _defaultAgentPlatformLocation, - appCheck: appCheck, - auth: auth, + appCheck: app.getService(), + auth: app.getService(), useAgentPlatform: false, useLimitedUseAppCheckTokens: useLimitedUseAppCheckTokens ?? false, ); diff --git a/packages/firebase_ai/firebase_ai/lib/src/live_api.dart b/packages/firebase_ai/firebase_ai/lib/src/live_api.dart index 91a706859cde..527be96b896c 100644 --- a/packages/firebase_ai/firebase_ai/lib/src/live_api.dart +++ b/packages/firebase_ai/firebase_ai/lib/src/live_api.dart @@ -424,7 +424,6 @@ class LiveServerResponse { class LiveClientRealtimeInput { /// Creates a [LiveClientRealtimeInput] instance. LiveClientRealtimeInput({ - @Deprecated('Use audio, video, or text instead') this.mediaChunks, this.audio, this.video, this.text, @@ -435,8 +434,7 @@ class LiveClientRealtimeInput { /// Creates a [LiveClientRealtimeInput] with audio data. LiveClientRealtimeInput.audio(this.audio) // ignore: deprecated_member_use_from_same_package - : mediaChunks = null, - video = null, + : video = null, text = null, activityStart = null, activityEnd = null; @@ -444,8 +442,7 @@ class LiveClientRealtimeInput { /// Creates a [LiveClientRealtimeInput] with video data. LiveClientRealtimeInput.video(this.video) // ignore: deprecated_member_use_from_same_package - : mediaChunks = null, - audio = null, + : audio = null, text = null, activityStart = null, activityEnd = null; @@ -453,8 +450,7 @@ class LiveClientRealtimeInput { /// Creates a [LiveClientRealtimeInput] with text data. LiveClientRealtimeInput.text(this.text) // ignore: deprecated_member_use_from_same_package - : mediaChunks = null, - audio = null, + : audio = null, video = null, activityStart = null, activityEnd = null; @@ -462,8 +458,7 @@ class LiveClientRealtimeInput { /// Creates a [LiveClientRealtimeInput] with activity start signal. LiveClientRealtimeInput.activityStart() // ignore: deprecated_member_use_from_same_package - : mediaChunks = null, - audio = null, + : audio = null, video = null, text = null, activityStart = const {}, @@ -472,17 +467,12 @@ class LiveClientRealtimeInput { /// Creates a [LiveClientRealtimeInput] with activity end signal. LiveClientRealtimeInput.activityEnd() // ignore: deprecated_member_use_from_same_package - : mediaChunks = null, - audio = null, + : audio = null, video = null, text = null, activityStart = null, activityEnd = const {}; - /// The list of media chunks. - @Deprecated('Use audio, video, or text instead') - final List? mediaChunks; - /// Audio data. final InlineDataPart? audio; @@ -501,10 +491,6 @@ class LiveClientRealtimeInput { // ignore: public_member_api_docs Map toJson() => { 'realtime_input': { - if (mediaChunks != null) - 'media_chunks': - // ignore: deprecated_member_use_from_same_package - mediaChunks?.map((e) => e.toMediaChunkJson()).toList(), if (audio != null) 'audio': audio!.toMediaChunkJson(), if (video != null) 'video': video!.toMediaChunkJson(), if (text != null) 'text': text, diff --git a/packages/firebase_ai/firebase_ai/lib/src/live_session.dart b/packages/firebase_ai/firebase_ai/lib/src/live_session.dart index d82a566de6c4..262dc06765ec 100644 --- a/packages/firebase_ai/firebase_ai/lib/src/live_session.dart +++ b/packages/firebase_ai/firebase_ai/lib/src/live_session.dart @@ -323,50 +323,6 @@ class LiveSession { _ws.sink.add(clientJson); } - /// Sends realtime input (media chunks) to the server. - /// - /// [mediaChunks]: The list of media chunks to send. - @Deprecated( - 'Use sendAudioRealtime, sendVideoRealtime, or sendTextRealtime instead') - Future sendMediaChunks({ - required List mediaChunks, - }) async { - _checkWsStatus(); - var clientMessage = LiveClientRealtimeInput(mediaChunks: mediaChunks); - var clientJson = jsonEncode(clientMessage.toJson()); - _ws.sink.add(clientJson); - } - - /// Starts streaming media chunks to the server from the provided [mediaChunkStream]. - /// - /// This function asynchronously processes each [InlineDataPart] from the given - /// [mediaChunkStream] and sends it to the server via the WebSocket connection. - /// - /// Parameters: - /// - [mediaChunkStream]: The stream of [InlineDataPart] objects to send to the server. - @Deprecated('Use sendAudio, sendVideo, or sendText with a stream instead') - Future sendMediaStream(Stream mediaChunkStream) async { - _checkWsStatus(); - - try { - await for (final chunk in mediaChunkStream) { - await _sendMediaChunk(chunk); - } - } catch (e) { - throw FirebaseAISdkException(e.toString()); - } finally { - log('Stream processing completed.'); - } - } - - Future _sendMediaChunk(InlineDataPart chunk) async { - var clientMessage = LiveClientRealtimeInput( - // ignore: deprecated_member_use_from_same_package - mediaChunks: [chunk]); // Create a list with the single chunk - var clientJson = jsonEncode(clientMessage.toJson()); - _ws.sink.add(clientJson); - } - /// Receives messages from the server. /// /// Returns a [Stream] of [LiveServerResponse] objects representing the diff --git a/packages/firebase_ai/firebase_ai/test/api_test.dart b/packages/firebase_ai/firebase_ai/test/api_test.dart index ff65ed0405f4..1e1e8edb7eab 100644 --- a/packages/firebase_ai/firebase_ai/test/api_test.dart +++ b/packages/firebase_ai/firebase_ai/test/api_test.dart @@ -535,7 +535,7 @@ void main() { test('GenerationConfig toJson with all fields', () { final schema = Schema.object(properties: {}); - final thinkingConfig = ThinkingConfig(thinkingBudget: 100); + final thinkingConfig = ThinkingConfig.withThinkingBudget(100); const imageConfig = ImageConfig( aspectRatio: ImageAspectRatio.square1x1, imageSize: ImageSize.size1K); final config = GenerationConfig( @@ -629,7 +629,7 @@ void main() { group('ThinkingConfig', () { test('toJson with thinkingBudget set', () { - final config = ThinkingConfig(thinkingBudget: 123); + final config = ThinkingConfig.withThinkingBudget(123); expect(config.toJson(), {'thinkingBudget': 123}); }); @@ -643,13 +643,14 @@ void main() { }); test('toJson with includeThoughts set', () { - final config = ThinkingConfig(includeThoughts: true); + final config = + ThinkingConfig.withThinkingBudget(null, includeThoughts: true); expect(config.toJson(), {'includeThoughts': true}); }); test('toJson with thinkingBudget and thinkingLevel null', () { - final config = ThinkingConfig(); + final config = ThinkingConfig.withThinkingBudget(null); // Expecting the key to be absent or the value to be explicitly null, // depending on implementation. Current implementation omits the key. @@ -657,7 +658,7 @@ void main() { }); test('constructor initializes thinkingBudget', () { - final config = ThinkingConfig(thinkingBudget: 456); + final config = ThinkingConfig.withThinkingBudget(456); expect(config.thinkingBudget, 456); expect(config.thinkingLevel, isNull); @@ -665,7 +666,7 @@ void main() { }); test('constructor initializes thinkingLevel', () { - final config = ThinkingConfig(thinkingLevel: ThinkingLevel.low); + final config = ThinkingConfig.withThinkingLevel(ThinkingLevel.low); expect(config.thinkingBudget, isNull); expect(config.thinkingLevel, ThinkingLevel.low); @@ -673,7 +674,8 @@ void main() { }); test('constructor initializes includeThoughts', () { - final config = ThinkingConfig(includeThoughts: true); + final config = + ThinkingConfig.withThinkingLevel(null, includeThoughts: true); expect(config.thinkingBudget, isNull); expect(config.thinkingLevel, isNull); @@ -697,15 +699,6 @@ void main() { expect(config.thinkingLevel, ThinkingLevel.medium); expect(config.includeThoughts, isTrue); }); - - test( - 'deprecated constructor throws AssertionError if both thinkingBudget and thinkingLevel are provided', - () { - expect( - () => ThinkingConfig( - thinkingBudget: 100, thinkingLevel: ThinkingLevel.high), - throwsA(isA())); - }); }); group('Parsing Functions', () { diff --git a/packages/firebase_ai/firebase_ai/test/developer_api_test.dart b/packages/firebase_ai/firebase_ai/test/developer_api_test.dart index 85116e454646..8f8caa3603b9 100644 --- a/packages/firebase_ai/firebase_ai/test/developer_api_test.dart +++ b/packages/firebase_ai/firebase_ai/test/developer_api_test.dart @@ -573,7 +573,6 @@ void main() { expect(response.totalTokens, 123); // Developer API does not return other fields // ignore: deprecated_member_use_from_same_package - expect(response.totalBillableCharacters, isNull); expect(response.promptTokensDetails, isNull); }); diff --git a/packages/firebase_ai/firebase_ai/test/firebase_vertexai_test.dart b/packages/firebase_ai/firebase_ai/test/firebase_vertexai_test.dart index 166cd3ff6939..78f98d3468dc 100644 --- a/packages/firebase_ai/firebase_ai/test/firebase_vertexai_test.dart +++ b/packages/firebase_ai/firebase_ai/test/firebase_vertexai_test.dart @@ -132,16 +132,16 @@ void main() { // ignore: deprecated_member_use_from_same_package test('Singleton behavior', () { // ignore: deprecated_member_use_from_same_package - final instance1 = FirebaseAI.vertexAI(); + final instance1 = FirebaseAI.agentPlatform(); // ignore: deprecated_member_use_from_same_package - final instance2 = FirebaseAI.vertexAI(app: app); + final instance2 = FirebaseAI.agentPlatform(app: app); expect(identical(instance1, instance2), isTrue); }); // ignore: deprecated_member_use_from_same_package test('Instance creation with defaults', () { // ignore: deprecated_member_use_from_same_package - final vertexAI = FirebaseAI.vertexAI(app: app); + final vertexAI = FirebaseAI.agentPlatform(app: app); expect(vertexAI.app, equals(app)); expect(vertexAI.location, equals('us-central1')); }); @@ -149,10 +149,8 @@ void main() { // ignore: deprecated_member_use_from_same_package test('Instance creation with custom', () { // ignore: deprecated_member_use_from_same_package - final vertexAI = FirebaseAI.vertexAI( - app: customApp, - appCheck: customAppCheck, - location: 'custom-location'); + final vertexAI = FirebaseAI.agentPlatform( + app: customApp, location: 'custom-location'); expect(vertexAI.app, equals(customApp)); expect(vertexAI.appCheck, equals(customAppCheck)); expect(vertexAI.location, equals('custom-location')); @@ -161,7 +159,7 @@ void main() { // ignore: deprecated_member_use_from_same_package test('generativeModel creation', () { // ignore: deprecated_member_use_from_same_package - final vertexAI = FirebaseAI.vertexAI(); + final vertexAI = FirebaseAI.agentPlatform(); final model = vertexAI.generativeModel( model: 'gemini-pro', @@ -175,9 +173,8 @@ void main() { // ignore: deprecated_member_use_from_same_package test('Instance creation with useLimitedUseAppCheckTokens', () { // ignore: deprecated_member_use_from_same_package - final vertexAIAppCheck = FirebaseAI.vertexAI( + final vertexAIAppCheck = FirebaseAI.agentPlatform( app: limitTokenApp, - appCheck: limitTokenAppCheck, location: 'limit-token-location', useLimitedUseAppCheckTokens: true, ); @@ -190,7 +187,7 @@ void main() { // ignore: deprecated_member_use_from_same_package test('Instance creation with auto-injected AppCheck', () { // ignore: deprecated_member_use_from_same_package - final vertexAI = FirebaseAI.vertexAI(app: customApp); + final vertexAI = FirebaseAI.agentPlatform(app: customApp); expect(vertexAI.app, equals(customApp)); expect(vertexAI.appCheck, equals(customAppCheck)); @@ -199,7 +196,7 @@ void main() { // ignore: deprecated_member_use_from_same_package test('Instance creation with auto-injected Auth', () { // ignore: deprecated_member_use_from_same_package - final vertexAI = FirebaseAI.vertexAI(app: customApp); + final vertexAI = FirebaseAI.agentPlatform(app: customApp); expect(vertexAI.app, equals(customApp)); expect(vertexAI.auth, equals(customAuth)); diff --git a/packages/firebase_ai/firebase_ai/test/live_test.dart b/packages/firebase_ai/firebase_ai/test/live_test.dart index a0754bb2fd3b..e644a9b8c4b7 100644 --- a/packages/firebase_ai/firebase_ai/test/live_test.dart +++ b/packages/firebase_ai/firebase_ai/test/live_test.dart @@ -201,27 +201,6 @@ void main() { expect(message2.functionIds, null); }); - test('LiveClientRealtimeInput toJson() returns correct JSON', () { - final part = InlineDataPart('audio/pcm', Uint8List.fromList([1, 2, 3])); - // ignore: deprecated_member_use_from_same_package - final message = LiveClientRealtimeInput(mediaChunks: [part]); - expect(message.toJson(), { - 'realtime_input': { - 'media_chunks': [ - { - 'mimeType': 'audio/pcm', - 'data': 'AQID', - } - ], - }, - }); - - final message2 = LiveClientRealtimeInput(); - expect(message2.toJson(), { - 'realtime_input': {}, - }); - }); - test('LiveClientContent toJson() returns correct JSON', () { final content = Content.text('some test input'); final message = LiveClientContent(turns: [content], turnComplete: true); From 8b4ce76d678ff0cca3ede2d8c6a4deeb6e27c2fc Mon Sep 17 00:00:00 2001 From: Cynthia J Date: Wed, 23 Sep 2026 09:21:07 -0700 Subject: [PATCH 2/4] fix analyzer --- packages/firebase_ai/firebase_ai/lib/src/firebase_ai.dart | 1 - packages/firebase_ai/firebase_ai/test/live_test.dart | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/firebase_ai/firebase_ai/lib/src/firebase_ai.dart b/packages/firebase_ai/firebase_ai/lib/src/firebase_ai.dart index 204c05d3606a..9eeed3e482dd 100644 --- a/packages/firebase_ai/firebase_ai/lib/src/firebase_ai.dart +++ b/packages/firebase_ai/firebase_ai/lib/src/firebase_ai.dart @@ -23,7 +23,6 @@ import 'package:meta/meta.dart'; import '../firebase_ai.dart'; import 'base_model.dart'; -const _defaultVertexAILocation = 'us-central1'; const _defaultAgentPlatformLocation = 'global'; /// The entrypoint for generative models. diff --git a/packages/firebase_ai/firebase_ai/test/live_test.dart b/packages/firebase_ai/firebase_ai/test/live_test.dart index e644a9b8c4b7..c0c3ef81a702 100644 --- a/packages/firebase_ai/firebase_ai/test/live_test.dart +++ b/packages/firebase_ai/firebase_ai/test/live_test.dart @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. import 'dart:convert'; -import 'dart:typed_data'; import 'package:firebase_ai/src/api.dart'; import 'package:firebase_ai/src/content.dart'; From 3de52b0b2d50dcc45544e8d3155173f65fab628d Mon Sep 17 00:00:00 2001 From: Cynthia J Date: Wed, 23 Sep 2026 09:39:25 -0700 Subject: [PATCH 3/4] remove the legacy tests --- .../test/firebase_vertexai_test.dart | 75 ------------------- 1 file changed, 75 deletions(-) diff --git a/packages/firebase_ai/firebase_ai/test/firebase_vertexai_test.dart b/packages/firebase_ai/firebase_ai/test/firebase_vertexai_test.dart index 78f98d3468dc..3474eeef23be 100644 --- a/packages/firebase_ai/firebase_ai/test/firebase_vertexai_test.dart +++ b/packages/firebase_ai/firebase_ai/test/firebase_vertexai_test.dart @@ -128,81 +128,6 @@ void main() { }); }); - group('Deprecated vertexAI tests', () { - // ignore: deprecated_member_use_from_same_package - test('Singleton behavior', () { - // ignore: deprecated_member_use_from_same_package - final instance1 = FirebaseAI.agentPlatform(); - // ignore: deprecated_member_use_from_same_package - final instance2 = FirebaseAI.agentPlatform(app: app); - expect(identical(instance1, instance2), isTrue); - }); - - // ignore: deprecated_member_use_from_same_package - test('Instance creation with defaults', () { - // ignore: deprecated_member_use_from_same_package - final vertexAI = FirebaseAI.agentPlatform(app: app); - expect(vertexAI.app, equals(app)); - expect(vertexAI.location, equals('us-central1')); - }); - - // ignore: deprecated_member_use_from_same_package - test('Instance creation with custom', () { - // ignore: deprecated_member_use_from_same_package - final vertexAI = FirebaseAI.agentPlatform( - app: customApp, location: 'custom-location'); - expect(vertexAI.app, equals(customApp)); - expect(vertexAI.appCheck, equals(customAppCheck)); - expect(vertexAI.location, equals('custom-location')); - }); - - // ignore: deprecated_member_use_from_same_package - test('generativeModel creation', () { - // ignore: deprecated_member_use_from_same_package - final vertexAI = FirebaseAI.agentPlatform(); - - final model = vertexAI.generativeModel( - model: 'gemini-pro', - generationConfig: GenerationConfig(maxOutputTokens: 1024), - systemInstruction: Content.system('You are a helpful assistant.'), - ); - - expect(model, isA()); - }); - - // ignore: deprecated_member_use_from_same_package - test('Instance creation with useLimitedUseAppCheckTokens', () { - // ignore: deprecated_member_use_from_same_package - final vertexAIAppCheck = FirebaseAI.agentPlatform( - app: limitTokenApp, - location: 'limit-token-location', - useLimitedUseAppCheckTokens: true, - ); - expect(vertexAIAppCheck.app, equals(limitTokenApp)); - expect(vertexAIAppCheck.appCheck, equals(limitTokenAppCheck)); - expect(vertexAIAppCheck.location, equals('limit-token-location')); - expect(vertexAIAppCheck.useLimitedUseAppCheckTokens, true); - }); - - // ignore: deprecated_member_use_from_same_package - test('Instance creation with auto-injected AppCheck', () { - // ignore: deprecated_member_use_from_same_package - final vertexAI = FirebaseAI.agentPlatform(app: customApp); - - expect(vertexAI.app, equals(customApp)); - expect(vertexAI.appCheck, equals(customAppCheck)); - }); - - // ignore: deprecated_member_use_from_same_package - test('Instance creation with auto-injected Auth', () { - // ignore: deprecated_member_use_from_same_package - final vertexAI = FirebaseAI.agentPlatform(app: customApp); - - expect(vertexAI.app, equals(customApp)); - expect(vertexAI.auth, equals(customAuth)); - }); - }); - test('generativeModel creation with Grounding tools', () { final ai = FirebaseAI.googleAI(); From 02db90573ac8c031c940fe560ebd699aaa647863 Mon Sep 17 00:00:00 2001 From: Cynthia J Date: Wed, 23 Sep 2026 09:40:43 -0700 Subject: [PATCH 4/4] rename the test file --- .../test/{firebase_vertexai_test.dart => firebase_ai_test.dart} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/firebase_ai/firebase_ai/test/{firebase_vertexai_test.dart => firebase_ai_test.dart} (100%) diff --git a/packages/firebase_ai/firebase_ai/test/firebase_vertexai_test.dart b/packages/firebase_ai/firebase_ai/test/firebase_ai_test.dart similarity index 100% rename from packages/firebase_ai/firebase_ai/test/firebase_vertexai_test.dart rename to packages/firebase_ai/firebase_ai/test/firebase_ai_test.dart