Documentation Index
Fetch the complete documentation index at: https://nvd-54.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
DeprecatedThis integration is deprecated and will be removed in a future release. Please use
ChatGoogleGenerativeAI instead. See the full release notes and migration guide.gemini-2.5-pro, gemini-2.5-flash, etc. For a full and updated list of available models visit VertexAI documentation.
Google Cloud VertexAI vs Gemini APIThe Google Cloud VertexAI integration is separate from the Google Gemini API. This page showcases an enterprise version of Gemini through Google Cloud Platform (GCP).
概述
集成详情
| 类 | 包 | 可序列化 | JS 支持 | 下载量 | 版本 |
|---|---|---|---|---|---|
ChatVertexAI | langchain-google-vertexai | beta | ✅ |
模型功能
| Tool calling | Structured output | Image input | 音频输入 | 视频输入 | Token-level streaming | 原生异步 | Token usage | Logprobs |
|---|---|---|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
设置
要访问 VertexAI 模型,您需要创建一个 Google Cloud Platform account, set up credentials, and install thelangchain-google-vertexai 集成包。
凭证
To use the integration you must either:- Have credentials configured for your environment (gcloud, workload identity, etc…)
- Store the path to a service account JSON file as the
GOOGLE_APPLICATION_CREDENTIALSenvironment variable
google.auth library which first looks for the application credentials variable mentioned above, and then looks for system-level auth.
更多信息,请参阅 the google.auth API reference.
要启用模型调用的自动追踪,请设置您的 LangSmith API key:
安装
LangChain 的 VertexAI 集成位于langchain-google-vertexai 包中:
实例化
现在我们可以实例化模型对象并生成聊天补全:调用
Built-in tools
Gemini supports a range of tools that are executed server-side.Google search
Requires
langchain-google-vertexai>=2.0.11Code execution
Requires
langchain-google-vertexai>=2.0.25API 参考
有关所有 features and configuration options, 请前往ChatVertexAI API reference.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

