From 7578c3f1682190e740d14a33ecb6f3203999290d Mon Sep 17 00:00:00 2001 From: Yvonne Yu Date: Mon, 23 Jun 2025 15:01:31 -0700 Subject: [PATCH] docs: add deprecation notice to readme for VertexAI class and all its dependencies. PiperOrigin-RevId: 774939775 --- README.md | 10 ++++++---- src/vertex_ai.ts | 7 +++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4e951f7b..8e69a86f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ [![NPM Downloads](https://img.shields.io/npm/dm/%40google-cloud%2Fvertexai)](https://www.npmjs.com/package/@google-cloud/vertexai) [![Node Current](https://img.shields.io/node/v/%40google-cloud%2Fvertexai)](https://www.npmjs.com/package/@google-cloud/vertexai) -> [!NOTE] A new Javascript/Typescript SDK, `@google/genai` -> ([github](https://github.com/googleapis/js-genai/tree/main)), is currently -> available in a *experimental preview launch* - designed to work with Gemini -> 2.0 features. and support both the Gemini API and the Vertex API. +> [!NOTE] The `VertexAI` class and all its dependencies in the Vertex AI SDK are +> deprecated as of June 24, 2025 and will be removed on June 24, 2026. Please +> use the [Google Gen AI SDK](https://www.npmjs.com/package/@google/genai) to +> access Gemini features. See +> [the migration guide](https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk) +> for details. # Vertex AI SDK for Node.js quickstart diff --git a/src/vertex_ai.ts b/src/vertex_ai.ts index 21a67447..d6ebdad7 100644 --- a/src/vertex_ai.ts +++ b/src/vertex_ai.ts @@ -60,6 +60,13 @@ export class VertexAI { init.project, init.googleAuthOptions ); + console.warn( + 'The VertexAI class and all its dependencies are deprecated' + + ' as of June 24, 2025 and will be removed on June 24, 2026. Please use' + + ' the Google Gen AI SDK (https://www.npmjs.com/package/@google/genai) to' + + ' access Gemini features. For details, see' + + ' https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk.' + ); this.location = resolveLocation(init.location); this.project = resolveProject(init.project); this.googleAuth = new GoogleAuth(opts);