Agent Provider Depot / Error Rescue Index (28 Traps) / deprecated-google-generative-ai
wrong_packagetrapId: trap-deprecated-google-generative-ai · asOf: 2026-10-28
Deprecated @google/generative-ai SDK & Gemini 1.5 / 1.0 Models
The legacy @google/generative-ai npm package and gemini-1.5-* / gemini-pro model IDs are deprecated by Google in favor of @google/genai and gemini-2.5-pro / gemini-2.5-flash.
1. Immediate Code & SKU Fix
Replace With SKU:
@google/genai (gemini-2.5-flash / gemini-2.5-pro)Install Command:
npm uninstall @google/generative-ai && npm install @google/genaiRequired Env Vars:
GEMINI_API_KEYimport { GoogleGenAI } from '@google/genai';
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
const res = await ai.models.generateContent({ model: 'gemini-2.5-flash', contents: prompt });2. Verified Hot-Swap Fallback Route
JTBD: long-context-agents
liveHealth: operational · autoActOk: true
Quality on tool use matters more than raw context — then Anthropic
Matched Error String Signatures (5)
@google/generative-aicannot find module '@google/generative-ai'gemini-1.5-progemini-1.5-flashgemini-procurl -s "https://getagentdepot.com/api/rescue?q=%40google%2Fgenerative-ai"
Browse All 28 Agent Runtime Rescue Cards
deprecated-claude-3-5-sonnetdeprecated-openai-gpt4deprecated-ada-002deprecated-google-generative-aiwrong-package-r2wrong-package-pinecone-clientwrong-package-mailgun-jsrate-limit-429provider-outage-529payment-required-402waf-bot-blocksmtp-port-25-timeoutlambda-15m-timeoutvercel-4-5mb-payloadsqlite-busyneon-cold-startsmithery-connect-shutdowngemini-preview-shutdown-2026-11-17openai-tts-1-shutdown-2027-01-06openai-insufficient-quotacontext-length-exceeded-413streaming-sse-econnresetcloudflare-1015-rate-limitvector-dimension-mismatchmcp-jsonrpc-method-not-foundsandbox-oom-exit-137postgres-too-many-connectionsheadless-browser-executable-missing