langchain-google-genai 4.0.0, this package uses the consolidated google-genai SDK and now supports both the Gemini Developer API and Gemini Enterprise Agent Platform backends.The langchain-google-vertexai package remains supported for Gemini Enterprise Agent Platform-specific features (Model Garden, Vector Search, evaluation services, etc.).Read the full announcement and migration guide.Google Generative AI (Gemini API & Gemini Enterprise Agent Platform)
Google Generative AI (Gemini API & Gemini Enterprise Agent Platform)
- Gemini Developer API: Quick setup with API key, ideal for individual developers and rapid prototyping
- Gemini Enterprise Agent Platform: Enterprise features with Google Cloud integration (requires GCP project)
langchain-google-genai package for chat models, LLMs, and embeddings.See integrations.Google Cloud (Gemini Enterprise Agent Platform Services)
Google Cloud (Gemini Enterprise Agent Platform Services)
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 Gemini Enterprise Agent Platform using the unifiedlangchain-google-genai package.
Chat models
ChatGoogleGenerativeAI
LLMs
GoogleGenerativeAI
Embedding models
GoogleGenerativeAIEmbeddings
Google Cloud
Access Gemini Enterprise Agent Platform-specific services including Model Garden (Llama, Mistral, Anthropic), Vector Search, evaluation services, and specialized vision models.ChatGoogleGenerativeAI from langchain-google-genai. The classes below focus on Gemini Enterprise Agent Platform services not available in the consolidated SDK.Chat models
ChatAnthropicVertex
ChatVertexAI (deprecated)
ChatVertexAI (deprecated)
ChatGoogleGenerativeAI for Gemini models instead.VertexModelGardenLlama
VertexModelGardenLlama
VertexModelGardenMistral
VertexModelGardenMistral
GemmaChatLocalHF
GemmaChatLocalHF
GemmaChatLocalKaggle
GemmaChatLocalKaggle
GemmaChatVertexAIModelGarden
GemmaChatVertexAIModelGarden
VertexAIImageCaptioningChat
VertexAIImageCaptioningChat
VertexAIImageEditorChat
VertexAIImageEditorChat
VertexAIImageGeneratorChat
VertexAIImageGeneratorChat
VertexAIVisualQnAChat
VertexAIVisualQnAChat
LLMs
(Legacy) string-in, string-out LLM interface.VertexAIModelGarden
VertexAI (deprecated)
VertexAI (deprecated)
GoogleGenerativeAI for Gemini models instead.Gemma local from Hugging Face
Gemma local from Hugging Face
Gemma local from Kaggle
Gemma local from Kaggle
Gemma on Gemini Enterprise Agent Platform Model Garden
Gemma on Gemini Enterprise Agent Platform Model Garden
Gemini Enterprise Agent Platform image captioning
Gemini Enterprise Agent Platform image captioning
Embedding models
VertexAIEmbeddings (deprecated)
VertexAIEmbeddings (deprecated)
GoogleGenerativeAIEmbeddings instead.Document loaders
AlloyDB for PostgreSQL
BigQuery
Bigtable
Cloud SQL for MySQL
Cloud SQL for SQL Server
Cloud SQL for PostgreSQL
Cloud Storage (directory)
Cloud Storage (file)
El Carro for Oracle Workloads
Firestore (Native Mode)
Firestore (Datastore Mode)
Memorystore for Redis
Spanner
Speech-to-Text
Cloud Vision loader
Cloud Vision loader
Document transformers
Document AI
Google Translate
Vector stores
Store and search vectors using Google Cloud databases and Vector Search on Gemini Enterprise Agent Platform.AlloyDB for PostgreSQL
BigQuery Vector Search
Memorystore for Redis
Spanner
Bigtable
Firestore (Native Mode)
Cloud SQL for MySQL
Cloud SQL for PostgreSQL
Vector Search on Gemini Enterprise Agent Platform
Vector Search on Gemini Enterprise Agent Platform + Datastore
Retrievers
Agent Search on Gemini Enterprise Agent Platform
Document AI Warehouse
Tools
Integrate agents with various Google Cloud services.Text-to-Speech
Callbacks
Track LLM/Chat model usage.Gemini Enterprise Agent Platform callback handler
Gemini Enterprise Agent Platform callback handler
VertexAI usage info.Google BigQuery
Google BigQuery
Evaluators
Evaluate model outputs using Gemini Enterprise Agent Platform.VertexPairWiseStringEvaluator
VertexPairWiseStringEvaluator
VertexStringEvaluator
VertexStringEvaluator

