Skip to content

chore: remove the use of deprecated types from VertexTaskStore (#889)#891

Merged
gaborfeher merged 2 commits intoa2aproject:1.0-devfrom
gaborfeher:gaborfeher-1.0-types
Mar 23, 2026
Merged

chore: remove the use of deprecated types from VertexTaskStore (#889)#891
gaborfeher merged 2 commits intoa2aproject:1.0-devfrom
gaborfeher:gaborfeher-1.0-types

Conversation

@gaborfeher
Copy link
Copy Markdown
Collaborator

  • vertexai.Part & co. will be replaced soon by genai.Part & co.
  • It's better to use the more specifically named variants of Task and Status: A2aTask and A2aTaskStatus.

For #802

…oject#889)

* vertexai.Part & co. will be replaced soon by genai.Part & co.
* It's better to use the more specifically named variants of `Task` and
`Status`: `A2aTask` and `A2aTaskStatus`.

For a2aproject#751
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the VertexTaskStore to utilize current and more semantically appropriate type definitions. The primary goal is to migrate away from deprecated vertexai.Part and generic vertexai.types.State in favor of google.genai.Part and vertexai.types.A2aTaskState, respectively. This update ensures the codebase remains aligned with evolving SDKs and improves the maintainability and clarity of task and part conversions.

Highlights

  • Type Migration: Replaced deprecated vertexai.Part types with google.genai.Part for improved compatibility with the Generative AI SDK.
  • Task State Refinement: Updated vertexai.types.State to the more specific vertexai.types.A2aTaskState for task status definitions, enhancing clarity and precision.
  • Codebase Update: Modified function signatures, type hints, and object instantiations across the vertex_task_converter.py module to reflect the new type definitions.
  • Test Alignment: Updated unit tests to assert against the newly adopted google.genai.Part and vertexai.types.A2aTaskState types, ensuring correctness of the conversions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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 Vertex task converter to use more specific and modern types from the vertexai and google.genai libraries. The deprecated vertexai.Part is replaced with genai.Part, and the generic vertexai.State is replaced with the more specific vertexai.A2aTaskState. These changes are applied consistently across the converter and its tests. A defensive check for None has also been added when processing inline data, which improves robustness. The changes are correct and improve the code's clarity and maintainability.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

🧪 Code Coverage (vs 1.0-dev)

⬇️ Download Full Report

No coverage changes.

Generated by coverage-comment.yml

@gaborfeher gaborfeher requested a review from ishymko March 23, 2026 15:37
@gaborfeher gaborfeher marked this pull request as ready for review March 23, 2026 15:37
@gaborfeher gaborfeher requested a review from a team as a code owner March 23, 2026 15:37
@gaborfeher gaborfeher merged commit 2b7108e into a2aproject:1.0-dev Mar 23, 2026
9 checks passed
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.

2 participants