[BUG] Grossly underreported input tokens count when running through Google Vertex AI, leading to actual cost 7x higher than reported in CLI

Resolved 💬 3 comments Opened Nov 5, 2025 by dtinth Closed Jan 9, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

output from /cost

<img width="811" height="184" alt="Image" src="https://github.com/user-attachments/assets/45b240ee-4025-4059-b7a3-211040874d10" />

What Should Happen?

  • input, cache read, cache write should not be "0"
  • actual cost should reflect the real cost, like in ccusage

<img width="1082" height="62" alt="Image" src="https://github.com/user-attachments/assets/583c62a4-13cd-443d-94cc-3e0372ccff05" />

Error Messages/Logs

Steps to Reproduce

  1. Use Claude Code with Vertex AI for a day. Run /cost which reports about $3.
  2. Get charged by Anthropic $22. 😭😭😭😭😭

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.31

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗