forked from cline/cline
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.Clear and approved. Available for contributors to pick up.bugSomething isn't workingSomething isn't working
Description
Problem (one or two sentences)
When using Gemini through Vertex AI, tiered pricing and cache discounts are not applied in the local cost calculation, causing displayed costs to always show the highest tier rates instead of the correct discounted rates.
Context (who is affected and when)
Who is affected:
- All users using Gemini models through Vertex AI
- Users monitoring costs through Roo-Code's local logs and UI
- Users expecting accurate cost tracking and reporting
When this occurs:
- When using Vertex AI provider with Gemini models
- During local cost calculation in the
calculateCostmethod - Affects cost display in
ui_messages.jsonand local cost tracking - Note: Actual billing by Google Cloud/Vertex AI remains correct
Reproduction steps
- Configure Roo-Code to use Vertex AI with a Gemini model (
gemini-2.5-pro) - Set up Vertex AI credentials (project ID, region, authentication)
- Make an API call that generates significant token usage
- Check the cost displayed in
ui_messages.jsonor local logs - Compare with expected cost calculation using tiered pricing and cache discounts
Expected result
Displayed cost should reflect tiered pricing and cache discounts
Actual result
Displayed cost always shows high-tier pricing applied to all tokens
Variations tried (optional)
No response
App Version
v3.28.1
API Provider (optional)
Google Vertex AI
Model Used (optional)
gemini-2.5-pro
Roo Code Task Links (optional)
No response
Relevant logs or errors (optional)
Metadata
Metadata
Assignees
Labels
Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.Clear and approved. Available for contributors to pick up.bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done