Skip to content

fix: update deprecated Gemini model names to supported versions#213

Open
Jiao0216 wants to merge 1 commit into
google-gemini:mainfrom
Jiao0216:main
Open

fix: update deprecated Gemini model names to supported versions#213
Jiao0216 wants to merge 1 commit into
google-gemini:mainfrom
Jiao0216:main

Conversation

@Jiao0216
Copy link
Copy Markdown

@Jiao0216 Jiao0216 commented May 8, 2026

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 officially
    announced deprecation with shutdown scheduled for June 1, 2026.
  • gemini-2.5-flash-preview-04-17: not found for API version v1beta
  • gemini-2.5-pro-preview-05-06: not found for API version v1beta

Changes

  • backend/src/agent/configuration.py: updated query_generator_model default
    from gemini-2.0-flash to gemini-2.5-flash
  • frontend/src/components/InputForm.tsx:
    • updated default model from gemini-2.5-flash-preview-04-17 to gemini-2.5-flash
    • removed deprecated gemini-2.0-flash dropdown option
    • updated gemini-2.5-flash-preview-04-17 option value to gemini-2.5-flash
    • updated gemini-2.5-pro-preview-05-06 option value to gemini-2.5-pro

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 8, 2026

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.

Copy link
Copy Markdown

@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 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",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
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");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The default model state should be updated to a valid model identifier. gemini-2.5-flash does not exist; the stable version is gemini-1.5-flash.

Suggested change
const [model, setModel] = useState("gemini-2.5-flash");
const [model, setModel] = useState("gemini-1.5-flash");

</SelectItem>
<SelectItem
value="gemini-2.5-flash-preview-04-17"
value="gemini-2.5-flash"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
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"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The model identifier gemini-2.5-pro is incorrect. The correct stable identifier is gemini-1.5-pro. Similar to the Flash model, the display label on line 151 should also be updated to '1.5 Pro'.

Suggested change
value="gemini-2.5-pro"
value="gemini-1.5-pro"

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.

1 participant