Unified SDK & package consolidationAs of
langchain-google-genai 4.0.0, this package uses the consolidated google-genai SDK and now supports both the Gemini Developer API and Vertex AI backends.The langchain-google-vertexai package remains supported for Vertex AI platform-specific features (Model Garden, Vector Search, evaluation services, etc.).Read the full announcement and migration guide.Google Generative AI (Gemini API & Vertex AI)
Google Generative AI (Gemini API & Vertex AI)
Access Google Gemini models via the Gemini Developer API or Vertex AI. The backend is selected automatically based on your configuration.
- Gemini Developer API: Quick setup with API key, ideal for individual developers and rapid prototyping
- Vertex AI: Enterprise features with Google Cloud integration (requires GCP project)
langchain-google-genai package for chat models, LLMs, and embeddings.See integrations.Google Cloud (Vertex AI Platform Services)
Google Cloud (Vertex AI Platform Services)
Access Vertex AI platform-specific services beyond Gemini models: Model Garden (Llama, Mistral, Anthropic), evaluation services, and specialized vision models.Use the
langchain-google-vertexai package for platform services and specific packages (e.g., langchain-google-community, langchain-google-cloud-sql-pg) for other cloud services like databases and storage.See integrations.Google Generative AI
Access Google Gemini models via the Gemini Developer API or Vertex AI using the unifiedlangchain-google-genai package.
Chat models
LLMs
Embedding models
Google Cloud
Access Vertex AI platform-specific services including Model Garden (Llama, Mistral, Anthropic), Vector Search, evaluation services, and specialized vision models.For Gemini models, use
ChatGoogleGenerativeAI from langchain-google-genai. The classes below focus on Vertex AI platform services not available in the consolidated SDK.Chat models
ChatVertexAI (deprecated)
ChatVertexAI (deprecated)
Deprecated — Use
ChatGoogleGenerativeAI for Gemini models instead.VertexModelGardenLlama
VertexModelGardenLlama
Llama on Vertex AI Model Garden
VertexModelGardenMistral
VertexModelGardenMistral
Mistral on Vertex AI Model Garden
GemmaChatLocalHF
GemmaChatLocalHF
Local Gemma model loaded from HuggingFace.
GemmaChatLocalKaggle
GemmaChatLocalKaggle
Local Gemma model loaded from Kaggle.
GemmaChatVertexAIModelGarden
GemmaChatVertexAIModelGarden
Gemma on Vertex AI Model Garden
VertexAIImageCaptioningChat
VertexAIImageCaptioningChat
Image captioning model as a chat interface.
VertexAIImageEditorChat
VertexAIImageEditorChat
Edit images given a prompt. Currently supports mask-free editing only.
VertexAIImageGeneratorChat
VertexAIImageGeneratorChat
Generate images from a prompt.
VertexAIVisualQnAChat
VertexAIVisualQnAChat
Visual question answering model as a chat interface.
LLMs
(Legacy) string-in, string-out LLM interface.VertexAI (deprecated)
VertexAI (deprecated)
Deprecated — Use
GoogleGenerativeAI for Gemini models instead.Gemma local from Hugging Face
Gemma local from Hugging Face
Local Gemma model loaded from HuggingFace.
Gemma local from Kaggle
Gemma local from Kaggle
Local Gemma model loaded from Kaggle.
Gemma on Vertex AI Model Garden
Gemma on Vertex AI Model Garden
Vertex AI image captioning
Vertex AI image captioning
Image captioning model as an LLM interface.
Embedding models
VertexAIEmbeddings (deprecated)
VertexAIEmbeddings (deprecated)
Deprecated — Use
GoogleGenerativeAIEmbeddings instead.Document loaders
AlloyDB for PostgreSQL
PostgreSQL-compatible database on Google Cloud.
BigQuery
Serverless data warehouse.
Bigtable
Key-value and wide-column store for structured and semi-structured data.
Cloud SQL for MySQL
Managed MySQL database.
Cloud SQL for SQL Server
Managed SQL Server database.
Cloud SQL for PostgreSQL
Managed PostgreSQL database.
Cloud Storage (directory)
Load documents from a GCS bucket directory.
Cloud Storage (file)
Load a single document from GCS.
El Carro for Oracle Workloads
Oracle databases on Kubernetes via El Carro.
Firestore (Native Mode)
NoSQL document database.
Firestore (Datastore Mode)
Firestore in Datastore mode.
Memorystore for Redis
Managed Redis service.
Spanner
Globally distributed relational database.
Speech-to-Text
Transcribe audio files.
Cloud Vision loader
Cloud Vision loader
Load data using Google Cloud Vision API.
Document transformers
Document AI
Extract structured data from unstructured documents.
Google Translate
Translate text and HTML via Cloud Translation API.
Vector stores
Store and search vectors using Google Cloud databases and Vertex AI Vector Search.AlloyDB for PostgreSQL
PostgreSQL-compatible vector store on AlloyDB.
BigQuery Vector Search
Semantic search using GoogleSQL with vector indexes.
Memorystore for Redis
Vector store on Memorystore for Redis.
Spanner
Vector store on Cloud Spanner.
Bigtable
Vector store on Cloud Bigtable.
Firestore (Native Mode)
Vector store on Firestore.
Cloud SQL for MySQL
Vector store on Cloud SQL for MySQL.
Cloud SQL for PostgreSQL
Vector store on Cloud SQL for PostgreSQL.
Vertex AI Vector Search
Formerly known as Vertex AI Matching Engine, provides a low latency vector database. These vector databases are commonly referred to as vector similarity-matching or an approximate nearest neighbor (ANN) service.
Vertex AI Vector Search + Datastore
Vector search with Datastore for document storage.
Retrievers
Vertex AI Search
Generative AI powered search via Vertex AI Search.
Document AI Warehouse
Search, store, and manage documents using Document AI Warehouse.
Other retrievers
Tools
Integrate agents with various Google Cloud services.Callbacks
Track LLM/Chat model usage.Vertex AI callback handler
Vertex AI callback handler
Track
VertexAI usage info.Google BigQuery
Google BigQuery
See the documentation for more details.
Evaluators
Evaluate model outputs using Vertex AI.VertexPairWiseStringEvaluator
VertexPairWiseStringEvaluator
Pair-wise evaluation using Vertex AI models.
VertexStringEvaluator
VertexStringEvaluator
Single prediction evaluation using Vertex AI models.
Other Google products
Integrations with various Google services beyond the core Cloud Platform.Document loaders
Vector stores
Retrievers
Tools
Google Search
Web search via Google Custom Search Engine (CSE).
Google Drive
Interact with Google Drive.
Google Finance
Query financial data.
Google Jobs
Query job listings.
Google Lens
Visual searches.
Google Places
Search for places.
Google Scholar
Search academic papers.
Google Trends
Query Google Trends data.
MCP
Toolkits
Chat loaders
3rd party integrations
Access Google services via unofficial third-party APIs.Search
SearchApi
API access to Google search results, YouTube, and more.
SerpApi
API access to Google search results.
Serper.dev
API access to Google search results.
cloro
Google Search results with AI Overview support.
YouTube
Search tool
Search YouTube videos without the official API.
Audio loader
Download audio from YouTube videos.
Transcripts loader
Load video transcripts.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.