openllmetry-js icon indicating copy to clipboard operation
openllmetry-js copied to clipboard

Support `@google/genai`

Open yu-iskw opened this issue 4 months ago • 2 comments

@google/vertexai is deprecated. So, we should support @google/genai instead.

[!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 to access Gemini features. See the migration guide for details.

https://github.com/googleapis/nodejs-vertexai

yu-iskw avatar Aug 01 '25 01:08 yu-iskw

Thanks @yu-iskw - looks like the API is the same, right?

nirga avatar Aug 03 '25 21:08 nirga

@nirga As far as I know, @google/genai switchs the API endpoint to Gemini API or Gemini on Vertex AI based on the user's configuration.

  • Gemini API: Uses the generativelanguage.googleapis.com endpoint. This is a publicly available endpoint that is accessed with an API key.
  • Vertex AI API: Uses the [location]-aiplatform.googleapis.com endpoint. This endpoint is specific to a Google Cloud project and location and uses Application Default Credentials (ADC) for authentication.

yu-iskw avatar Aug 04 '25 00:08 yu-iskw