LangChain provides integrations with Google AI Studio and Google Cloud Vertex AI through theDocumentation Index
Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-naomid-1779801766-572e290.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
@langchain/google package.
Looking for the older
@langchain/google-genai or @langchain/google-vertexai packages? They are maintained under long-term support but are no longer recommended for new projects.Chat models
TheChatGoogle class is the recommended way to access Gemini models (such as gemini-2.5-pro, gemini-2.5-flash, and gemini-3.1-pro-preview) and open models like Gemma. It supports both Google AI Studio and Vertex AI in a single interface
ChatGoogle supports tool calling, structured output, multimodal inputs (images, audio, video), reasoning/thinking, image generation, text-to-speech, and Gemini-specific native tools like Google Search grounding and code execution.
ChatGoogle
Full chat model documentation, including setup, invocation, streaming, structured output, and more.
Gemini native tools
Google Search, Code Execution, URL Context, Google Maps, File Search, Computer Use, and MCP servers.
Third-party models on Vertex AI
Anthropic Claude models are also available through the Vertex AI platform. See using Claude on Vertex AI for more information about enabling access to the models and the model names to use.Postgres vector store (Cloud SQL)
The PostgresVectorStore module from the@langchain/google-cloud-sql-pg package provides a way to use CloudSQL for PostgreSQL to store
vector embeddings.
Legacy packages
The following packages are maintained under long-term support for existing users. New projects should use@langchain/google instead.
@langchain/google-genai
The @langchain/google-genai package provides ChatGoogleGenerativeAI and GoogleGenerativeAIEmbeddings for accessing Gemini models through Google AI Studio. This package is built on a deprecated Google SDK and will not receive new features.
@langchain/google-vertexai
The @langchain/google-vertexai package provides ChatVertexAI, VertexAIEmbeddings, and VertexAI for Vertex AI on Node.js. It depends on @langchain/google-gauth for authentication. This package is superseded by the Vertex AI support built into @langchain/google for chat.
@langchain/google-vertexai-web
The @langchain/google-vertexai-web package provides the same Vertex AI chat, embedding, and LLM classes for browser and Edge runtimes. Install this package (not @langchain/google-vertexai) when running in web environments. It depends on @langchain/google-webauth.
GOOGLE_WEB_CREDENTIALS and web import paths.
@langchain/google-webauth
The @langchain/google-webauth package provides browser and Edge authentication for legacy Vertex AI integrations. It is installed automatically with @langchain/google-vertexai-web—do not install it alongside @langchain/google-gauth.
Set service account JSON in GOOGLE_WEB_CREDENTIALS (or the deprecated GOOGLE_VERTEX_AI_WEB_CREDENTIALS). You can also pass apiKey or authOptions to the model constructor, or set the API_KEY environment variable.
@langchain/google-gauth
The @langchain/google-gauth package provides Node.js authentication for legacy Google integrations built on @langchain/google-common. It is installed automatically when you add @langchain/google-vertexai—you typically do not install or import @langchain/google-gauth directly.
On Node.js, credentials are resolved in this order:
apiKeypassed to the model constructorauthOptionspassed to the model constructor- The
API_KEYenvironment variable - Service account JSON at the path in
GOOGLE_APPLICATION_CREDENTIALS - Application Default Credentials (for example after
gcloud auth application-default login, or on Google Cloud)
@langchain/google-gauth and @langchain/google-webauth in the same project.
The unified @langchain/google package uses google-auth-library directly and does not require @langchain/google-gauth or @langchain/google-webauth.
@langchain/google-cloud-sql-pg
The @langchain/google-cloud-sql-pg package provides PostgresVectorStore and PostgresLoader for Cloud SQL for PostgreSQL. It is separate from the Gemini chat packages above.
@langchain/google-common
The @langchain/google-common package provides shared Gemini client abstractions for legacy integrations such as @langchain/google-vertexai. It does not include authorization code and is not a stand-alone package—do not install or import it directly.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

