fix: update deprecated Gemini model names to supported versions#213
fix: update deprecated Gemini model names to supported versions#213Jiao0216 wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the Gemini model identifiers in the backend configuration and frontend input form, moving from preview versions to a new naming convention. The reviewer identified that the specified model names (e.g., gemini-2.5-flash) are incorrect and will result in API 404 errors, suggesting they be corrected to the stable gemini-1.5 series instead.
|
|
||
| query_generator_model: str = Field( | ||
| default="gemini-2.0-flash", | ||
| default="gemini-2.5-flash", |
There was a problem hiding this comment.
The model name gemini-2.5-flash is incorrect. Google's current stable models are in the 1.5 series (e.g., gemini-1.5-flash). Using a non-existent model name will result in API 404 errors. Additionally, please ensure that reflection_model and answer_model (lines 19 and 26) are also updated to use the correct 1.5 versions for consistency.
| default="gemini-2.5-flash", | |
| default="gemini-1.5-flash", |
| const [internalInputValue, setInternalInputValue] = useState(""); | ||
| const [effort, setEffort] = useState("medium"); | ||
| const [model, setModel] = useState("gemini-2.5-flash-preview-04-17"); | ||
| const [model, setModel] = useState("gemini-2.5-flash"); |
There was a problem hiding this comment.
| </SelectItem> | ||
| <SelectItem | ||
| value="gemini-2.5-flash-preview-04-17" | ||
| value="gemini-2.5-flash" |
There was a problem hiding this comment.
The model identifier gemini-2.5-flash is incorrect and will likely cause a 404 error. It should be gemini-1.5-flash. Note that the UI label '2.5 Flash' on line 143 should also be updated to '1.5 Flash' for accuracy, although it is not part of the modified lines in this diff.
| value="gemini-2.5-flash" | |
| value="gemini-1.5-flash" |
| </SelectItem> | ||
| <SelectItem | ||
| value="gemini-2.5-pro-preview-05-06" | ||
| value="gemini-2.5-pro" |
Problem
Several Gemini model names used in this project are deprecated and return
404 errors for new users, making the project impossible to run out of the box.
gemini-2.0-flash: no longer available to new users. Google has officiallyannounced deprecation with shutdown scheduled for June 1, 2026.
gemini-2.5-flash-preview-04-17: not found for API version v1betagemini-2.5-pro-preview-05-06: not found for API version v1betaChanges
backend/src/agent/configuration.py: updatedquery_generator_modeldefaultfrom
gemini-2.0-flashtogemini-2.5-flashfrontend/src/components/InputForm.tsx:gemini-2.5-flash-preview-04-17togemini-2.5-flashgemini-2.0-flashdropdown optiongemini-2.5-flash-preview-04-17option value togemini-2.5-flashgemini-2.5-pro-preview-05-06option value togemini-2.5-pro