mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
6d744f02ef
Google's promptTokenCount includes cachedContentTokenCount, so using it directly as the input token count causes double-counting when calculateCost multiplies input by the input rate AND cacheRead by the cacheRead rate. The google-gemini-cli provider already handles this correctly (subtracting cachedContentTokenCount from promptTokenCount), but google.ts and google-vertex.ts were using the raw promptTokenCount. This fix aligns both providers with the google-gemini-cli behavior.
6d744f02ef
ยท
2026-03-25 22:02:28 +01:00
History