Skip to content

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

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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

1 participant