Skip to content

Conversation

@roomote
Copy link
Collaborator

@roomote roomote commented Jun 18, 2025

Summary

This PR fixes issue #4836 by adding the missing model to the Gemini provider configuration with the correct pricing.

Changes

  • Added model to the Gemini models configuration
  • Set correct pricing according to Google's official documentation:
    • Input tokens: /bin/sh.30/M
    • Output tokens: .50/M
  • Added support for prompt caching with appropriate cache pricing:
    • Cache reads: /bin/sh.075/M
    • Cache writes: .0/M
  • Model configuration includes:
    • 65,535 max tokens
    • 1,048,576 context window
    • Image support enabled
    • Prompt caching support enabled

Testing

  • All existing tests pass
  • The model is now available for selection in the Google Gemini provider

References


Important

Adds gemini-2.5-flash model with updated pricing and prompt caching to Gemini provider configuration.

  • Behavior:
    • Adds gemini-2.5-flash model to gemini.ts and vertex.ts with updated pricing.
    • Sets input price to 0.3 and output price to 2.5 for gemini-2.5-flash-preview-05-20 and gemini-2.5-flash-preview-04-17.
    • Enables prompt caching with cache read price 0.0375 and write price 1.0.
  • Model Configuration:
    • maxTokens set to 65,535 and contextWindow to 1,048,576.
    • Supports images and prompt caching.
  • Testing:
    • Model is now available for selection in Google Gemini provider.

This description was created by Ellipsis for 6675722. You can customize this summary. It will automatically update as commits are pushed.

@roomote roomote requested review from cte, jr and mrubens as code owners June 18, 2025 15:25
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Jun 18, 2025
- Updated input price from /bin/sh.15/M to /bin/sh.30/M
- Updated output price from /bin/sh.60/M to .50/M
- Applied fixes to both Gemini and Vertex providers
- Affects gemini-2.5-flash-preview-04-17 and gemini-2.5-flash-preview-05-20 models
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 18, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jun 18, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jun 18, 2025
@sr-tream
Copy link

sr-tream commented Jun 18, 2025

Pricing for -preview models remains the same on the Vertex AI page and in Google AI Studio. The price changed is only for stable release of gemini-2.5-flash

Pricing for gemini-2.5-flash-preview-04-17 in Google AI Studio

Set correct pricing according to Google's official documentation:

  • Input tokens: /bin/sh.30/M
  • Output tokens: .50/M

Added support for prompt caching with appropriate cache pricing:

  • Cache reads: /bin/sh.075/M
  • Cache writes: .0/M

What?

@daniel-lxs
Copy link
Member

Closing, this PR changes the price for other flash unrelated models

@daniel-lxs daniel-lxs closed this Jun 19, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 19, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working PR - Needs Preliminary Review size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Gemini 2.5 Flash - incorrect pricing

5 participants