Skip to content

chore(generative_ai): update langchain dependencies for generative_ai samples#14258

Merged
iennae merged 1 commit into
GoogleCloudPlatform:mainfrom
XrossFox:python-langchain-dependency-update-1
Jun 3, 2026
Merged

chore(generative_ai): update langchain dependencies for generative_ai samples#14258
iennae merged 1 commit into
GoogleCloudPlatform:mainfrom
XrossFox:python-langchain-dependency-update-1

Conversation

@XrossFox
Copy link
Copy Markdown
Contributor

@XrossFox XrossFox commented Jun 1, 2026

Description

This PR fixes

  • Update langchain-core to 1.4.0
  • Update langchain-google-vertexai to 3.2.3
  • Pin both dependencies to python 3.10 and newer

Fixes b/518888434

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Jun 1, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the google-cloud-aiplatform and langchain-google-vertexai dependencies with google-genai and langchain-google-genai across multiple requirements files. However, the review feedback correctly identifies that these changes will break several samples—including gemma2, generative_ai/evaluation, generative_ai/rag, model_garden/gemma, and people-and-planet-ai/image-classification—because the underlying code still imports and relies on the legacy packages. You should retain the original dependencies in the affected directories to prevent import and runtime errors.

Comment thread gemma2/requirements.txt Outdated
Comment thread generative_ai/evaluation/requirements.txt Outdated
Comment thread generative_ai/evaluation/requirements.txt Outdated
Comment thread generative_ai/rag/requirements.txt Outdated
Comment thread model_garden/gemma/requirements.txt Outdated
Comment thread people-and-planet-ai/image-classification/requirements.txt Outdated
…i samples

 - Update langchain-core to 1.4.0
 - Update langchain-google-vertexai to 3.2.3
 - Pin both dependencies to python 3.10 and newer
@XrossFox XrossFox force-pushed the python-langchain-dependency-update-1 branch from f7dbf3d to e4180aa Compare June 3, 2026 20:07
@XrossFox
Copy link
Copy Markdown
Contributor Author

XrossFox commented Jun 3, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the requirements.txt files across multiple generative_ai subdirectories to bump the versions of langchain-core and langchain-google-vertexai with a Python version constraint. However, the reviewer correctly identified that the specified versions (langchain-core==1.4.0 and langchain-google-vertexai==3.2.3) do not exist on PyPI, which will cause installation and dependency resolution to fail. It is recommended to update these to valid, existing versions as suggested.

Comment thread generative_ai/evaluation/requirements.txt
Comment thread generative_ai/extensions/requirements.txt
Comment thread generative_ai/image_generation/requirements.txt
Comment thread generative_ai/model_garden/requirements.txt
Comment thread generative_ai/model_tuning/requirements.txt
Comment thread generative_ai/prompts/requirements.txt
Comment thread generative_ai/reasoning_engine/requirements.txt
@XrossFox
Copy link
Copy Markdown
Contributor Author

XrossFox commented Jun 3, 2026

Code Review

This pull request updates the requirements.txt files across multiple generative_ai subdirectories to bump the versions of langchain-core and langchain-google-vertexai with a Python version constraint. However, the reviewer correctly identified that the specified versions (langchain-core==1.4.0 and langchain-google-vertexai==3.2.3) do not exist on PyPI, which will cause installation and dependency resolution to fail. It is recommended to update these to valid, existing versions as suggested.

i just checked, they do exist e.e

https://pypi.org/project/langchain-google-vertexai/
https://pypi.org/project/langchain-core/

@XrossFox XrossFox changed the title chore(multiple samples): update langchain and google-genai dependencies chore(generative_ai): update langchain dependencies for generative_ai samples Jun 3, 2026
Copy link
Copy Markdown

@Kef131 Kef131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@amcolin amcolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@iennae iennae marked this pull request as ready for review June 3, 2026 21:51
@iennae iennae requested review from a team as code owners June 3, 2026 21:51
@iennae iennae merged commit 26102a5 into GoogleCloudPlatform:main Jun 3, 2026
9 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants