Skip to content

feat(ai)!: remove deprecated APIs - #10392

Open
hsubox76 wants to merge 5 commits into
mainfrom
ch-rm-deprecated
Open

hsubox76 wants to merge 5 commits into
mainfrom
ch-rm-deprecated

Conversation

@hsubox76

Copy link
Copy Markdown
Contributor

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 by AgentPlatformBackend).
  • BackendType.VERTEX_AI – Deprecated backend type constant on BackendType.
  • AI.location – Deprecated property on the AI interface (replaced by AI.backend.location).
  • LiveSession.sendMediaChunks() – Deprecated method on LiveSession (replaced by sendTextRealtime(), sendAudioRealtime(), and sendVideoRealtime()).
  • LiveSession.sendMediaStream() – Deprecated method on LiveSession (replaced by sendTextRealtime(), sendAudioRealtime(), and sendVideoRealtime()).
  • LanguageModelCreateCoreOptions.topK – Deprecated property on LanguageModelCreateCoreOptions.
  • LanguageModelCreateCoreOptions.temperature – Deprecated property on LanguageModelCreateCoreOptions.
  • GoogleMaps.enableWidget – Deprecated property on GoogleMaps.
  • GroundingMetadata.retrievalQueries – Deprecated property on GroundingMetadata (replaced by groundingSupports).
  • CountTokensResponse.totalBillableCharacters – Deprecated property on CountTokensResponse (replaced by totalTokens).

Internal Symbols & Properties

  • _LiveClientRealtimeInput.realtimeInput.mediaChunks – Deprecated internal field in live-responses.ts.
  • ApiSettings.location – Deprecated internal field in internal.ts.
  • AIService.location – Backwards-compatibility property in service.ts.
  • LEGACY_DEFAULT_LOCATION – Internal constant in constants.ts.

@changeset-bot

changeset-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f4a3215

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/ai Major
firebase Major
@firebase/rules-unit-testing Patch

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

@github-actions

Copy link
Copy Markdown
Contributor

Vertex AI Mock Responses Check ⚠️

A newer major version of the mock responses for Vertex AI unit tests is available. update_vertexai_responses.sh should be updated to clone the latest version of the responses: v17.0

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/ai/src/models/live-generative-model.ts Outdated
Comment thread packages/ai/src/requests/request.ts Outdated
@hsubox76 hsubox76 added this to the v13 milestone Sep 15, 2026
@hsubox76

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/ai/src/requests/request.ts
@hsubox76
hsubox76 marked this pull request as ready for review September 15, 2026 21:43
@hsubox76
hsubox76 requested review from a team as code owners September 15, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants