Skip to content

Conversation

@bahag-chaurasiak
Copy link
Contributor

Summary

Vertex AI regional endpoints charge 10% more than Anthropic's direct API pricing.

This updates the cost calculation to apply this premium for entries detected as Vertex AI usage (via _vrtx_ prefix in message/request IDs).

Changes

  • Added vertexAIRegionalPremium constant (1.10) in CostUsagePricing.swift
  • Updated claudeCostUSD() to accept isVertexAI parameter and apply premium
  • Updated parseClaudeFile() to detect Vertex AI entries and pass flag to cost calculation

Testing

  • All existing tests pass
  • Verified cost calculation matches Google Cloud Console (~$142.83 calculated vs console)

Co-Authored-By: Warp agent@warp.dev

bahag-chaurasiak and others added 4 commits January 24, 2026 14:24
Vertex AI regional endpoints charge 10% more than Anthropic's direct API.
This updates the cost calculation to apply this premium for entries
detected as Vertex AI usage (via _vrtx_ prefix in message/request IDs).

Co-Authored-By: Warp <agent@warp.dev>
When pricing logic changes (like adding the 10% Vertex AI premium),
old cached costs become stale. Bumping the cache version forces a
full rescan with the corrected pricing calculation.

Co-Authored-By: Warp <agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant