feat: Add Gemini 2.5 and 2.0 model metadata#9277
Conversation
…odels (gemini-2.5 and gemini-2.0) to the list of supported models.
|
#8372 |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis change updates the Google Generative AI model metadata by adding four new model entries to the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/backend/base/langflow/base/models/google_generative_ai_constants.py (1)
25-28: Minor ordering / grouping nitVersion blocks are now
1.5 → 2.5 → 2.0 → PREVIEW.
Keeping numerical order (1.5 → 2.0 → 2.5) helps future readers spot duplicates faster.- # GEMINI 2.5 + # GEMINI 2.0 ... - # GEMINI 2.0 + # GEMINI 2.5This is purely cosmetic, feel free to skip if your team doesn’t enforce ordering.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/backend/base/langflow/base/models/google_generative_ai_constants.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
{src/backend/**/*.py,tests/**/*.py,Makefile}
📄 CodeRabbit Inference Engine (.cursor/rules/backend_development.mdc)
{src/backend/**/*.py,tests/**/*.py,Makefile}: Run make format_backend to format Python code before linting or committing changes
Run make lint to perform linting checks on backend Python code
Files:
src/backend/base/langflow/base/models/google_generative_ai_constants.py
🧠 Learnings (2)
📓 Common learnings
Learnt from: ogabrielluiz
PR: langflow-ai/langflow#9054
File: src/backend/tests/unit/components/agents/test_agent_component.py:104-133
Timestamp: 2025-07-15T14:37:19.189Z
Learning: The GPT-4.1 series models (GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano) are valid OpenAI models introduced on April 14, 2025, available exclusively through OpenAI's API with enhanced coding capabilities and 1 million token context support.
📚 Learning: always use clear, recognizable, and consistent icon names for both backend and frontend (e.g., "astr...
Learnt from: CR
PR: langflow-ai/langflow#0
File: .cursor/rules/icons.mdc:0-0
Timestamp: 2025-07-28T15:56:47.865Z
Learning: Always use clear, recognizable, and consistent icon names for both backend and frontend (e.g., "AstraDB", "Postgres", "OpenAI").
Applied to files:
src/backend/base/langflow/base/models/google_generative_ai_constants.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Update Starter Projects
- GitHub Check: Run Ruff Check and Format
- GitHub Check: Ruff Style Check (3.13)
🔇 Additional comments (1)
src/backend/base/langflow/base/models/google_generative_ai_constants.py (1)
15-24: Confirm model availability &previewflag consistencyThe newly-added 2.5 models are not marked as
preview=True, while the 2.0 flash model below is still flagged as preview. Please double-check Google’s release notes: if the 2.5 models are still in public preview (current status as of Aug-25-2025), they should also carrypreview=Truefor UI consistency and downstream filtering logic.Otherwise, if they are GA, consider moving the existing 2.0 flash-preview models to a separate preview block to avoid user confusion.
|
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (1.21%) is below the target coverage (10.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #9277 +/- ##
=======================================
Coverage 32.61% 32.62%
=======================================
Files 1193 1193
Lines 56001 56001
Branches 5278 5278
=======================================
+ Hits 18266 18269 +3
+ Misses 37685 37682 -3
Partials 50 50
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
✨ (google_generative_ai_constants.py): add new Google Generative AI models (gemini-2.5 and gemini-2.0) to the list of supported models. Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
✨ (google_generative_ai_constants.py): add new Google Generative AI models (gemini-2.5 and gemini-2.0) to the list of supported models. Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
✨ (google_generative_ai_constants.py): add new Google Generative AI models (gemini-2.5 and gemini-2.0) to the list of supported models. Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
✨ (google_generative_ai_constants.py): add new Google Generative AI models (gemini-2.5 and gemini-2.0) to the list of supported models. Co-authored-by: Edwin Jose <edwin.jose@datastax.com>



This pull request adds new entries to the
Google Generative AImodel metadata in thesrc/backend/base/langflow/base/models/google_generative_ai_constants.pyfile. These changes expand the list of supported models.Additions to Google Generative AI model metadata:
gemini-2.5models:gemini-2.5-pro,gemini-2.5-flash, andgemini-2.5-flash-lite.gemini-2.0model:gemini-2.0-flash-lite.Summary by CodeRabbit