Skip to content

refactor(genai/labels): replace vertexai.generative_models with genai#14450

Draft
XrossFox wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
XrossFox:vertex-to-genai-generative-models-labels
Draft

refactor(genai/labels): replace vertexai.generative_models with genai#14450
XrossFox wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
XrossFox:vertex-to-genai-generative-models-labels

Conversation

@XrossFox

@XrossFox XrossFox commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description

Update the codebase to use the new genai SDK replacement for all legacy vertexai.generative_models imports and usage.

Fixes b/537370586

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

 Update the codebase to use the new `genai` SDK replacement for all legacy `vertexai.generative_models` imports and usage.
@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Jul 21, 2026

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

Copy link
Copy Markdown
Contributor

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 introduces a new Python example demonstrating how to set labels when generating content with the google-genai SDK, along with associated tests and configuration files. Feedback is provided to correct a non-existent version of google-genai in requirements.txt, expand test coverage by not ignoring stable Python versions (3.11, 3.12, 3.13) in noxfile_config.py, and strengthen the test assertion to verify that response.text is returned.

Comment thread genai/labels/requirements.txt
Comment thread genai/labels/noxfile_config.py
Comment thread genai/labels/test_labels_examples.py Outdated
@XrossFox

Copy link
Copy Markdown
Contributor Author

This sample has been tested locally:

image image

@angelcaamal angelcaamal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

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.

2 participants