chore: update deprecated models to gemini-1.5/2.5 family to Latest Mo…#1148
chore: update deprecated models to gemini-1.5/2.5 family to Latest Mo…#1148
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Summary of ChangesHello, 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 focuses on maintaining the examples and quickstarts by updating them to use the most current and supported Gemini models. This ensures that users are always leveraging the latest capabilities and avoiding deprecated endpoints, which improves the overall reliability and future-proofing of the provided code. 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.
Code Review
This pull request updates several notebooks and scripts to use newer Gemini models, replacing deprecated ones. The changes are generally correct and align with the goal of keeping the examples up-to-date. My review focuses on ensuring consistency in the Colab notebooks, particularly where model selection is presented to the user. I've found several instances where @param model lists in comments are outdated or inconsistent with the newly set default model. Updating these will improve the user experience and maintainability of the notebooks, in line with the repository's style guide.
| "\n", | ||
| "# Define the model you are going to use\n", | ||
| "model_id = \"gemini-2.5-flash\" # or \"gemini-2.5-flash-lite\", \"gemini-2.5-flash\", \"gemini-2.5-pro\", \"gemini-3.1-flash-lite-preview\", \"gemini-3.1-pro-preview\"" | ||
| "model_id = \"gemini-3-flash-preview\" # or \"gemini-2.5-flash-lite\", \"gemini-2.5-flash\", \"gemini-2.5-pro\", \"gemini-3.1-flash-lite-preview\", \"gemini-3.1-pro-preview\"" |
There was a problem hiding this comment.
The comment listing alternative models is outdated and doesn't include the new default gemini-3-flash-preview. According to the repository style guide, it's recommended to use a Colab parameter selector for model selection to improve maintainability. Please consider converting this to a @param dropdown.
model_id = "gemini-3-flash-preview" # @param ["gemini-3-flash-preview", "gemini-3-pro-preview", "gemini-3.1-flash-lite-preview", "gemini-3.1-pro-preview"] {"allow-input":true, isTemplate: true}
References
- When selecting a model, it is recommended to use a Colab parameter selector (
@param) to make it easier for users to switch between models and for maintainers to update them. The list of models should be kept consistent and up-to-date. (link)
| "\"\"\"\n", | ||
| "\n", | ||
| "MODEL_ID=\"gemini-2.5-flash\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.5-flash\",\"gemini-2.5-pro\", \"gemini-3.1-flash-lite-preview\", \"gemini-3.1-pro-preview\"] {\"allow-input\":true, isTemplate: true}\n", | ||
| "MODEL_ID=\"gemini-3-flash-preview\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.5-flash\",\"gemini-2.5-pro\", \"gemini-3.1-flash-lite-preview\", \"gemini-3.1-pro-preview\"] {\"allow-input\":true, isTemplate: true}\n", |
There was a problem hiding this comment.
The default MODEL_ID has been updated to gemini-3-flash-preview, but this model is not in the @param list. The list also contains several deprecated models. To ensure the Colab UI works as expected and to align with the goal of this PR, please update the list of models.
MODEL_ID="gemini-3-flash-preview" # @param ["gemini-3-flash-preview", "gemini-3-pro-preview", "gemini-3.1-flash-lite-preview", "gemini-3.1-pro-preview"] {"allow-input":true, isTemplate: true}
References
- When selecting a model, it is recommended to use a Colab parameter selector (
@param) to make it easier for users to switch between models and for maintainers to update them. The list of models should be kept consistent and up-to-date. (link)
| "outputs": [], | ||
| "source": [ | ||
| "MODEL_ID=\"gemini-2.5-flash\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.5-flash\",\"gemini-2.5-pro\",\"gemini-3.1-flash-lite-preview\",\"gemini-3.1-pro-preview\"] {\"allow-input\":true, isTemplate: true}" | ||
| "MODEL_ID=\"gemini-3-flash-preview\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.5-flash\",\"gemini-2.5-pro\",\"gemini-3.1-flash-lite-preview\",\"gemini-3.1-pro-preview\"] {\"allow-input\":true, isTemplate: true}" |
There was a problem hiding this comment.
The default MODEL_ID has been updated to gemini-3-flash-preview, but this model is not in the @param list. The list also contains several deprecated models. To ensure the Colab UI works as expected and to align with the goal of this PR, please update the list of models.
MODEL_ID="gemini-3-flash-preview" # @param ["gemini-3-flash-preview", "gemini-3-pro-preview", "gemini-3.1-flash-lite-preview", "gemini-3.1-pro-preview"] {"allow-input":true, isTemplate: true}
References
- When selecting a model, it is recommended to use a Colab parameter selector (
@param) to make it easier for users to switch between models and for maintainers to update them. The list of models should be kept consistent and up-to-date. (link)
Giom-V
left a comment
There was a problem hiding this comment.
A bit of nitpicking to keep things tidy
| "text": [ | ||
| "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/137.7 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r", | ||
| "\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━\u001b[0m \u001b[32m133.1/137.7 kB\u001b[0m \u001b[31m4.6 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r", | ||
| "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/137.7 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\n", |
There was a problem hiding this comment.
Why are you adding \n in the output?
Description
Updated several notebooks and scripts that were still referencing deprecated models (e.g.,
gemini-2.0-flash,gemini-2.5-flash) to the newer models (gemini-3-flash-preview,text-embedding-001, etc.).All modified notebooks have been tested to ensure compatibility with the new model endpoints.