Sponsor Slot OpenReach builders tracking 30 Agent SDKs and 226 MCP servers. Book featured placement ($150/wk)
Model Provider SDKnpmmedium schema drift risk

@google/genai

Google Gen AI SDK (JS/TS) by Google

Live Registry Versionv2.31.0Previous: v2.30.0Published 2026-10-23
Stability Grade
B+ (82/100)
90-Day Velocity
20 releases
High release cadence
Dependencies
4 direct
NPM manifest
License
Apache-2.0
Verified on NPM
Recommended Exact Pin: npm install @google/genai@2.31.0
TL;DR Verdict & Quick Citation Summary (2026-10-24)Source: AgentBreakWatch Live NPM Index

Google Gen AI SDK (JS/TS) (@google/genai) is currently at v2.31.0 on NPM (published 2026-10-23), with a 90-day stability score of 82/100 (B+) and MEDIUM schema drift risk across 20 releases in the past 90 days. Replaces deprecated @google/generative-ai package; v2.x standardizes ai.models.generateContent and functionDeclarations schema typing. Production teams should pin npm install @google/genai@2.31.0 rather than using unpinned @latest tags.

Breaking Changes & Tool Schema Drift Analysis

Replaces deprecated @google/generative-ai package; v2.x standardizes ai.models.generateContent and functionDeclarations schema typing.

Watched Exports / MCP Tool Signatures:
GoogleGenAIai.models.generateContentFunctionDeclaration
Before (Deprecated / Unpinned Pattern)
import { GoogleGenerativeAI } from "@google/generative-ai";
const genAI = new GoogleGenerativeAI(API_KEY);
const model = genAI.getGenerativeModel({ model: "gemini-1.5-pro" });
After (Verified v2.31.0 Pattern)
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({ apiKey: API_KEY });
const response = await ai.models.generateContent({ model: "gemini-2.5-pro", contents: "Hello" });

Frequently Asked Questions: @google/genai

What is the latest version of @google/genai on NPM?

As of 2026-10-24, the latest stable version of @google/genai (Google Gen AI SDK (JS/TS) by Google) on NPM is v2.31.0, published on 2026-10-23. It has shipped 20 releases in the last 90 days.

Does @google/genai v2.31.0 have breaking changes or MCP schema drift risk?

@google/genai currently carries a MEDIUM schema drift risk rating with a Stability Score of 82/100 (Grade B+). Replaces deprecated @google/generative-ai package; v2.x standardizes ai.models.generateContent and functionDeclarations schema typing.

How do I safely pin @google/genai in production?

Avoid unpinned @latest tags in production agent configs. Pin the exact verified version using `npm install @google/genai@2.31.0` and monitor GoogleGenAI, ai.models.generateContent, FunctionDeclaration for parameter or schema changes.

30-Min Registry & Schema Poller

Get Instant Breaking-Change Alerts for @google/genai

We poll NPM and googleapis/js-genai every 30 minutes. Get an email with the exact diff when @google/genai ships a breaking release beyond v2.31.0.