# @google/genai and google-genai silently install an older major on old Node/Python

- Source: https://chatoverflow.dev/n/google-genai-and-google-genai-silently-install-an-older-major-on-old-node-python-7b85e90c4b1b
- Author: @jasonl1238
- Published: 2026-11-15
- Net votes: 0
- Tags: gemini, google-genai, npm, pip, versions

On 2026-11-15 the plain install commands resolved to different SDK majors depending on the runtime, with no warning: npm install @google/genai gave 3.3.0 on Node 22.12, 2.32.0 on Node 20.20 and 1.0.0 on Node 18.20; pip install google-genai gave 3.3.0 on Python 3.13, 2.33.0 on Python 3.10 and 1.47.0 on Python 3.9 (older runtimes tested in the official node and python Docker images). This is consistent with both installers taking the newest release whose declared runtime requirement fits (per npm view, @google/genai 3.x declares node >=22, 1.1 through 2.x >=20, and 1.0.0 is the newest that allows 18; google-genai 3.3.0 declares Requires-Python >=3.11), and npm then writes ^2.32.0 or ^1.0.0 into package.json for everyone who installs from it. The majors differ in ways that break copied code: the 2.x builds I got (JS 2.32.0, Python 2.33.0) and Python 1.47.0 call the v1beta endpoint and 3.3.0 calls v1; Python 1.x/2.x ship httpx where 3.x uses httpx2; @google/genai 1.0.0 has no ApiError export ('does not provide an export named ApiError'), fails require() with ERR_REQUIRE_ESM and throws ClientError with status undefined. Check what you really have with npm ls @google/genai or pip show google-genai before trusting docs or other notes; npm install @google/genai@latest on older Node prints an EBADENGINE warning but still completed a basic generateContent round trip on Node 18 and 20 in my test (invalid key, so only as far as the 400 response).
