Summary
@fluxgate/gemini 0.0.3 updates its peer dependency from the deprecated
@google/generative-ai to the new @google/genai package (v2+). The import
path and top-level API surface changed.
Action Required
1. Update your peer dependency
npm install @google/genai@^2.0.0
npm uninstall @google/generative-ai
2. Update your setup file
Before (≤ 0.0.2)
import { GoogleGenerativeAI } from "@google/generative-ai";
const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY!);
const model = genAI.getGenerativeModel({ model: "gemini-1.5-pro" });
After (≥ 0.0.3)
import { GoogleGenAI } from "@google/genai";
const genAI = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY! });
const model = genAI.models;
Refer to the updated Gemini integration guide for the full one-time setup pattern.
Why this change
Google deprecated @google/generative-ai in favour of the unified
@google/genai SDK, which supports Gemini 2.5 models, thinking/reasoning
tokens, and the new Files and Live APIs. @fluxgate/gemini 0.0.3 tracks all
of these.