Replies: 1 comment
-
Hi @mbruhler! I'm Dosu and I’m helping the langchainjs team. The @langchain/google-genai package does not support a vertexai option and cannot be used to connect to Vertex AI endpoints. It is designed to work directly with Gemini models via the Google Generative AI SDK and requires an API key, not Vertex AI credentials. If you want to use Vertex AI (for example, to specify project and location), you should use the @langchain/google-vertexai package instead. This package is built specifically for Vertex AI endpoints and supports the configuration you’re looking for. You can find setup and usage details in the LangChain docs and see examples of initializing ChatVertexAI with your project and location settings. There is no way to pass vertexai: true or similar to @langchain/google-genai or ChatGoogleGenerativeAI—this is a deliberate separation in the LangChain ecosystem to avoid confusion between the two platforms and their authentication methods. For Vertex AI, stick with @langchain/google-vertexai for best results. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Beta Was this translation helpful? Give feedback.
All reactions