Skip to content

fix(dependencies): clarify missing Vertex AI extra#5904

Closed
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/vertexai-extra-error
Closed

fix(dependencies): clarify missing Vertex AI extra#5904
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/vertexai-extra-error

Conversation

@he-yufeng
Copy link
Copy Markdown
Contributor

Summary

  • catch missing vertexai imports in the Vertex AI dependency shim
  • raise a clearer message that points users to google-adk[gcp] or google-adk[all]
  • add a regression test for the missing-extra path

Fixes #5864.

To verify

  • python -m pytest tests\unittests\test_optional_dependencies.py -q
  • python -m py_compile src\google\adk\dependencies\vertexai.py tests\unittests\test_optional_dependencies.py
  • python -m pyink --check src\google\adk\dependencies\vertexai.py tests\unittests\test_optional_dependencies.py
  • python -m pylint src\google\adk\dependencies\vertexai.py
  • git diff --check

Note: running pylint against the whole optional-dependencies test file still reports pre-existing style warnings unrelated to this change, so I only used pylint on the touched shim module.

@DeanChensj DeanChensj force-pushed the fix/vertexai-extra-error branch from e6a1b2f to 3837163 Compare June 2, 2026 22:11
copybara-service Bot pushed a commit that referenced this pull request Jun 2, 2026
Merge #5904

Change-Id: I7046548303aeb66bab1956b70803fc13b6be7d38
@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Jun 2, 2026

Thank you @he-yufeng for your contribution! 🎉

Your changes have been successfully imported and merged via Copybara in commit fde6a2b.

Closing this PR as the changes are now in the main branch.

@adk-bot adk-bot added the merged [Status] This PR is merged label Jun 2, 2026
@adk-bot adk-bot closed this Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged [Status] This PR is merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

google-adk v2.1.0 ships unguarded import vertexai without declaring vertexai as a dependency

3 participants