-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(vertexai): Update gemini model to gemini-2.5-flash #10231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(vertexai): Update gemini model to gemini-2.5-flash #10231
Conversation
Summary of ChangesHello @alarconesparza, 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 updates the default Gemini model version across multiple Java code snippets and their corresponding integration tests. The change ensures that the examples leverage the latest Highlights
Changelog
Activity
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The pull request successfully updates the Gemini model version to gemini-2.5-flash across various Java snippets. This is a straightforward and necessary update. Additionally, the SnippetsIT.java file has been cleaned up by removing several unused constants (GEMINI_FLASH_1_5, DATASTORE_ID, TARGET_LANGUAGE_CODE, TEXT_TO_TRANSLATE), which is a positive improvement for code maintainability and clarity.
| String projectId = "genai-java-demos"; | ||
| String location = "us-central1"; | ||
| String modelName = "gemini-2.0-flash-001"; | ||
| String modelName = "gemini-2.5-flash"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this change correctly updates the model name, for improved maintainability and to avoid 'magic strings', consider defining modelName as a private static final String at the class level. This would centralize the model name definition and make future updates easier, especially since this pattern is repeated across multiple snippet files.
Description
Fixes Internal:
b/481404468
b/481404611
b/481403956
b/481403794
b/481405008
b/481403799
b/481403720
b/481404947
b/481405007
b/481404786
b/481405042
Checklist
pom.xmlparent set to latestshared-configurationmvn clean verifyrequiredmvn -P lint checkstyle:checkrequiredmvn -P lint clean compile pmd:cpd-check spotbugs:checkadvisory only