chore: Update Version String#2380
Conversation
Summary of ChangesHello @dishaprakash, 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 refines the User Agent version string generation to accurately reflect the combination of prebuilt and custom tools. It introduces a more sophisticated logic that dynamically tags each tool as either 'prebuilt' or 'custom' depending on whether any custom tools are configured, ensuring the version string provides a clear representation of the toolset in use. Highlights
Using Gemini Code AssistThe 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
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 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request updates the User Agent version string generation logic to correctly reflect whether prebuilt and custom tools are used. The new logic correctly applies the 'prebuilt' or 'custom' tag based on the loaded configurations, aligning with the described design. The removal of the old version string update and the introduction of the new, more flexible logic are well-implemented.
## Description This PR modifies the User Agent (version string) generation to better accommodate the recent support for combining prebuilt and custom tools. The design for this update is as so: Single Prebuilt: <version+metadata>+prebuilt.bigquery Multiple prebuilt: <version+metadata>+prebuilt.bigquery+prebuilt.alloydb Prebuilt + Custom: <version+metadata>+custom.bigquery Multiple prebuilt + custom: <version+metadata>+custom.bigquery+custom.alloydb Versioning Logic: - Single Prebuilt: Appends +prebuilt.<name> Example: ```<version>+prebuilt.bigquery``` - Multiple Prebuilt: Appends a tag for each prebuilt config. Example: ```<version>+prebuilt.bigquery+prebuilt.alloydb``` - Prebuilt + Custom: If custom tools are detected, the tag for all prebuilt tools switches to custom. Example: ```<version>+custom.bigquery``` - Multiple Prebuilt + Custom: All prebuilt tools receive the custom tag. Example: ```<version>+custom.bigquery+custom.alloydb``` ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #<issue_number_goes_here> 341316b
## Description This PR modifies the User Agent (version string) generation to better accommodate the recent support for combining prebuilt and custom tools. The design for this update is as so: Single Prebuilt: <version+metadata>+prebuilt.bigquery Multiple prebuilt: <version+metadata>+prebuilt.bigquery+prebuilt.alloydb Prebuilt + Custom: <version+metadata>+custom.bigquery Multiple prebuilt + custom: <version+metadata>+custom.bigquery+custom.alloydb Versioning Logic: - Single Prebuilt: Appends +prebuilt.<name> Example: ```<version>+prebuilt.bigquery``` - Multiple Prebuilt: Appends a tag for each prebuilt config. Example: ```<version>+prebuilt.bigquery+prebuilt.alloydb``` - Prebuilt + Custom: If custom tools are detected, the tag for all prebuilt tools switches to custom. Example: ```<version>+custom.bigquery``` - Multiple Prebuilt + Custom: All prebuilt tools receive the custom tag. Example: ```<version>+custom.bigquery+custom.alloydb``` ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #<issue_number_goes_here>
## Description This PR modifies the User Agent (version string) generation to better accommodate the recent support for combining prebuilt and custom tools. The design for this update is as so: Single Prebuilt: <version+metadata>+prebuilt.bigquery Multiple prebuilt: <version+metadata>+prebuilt.bigquery+prebuilt.alloydb Prebuilt + Custom: <version+metadata>+custom.bigquery Multiple prebuilt + custom: <version+metadata>+custom.bigquery+custom.alloydb Versioning Logic: - Single Prebuilt: Appends +prebuilt.<name> Example: ```<version>+prebuilt.bigquery``` - Multiple Prebuilt: Appends a tag for each prebuilt config. Example: ```<version>+prebuilt.bigquery+prebuilt.alloydb``` - Prebuilt + Custom: If custom tools are detected, the tag for all prebuilt tools switches to custom. Example: ```<version>+custom.bigquery``` - Multiple Prebuilt + Custom: All prebuilt tools receive the custom tag. Example: ```<version>+custom.bigquery+custom.alloydb``` ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #<issue_number_goes_here>
Description
This PR modifies the User Agent (version string) generation to better accommodate the recent support for combining prebuilt and custom tools.
The design for this update is as so:
Single Prebuilt: <version+metadata>+prebuilt.bigquery
Multiple prebuilt: <version+metadata>+prebuilt.bigquery+prebuilt.alloydb
Prebuilt + Custom: <version+metadata>+custom.bigquery
Multiple prebuilt + custom: <version+metadata>+custom.bigquery+custom.alloydb
Versioning Logic:
Single Prebuilt: Appends +prebuilt.
Example:
<version>+prebuilt.bigqueryMultiple Prebuilt: Appends a tag for each prebuilt config.
Example:
<version>+prebuilt.bigquery+prebuilt.alloydbPrebuilt + Custom: If custom tools are detected, the tag for all prebuilt tools switches to custom.
Example:
<version>+custom.bigqueryMultiple Prebuilt + Custom: All prebuilt tools receive the custom tag.
Example:
<version>+custom.bigquery+custom.alloydbPR Checklist
CONTRIBUTING.md
bug/issue
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
!if this involve a breaking change🛠️ Fixes #<issue_number_goes_here>