Starting with Gemini 1.5 and Gemini 2.0, you should use Google Gen AI SDK, which provides a unified interface to Gemini 2.0 and 1.5 (and should be for Gemini 2.5 when GA) through both the Gemini Developer API and the Gemini API on Vertex AI. So, you just need: google-genai (version 1.7.0 as of now). You no longer need google-ai-generativelanguage.

I tested the latest google-genai with lanchain modules, seems installing fine.

Copylangchain==0.2.6
langchain-community==0.2.6
langchain-core==0.2.10
langchain-google-genai==1.0.7
langchain-text-splitters==0.2.2
langsmith==0.1.82
google-genai==1.7.0

Please review the Google Gen AI SDK documentation for detail.

Answer from Gang Chen on Stack Overflow
🌐
PyPI
pypi.org › project › langchain-google-genai
langchain-google-genai · PyPI
Download URL: langchain_google_genai-4.2.6-py3-none-any.whl
Help
The Python Package Index (PyPI) is a repository of software for the Python programming language.
Sponsors
The Python Package Index (PyPI) is a repository of software for the Python programming language.
Register
The Python Package Index (PyPI) is a repository of software for the Python programming language.
Log in
The Python Package Index (PyPI) is a repository of software for the Python programming language.
🌐
Langchain
reference.langchain.com › python › langchain-google-genai
langchain_google_genai | LangChain Reference
As of langchain-google-genai 4.0.0, this package uses the consolidated google-genai SDK instead of the legacy google-ai-generativelanguage SDK.
🌐
Docs by LangChain
docs.langchain.com › oss › python › integrations › chat › google_generative_ai
ChatGoogleGenerativeAI integration - Docs by LangChain
To access Google AI models you’ll need to create a Google Account, get a Google AI API key, and install the langchain-google-genai integration package.
🌐
Latenode
latenode.com › home › blog › ai frameworks & technical infrastructure › langchain (setup, tools, agents, memory) › langchain google gemini integration: complete setup guide + code examples 2025
LangChain Google Gemini Integration: Complete Setup Guide + Code Examples 2025 - Latenode Blog
February 12, 2026 - These include the langchain-google-genai package, which acts as the bridge between LangChain and Google's Gemini models, along with other essential tools: pip install langchain>=0.1.0 pip install langchain-google-genai pip install python-dotenv ...
🌐
piwheels
piwheels.org › project › langchain-google-genai
piwheels - langchain-google-genai
February 28, 2026 - An integration package connecting Google's genai package and LangChain · In a virtualenv (see these instructions if you need to create one): pip3 install langchain-google-genai · langchain-core · google-genai · filetype · pydantic · PyPI ...
🌐
GitHub
github.com › langchain-ai › langchain-google
GitHub - langchain-ai/langchain-google: 🦜🔗 LangChain interfaces to Google's suite of AI products (e.g. Gemini & Vertex AI)
This repository centralizes Google integrations for LangChain projects.
Starred by 389 users
Forked by 447 users
Languages   Python 85.9% | Jupyter Notebook 12.0% | HTML 1.4% | HCL 0.3% | Makefile 0.3% | CSS 0.1%
Find elsewhere
🌐
LangChain
api.python.langchain.com › en › latest › google_genai › index.html
LangChain Reference Docs
Unified API reference documentation for LangChain, LangGraph, Deep Agents, LangSmith, and integrations.
🌐
GitHub
github.com › langchain-ai › langchain-google › issues › 980
`langchain-google-genai` uses older `google-ai-generativelanguage`, not the newer `google-genai` · Issue #980 · langchain-ai/langchain-google
June 13, 2025 - Hi, My setup is based on Python 3.13, with the following libraries google-genai==1.19.0 langchain==0.3.25 langchain-core==0.3.64 langchain-community==0.3.24 langchain-google-genai==2.1.5 langchain-...
Author   langchain-ai
🌐
PyPI Stats
pypistats.org › packages › langchain-google-genai
langchain-google-genai
PyPI page Home page Author: None License: MIT Summary: An integration package connecting Google's genai package and LangChain Latest version: 4.2.5 Required dependencies: filetype | google-genai | langchain-core | pydantic Downloads last day: 326,728 Downloads last week: 3,313,739 Downloads ...