-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: add Gemini 2.5 models (Pro, Flash and Flash Lite) #4798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add stable gemini-2.5-pro model to gemini.ts, vertex.ts, and openrouter.ts - Add gemini-2.5-flash-lite-preview-06-17 with thinking variant - Configure proper pricing and thinking budget support for Flash Lite - Add models to appropriate OpenRouter sets for reasoning budget support
…xcluding them for now
mrubens
approved these changes
Jun 17, 2025
cte
approved these changes
Jun 17, 2025
valekseev
pushed a commit
to valekseev/Roo-Code
that referenced
this pull request
Jun 18, 2025
cte
pushed a commit
that referenced
this pull request
Jun 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
lgtm
This PR has been approved by a maintainer
PR - Needs Review
size:L
This PR changes 100-499 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for the new Gemini 2.5 models:
Changes
Added Models
gemini-2.5-pro- The stable release of Gemini 2.5 Progemini-2.5-pro-preview-06-05gemini-2.5-flash- New flash model with thinking capabilitiesgemini-2.5-flash-lite-preview-06-17- New lightweight model:thinkingsuffixModified Files
packages/types/src/providers/gemini.ts- Added all three new modelspackages/types/src/providers/vertex.ts- Added all three new models for Vertex AIpackages/types/src/providers/openrouter.ts- Added models to appropriate sets:OPEN_ROUTER_PROMPT_CACHING_MODELS(Flash and Flash Lite)OPEN_ROUTER_REASONING_BUDGET_MODELS(all three models)OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS(Pro)src/api/providers/openrouter.ts- UpdatedOpenRouterHandlerto handle reasoning tokens forgemini-2.5-proTesting
All linting checks have passed. The models follow the exact same schema as their preview counterparts to ensure compatibility.
References
Important
Adds
gemini-2.5-pro,gemini-2.5-flash, andgemini-2.5-flash-lite-preview-06-17models with configurations togemini.ts,openrouter.ts, andvertex.ts, updatingOpenRouterHandlerfor reasoning tokens.gemini-2.5-pro,gemini-2.5-flash, andgemini-2.5-flash-lite-preview-06-17added togemini.ts,openrouter.ts, andvertex.ts.gemini-2.5-prosupports dynamic thinking budget and tiered pricing.gemini-2.5-flashsupports reasoning budget with specific pricing.gemini-2.5-flash-lite-preview-06-17includes a thinking variant with specific pricing.gemini.ts: Added new models with configurations.openrouter.ts: Integrated models into prompt caching and reasoning budget sets.vertex.ts: Added models with specific configurations.OpenRouterHandlerinopenrouter.tsupdated to handle reasoning tokens for bothgemini-2.5-pro-previewandgemini-2.5-pro.