3.0.0 (2026-11-06)
⚠ BREAKING CHANGES
-
Default Gemini Developer API version is now
v1(wasv1beta) (3f477bf)- Clients targeting the Gemini Developer API now default to API version
v1instead ofv1beta. - No effect on Gemini Enterprise (Vertex AI) defaults: Clients with
vertexai: trueare unaffected by this default change and continue to default tov1beta1. - How to configure or restore the previous default via environment variable (Node.js): Set
GOOGLE_GENAI_API_VERSION(works for both Gemini Developer API and Enterprise / Vertex AI clients when no version is set in code):# Restores the beta default ('v1beta' on Gemini Developer API, 'v1beta1' on Enterprise / Vertex AI) export GOOGLE_GENAI_API_VERSION=beta # Or set an explicit API version string on either platform (e.g. 'v1', 'v1beta', 'v1beta1') export GOOGLE_GENAI_API_VERSION=v1beta
- How to set the API version in code: Pass
apiVersion(orhttpOptions.apiVersion) toGoogleGenAI(takes precedence overGOOGLE_GENAI_API_VERSION):import { GoogleGenAI } from '@google/genai'; const ai = new GoogleGenAI({ apiVersion: 'v1beta', });
- Clients targeting the Gemini Developer API now default to API version
-
Minimum supported Node.js version is now 22 (was 20) (7b9fbf0)
- Following Node.js 20 reaching end-of-life (2026-04-30),
package.jsonengines.nodenow requires>=22.0.0. - There are no runtime API or bundle changes resulting from this bump, and both CommonJS and ESM bundles continue to be published.
- Users who must remain on Node.js 20 should pin to
@google/genai@^2(or ignore engine checks if supported by their environment).
- Following Node.js 20 reaching end-of-life (2026-04-30),
-
interactions:
CodeExecutionResultStep.resultis now typed asArray<Content> | string(CodeExecutionResultStepResult) instead ofstring(b36ce99). The JSON and runtime value for text-only results are still a plainstring, but TypeScript code readingstep.resultas astringmay need to narrow the union (typeof step.result === 'string').
Features
- Add
source_texttoAudioTranscriptionConfigandSmartTranscriptionMode. (ddb5158) - Add MALFORMED_RESPONSE to FinishReason (032d50c), refs #2937
- cli: use gemini-3.5-transcribe as default model for transcribe command (df29944)
- default Gemini API version to v1 instead of v1beta across SDKs (3f477bf)
- Disable GenerateVideos for Gemini API, update tests/READMEs (3f65d02)
- drop support for Node 20; Node.js >=22 is now required (7b9fbf0)
- interactions: add Office and OpenDocument MIME types (b24cfc2)
- interactions: support multimodal content in CodeExecutionResultStep.result (b36ce99)
- support GOOGLE_GENAI_API_VERSION environment variable across SDKs (3f477bf)
- update discovery doc (8be9344)
Bug Fixes
- Raise protobufjs and ws minimums to patched versions (71827d0), refs #1611
- Reject Live.connect() when the WebSocket errors or closes before setup completes (04eaa81), refs #1257
- respect configured and default API version for Gemini API file uploads across SDKs (bdb4e42)
- stop emitting array indices in auth token fieldMask (80e7b3d), refs #1492