Vibeleaderboard
← All Intel
Intel / repo

js-genai v3.0.0

Source
github.com
Author
release-please[bot]
Date

Context

js-genai is Google's official JavaScript and TypeScript library for Gemini. Version 3.0.0 (release notes) shares the main breaking change in the Python library's 3.0.0 release: clients for the Gemini Developer API now call the API's stable v1 version instead of v1beta by default. Clients created with vertexai: true, for Gemini Enterprise on Vertex AI, keep their v1beta1 default. In Node.js, setting GOOGLE_GENAI_API_VERSION=beta restores the old default, and passing apiVersion or httpOptions.apiVersion to GoogleGenAI takes precedence over that variable.

The change matters because the two API versions do not offer the same features. Google's API versions page describes v1 as the stable version and v1beta as the place for features still being developed, and its feature table lists the Live API, , audio output and the Agents and Webhooks APIs under v1beta only. The release notes do not say whether the library still routes those calls to v1beta by itself. The same page also still says the SDKs default to v1beta, which is no longer true of this library from 3.0.0. Code that uses those features should check its calls after upgrading or set the version explicitly.

A second breaking change is the Node.js floor. The package now declares Node.js 22 or later in its engines field, following Node.js 20's end of life in April 2026. The notes say the bump brings no runtime API or bundle changes, and point projects that must stay on Node.js 20 to @google/genai@^2. The third breaking change may need a small edit in TypeScript code: in the Interactions API, a code execution step's result is now typed as either an array of content or a string, so code that treats it as a string has to narrow the type first, although text-only results are still plain strings at runtime. The release also raises the minimum versions of its protobufjs and ws dependencies to patched releases, and disables GenerateVideos on the Gemini Developer API without giving a reason. Live.connect() now rejects its promise if the WebSocket errors or closes before setup completes.

Terms in this piece · Glossary
  • prompt caching — Reusing the model's processed form of a repeated prompt prefix so subsequent calls skip re-reading it, cutting cost and latency substantially.
More from release-please[bot]
Recommended reads
Comments

Checking sign-in…

Loading comments…