VER-299: Fix stage 1: Use pinned gemini version instead of gemini-flash-latest#60
VER-299: Fix stage 1: Use pinned gemini version instead of gemini-flash-latest#60quancao-ea merged 1 commit intomainfrom
Conversation
Updates stage 1 and stage 3 to use the specific Gemini 2.5 Flash preview model instead of the latest flash alias for consistent model behavior across the pipeline.
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 3006a89 in 7 seconds. Click for details.
- Reviewed
122lines of code in5files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_z9kQMoI0EMbSlt57
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Summary of ChangesHello @quancao-ea, 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 enhances the stability and predictability of the processing pipeline by replacing the dynamic 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
|
WalkthroughThis PR adds a new Gemini model variant (GEMINI_2_5_FLASH_PREVIEW_09_2025) to the enum and replaces all references from GEMINI_FLASH_LATEST to this pinned model version across stage 1 and stage 3 processing modules. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Pylint (4.0.4)src/processing_pipeline/constants.py************* Module .pylintrc ... [truncated 7210 characters] ... ini_timestamped_transcription_generation_prompt", src/processing_pipeline/stage_1/flows.py************* Module .pylintrc ... [truncated 13107 characters] ... module": "src.processing_pipeline.stage_1.flows", src/processing_pipeline/stage_3/tasks.py************* Module .pylintrc ... [truncated 9644 characters] ... ule": "src.processing_pipeline.stage_3.tasks",
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/processing_pipeline/stage_1/flows.py (1)
176-176:⚠️ Potential issue | 🟡 MinorStale log message: "Gemini Flash Latest" no longer reflects the actual model used.
Line 176 still prints
"Processing the timestamped transcription with Gemini Flash Latest", butdisinformation_detection_with_gemininow defaults toGEMINI_2_5_FLASH_PREVIEW_09_2025. The function itself already logs the correct model name on entry (line 196 oftasks.py), so this hardcoded string is misleading.Suggested fix
- print("Processing the timestamped transcription with Gemini Flash Latest") + print("Processing the timestamped transcription with Gemini")
There was a problem hiding this comment.
Code Review
This pull request successfully replaces the use of gemini-flash-latest with a pinned version, gemini-2.5-flash-preview-09-2025, which is an excellent practice for ensuring stability and reproducibility. The changes are applied consistently across the relevant files. I have added a couple of suggestions to improve maintainability by reusing a variable for the model name within the same function, which will make future updates easier.
| metadata=metadata, | ||
| prompt_version=detection_prompt_version, | ||
| model_name=GeminiModel.GEMINI_FLASH_LATEST, | ||
| model_name=GeminiModel.GEMINI_2_5_FLASH_PREVIEW_09_2025, |
There was a problem hiding this comment.
To improve maintainability and avoid repeating the model name, consider reusing the transcriptor variable defined on line 233. This ensures that if the model needs to be changed in the future, it only needs to be updated in one place within this block.
| model_name=GeminiModel.GEMINI_2_5_FLASH_PREVIEW_09_2025, | |
| model_name=transcriptor, |
| metadata=metadata, | ||
| prompt_version=detection_prompt_version, | ||
| model_name=GeminiModel.GEMINI_FLASH_LATEST, | ||
| model_name=GeminiModel.GEMINI_2_5_FLASH_PREVIEW_09_2025, |
There was a problem hiding this comment.
To improve maintainability and avoid repeating the model name, consider reusing the transcriptor variable defined on line 296. This ensures that if the model needs to be changed in the future, it only needs to be updated in one place within this block.
| model_name=GeminiModel.GEMINI_2_5_FLASH_PREVIEW_09_2025, | |
| model_name=transcriptor, |
Important
Replace
GeminiModel.GEMINI_FLASH_LATESTwithGeminiModel.GEMINI_2_5_FLASH_PREVIEW_09_2025across stage 1 and 3 processing functions.GeminiModel.GEMINI_FLASH_LATESTwithGeminiModel.GEMINI_2_5_FLASH_PREVIEW_09_2025inregenerate_timestamped_transcript()andprocess_audio_file()inflows.py.initial_transcription_with_gemini(),initial_disinformation_detection_with_gemini(),transcribe_audio_file_with_timestamp_with_gemini(), anddisinformation_detection_with_gemini()intasks.pyto useGeminiModel.GEMINI_2_5_FLASH_PREVIEW_09_2025.__structure_with_schema()inexecutors.pyto useGeminiModel.GEMINI_2_5_FLASH_PREVIEW_09_2025.GEMINI_2_5_FLASH_PREVIEW_09_2025toGeminiModelinconstants.py.This description was created by
for 3006a89. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit