Replace deprecated VertexAI classes and add langchain-google-genai dependency
Replaced deprecated ChatVertexAI and VertexAI with ChatGoogleGenerativeAI and GoogleGenerativeAI.
Added langchain-google-genai dependency to pyproject.toml to support the updated imports.
Issue Link / Problem Description
- Fixes #2741
- This PR resolves deprecation warnings caused by the usage of ChatVertexAI and VertexAI, which are no longer recommended and may be removed in future versions.
Changes Made
- Replaced ChatVertexAI with ChatGoogleGenerativeAI
- Replaced VertexAI with GoogleGenerativeAI
- Updated import statements to use langchain_google_genai
- Added langchain-google-genai dependency in pyproject.toml
Testing
How to Test
- [ ] Automated tests added/updated
- [x] Manual testing steps:
- Install dependencies (including langchain-google-genai)
- Run the affected modules/scripts
- Verify that imports work correctly and no deprecation warnings appear
References
- Documentation: LangChain Google Generative AI integration docs
Screenshots/Examples (if applicable)
✅ No documentation update needed — Internal dependency replacement (deprecated VertexAI classes swapped for langchain-google-genai equivalents) with no user-facing API changes or new features requiring documentation.
Hi! 👋
This PR replaces deprecated VertexAI usage with the newer Google Generative AI classes and adds the required dependency.
Let me know if any changes are needed — happy to update!
Please merge soon since my projects have started to fail due to this issue