Skip to content

Conversation

Oht8wooWi8yait9n
Copy link
Contributor

@Oht8wooWi8yait9n Oht8wooWi8yait9n commented Aug 26, 2025

Description

This PR adds support for the new Gemini 2.5 Pro, Gemini 2.5 Flash, and Gemini 2.5 Flash Lite models in Onyx. This includes adding the model names to the backend list of available models and updating the frontend to display these models with user-friendly names. The older "preview" model names have been commented out, but retained in the code for possible future use.

How Has This Been Tested?

I verified that each new model name ("gemini-2.5-pro", "gemini-2.5-flash", and "gemini-2.5-flash-lite") works correctly when used in a search query within the Onyx application. This confirms that the models are properly integrated into both the backend and frontend and can be selected and used by users.

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

Summary by cubic

Add support for Gemini 2.5 Pro, Flash, and Flash Lite by updating the backend model list and UI display names. Replaces preview IDs with stable ones; preview entries are commented out for reference.

@Oht8wooWi8yait9n Oht8wooWi8yait9n requested a review from a team as a code owner August 26, 2025 17:05
Copy link

vercel bot commented Aug 26, 2025

Someone is attempting to deploy a commit to the Danswer Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR updates Onyx's support for Google's Gemini 2.5 models by transitioning from preview versions to stable production releases. The changes span both backend and frontend components:

Backend changes (backend/onyx/llm/llm_provider_options.py):

  • Updates the VERTEXAI_MODEL_NAMES list to include three new stable model names: gemini-2.5-pro, gemini-2.5-flash, and gemini-2.5-flash-lite
  • Comments out the older preview models (gemini-2.5-pro-preview-06-05 and gemini-2.5-pro-preview-05-06) rather than removing them entirely

Frontend changes (web/src/lib/hooks.ts):

  • Adds display names for the new stable models in the MODEL_DISPLAY_NAMES object with user-friendly labels like "Gemini 2.5 Pro", "Gemini 2.5 Flash", and "Gemini 2.5 Flash Lite"
  • Comments out display names for preview models (gemini-2.5-pro-preview-05-06 and gemini-2.5-flash-preview-05-20)

This change aligns with Google's model release cycle, where preview models are being superseded by stable production versions. The approach maintains backward compatibility by preserving commented code while providing users access to the latest stable Gemini models through the Onyx interface. The frontend display names follow existing naming conventions and provide clear, user-friendly labels for model selection.

Confidence score: 5/5

  • This PR is safe to merge with minimal risk as it only updates model configuration lists
  • Score reflects simple, well-tested changes that follow established patterns in the codebase
  • No files require special attention as both changes are straightforward configuration updates

2 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@Oht8wooWi8yait9n Oht8wooWi8yait9n changed the title Update gemini model names. fix: Update gemini model names. Aug 26, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@wenxi-onyx wenxi-onyx merged commit 23e6d7e into onyx-dot-app:main Aug 26, 2025
2 of 5 checks passed
@Oht8wooWi8yait9n Oht8wooWi8yait9n deleted the gemini-2.5 branch August 26, 2025 19:39
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
Co-authored-by: Aaron Sells <aaron.b.sells@nasa.gov>
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.

2 participants