-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Problem (one or two sentences)
The pricing in Roo does not match the pricing on the official Google API page for Gemini 3 flash.
https://ai.google.dev/gemini-api/docs/pricing#gemini-3-flash-preview
Current official pricing:
- Input price $0.50
- Output price (including thinking tokens) $3.00
- Context cache read price $0.05
- Context cache write price $0.00
Roo-Code/packages/types/src/providers/gemini.ts
Lines 50 to 53 in 586cf47
| inputPrice: 0.3, | |
| outputPrice: 2.5, | |
| cacheReadsPrice: 0.075, | |
| cacheWritesPrice: 1.0, |
Gemini 3 Pro preview doesn't have a price for cached tokens.
Add caching price (cacheReadsPrice)
Current official context caching price:
- $0.20 for prompts <= 200k tokens
- $0.40 for prompts > 200k tokens
Roo-Code/packages/types/src/providers/gemini.ts
Lines 24 to 34 in 586cf47
| tiers: [ | |
| { | |
| contextWindow: 200_000, | |
| inputPrice: 2.0, | |
| outputPrice: 12.0, | |
| }, | |
| { | |
| contextWindow: Infinity, | |
| inputPrice: 4.0, | |
| outputPrice: 18.0, | |
| }, |
The vertex provider also has the same pricing errors for Flash and Pro.
| inputPrice: 0.3, |
Context (who is affected and when)
Users using the Gemini or Vertex API directly.
Reproduction steps
Use the Gemini provider or the Vertex provider and make API calls, then check the Google console pricing to see the differences.
Expected result
Price is very similar to what is shown in Google Console.
Actual result
Pricing is different.
Variations tried (optional)
No response
App Version
3.38.2
API Provider (optional)
Google Gemini
Model Used (optional)
gemini-3-flash-preview
Roo Code Task Links (optional)
No response
Relevant logs or errors (optional)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status