Conversation
🦋 Changeset detectedLatest commit: f4a3215 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Vertex AI Mock Responses Check
|
Changeset File Check ✅
|
There was a problem hiding this comment.
Code Review
This pull request removes several previously deprecated APIs from the @firebase/ai package, including the VertexAIBackend class, the location property on the AI interface, and other deprecated properties and methods. The review feedback suggests replacing unsafe type assertions (as AgentPlatformBackend) with safer instanceof checks in live-generative-model.ts and request.ts to improve type safety.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request removes several previously deprecated APIs and classes from the @firebase/ai package, including the VertexAIBackend class, the location property on the AI interface, totalBillableCharacters from CountTokensResponse, enableWidget from GoogleMaps, retrievalQueries from GroundingMetadata, temperature and topK from LanguageModelCreateCoreOptions, and the sendMediaChunks and sendMediaStream methods from LiveSession. Corresponding tests, documentation, and internal references have been updated or removed. Regarding the feedback, a redundant type cast was identified in packages/ai/src/requests/request.ts where TypeScript's automatic type narrowing after an instanceof check makes the explicit cast unnecessary.
Removed all previously deprecated APIs and related code in AI Logic, except those that were recently deprecated in #10362
Public API Symbols & Methods
VertexAIBackend– Deprecated class (replaced byAgentPlatformBackend).BackendType.VERTEX_AI– Deprecated backend type constant onBackendType.AI.location– Deprecated property on theAIinterface (replaced byAI.backend.location).LiveSession.sendMediaChunks()– Deprecated method onLiveSession(replaced bysendTextRealtime(),sendAudioRealtime(), andsendVideoRealtime()).LiveSession.sendMediaStream()– Deprecated method onLiveSession(replaced bysendTextRealtime(),sendAudioRealtime(), andsendVideoRealtime()).LanguageModelCreateCoreOptions.topK– Deprecated property onLanguageModelCreateCoreOptions.LanguageModelCreateCoreOptions.temperature– Deprecated property onLanguageModelCreateCoreOptions.GoogleMaps.enableWidget– Deprecated property onGoogleMaps.GroundingMetadata.retrievalQueries– Deprecated property onGroundingMetadata(replaced bygroundingSupports).CountTokensResponse.totalBillableCharacters– Deprecated property onCountTokensResponse(replaced bytotalTokens).Internal Symbols & Properties
_LiveClientRealtimeInput.realtimeInput.mediaChunks– Deprecated internal field inlive-responses.ts.ApiSettings.location– Deprecated internal field ininternal.ts.AIService.location– Backwards-compatibility property inservice.ts.LEGACY_DEFAULT_LOCATION– Internal constant inconstants.ts.