[DOCS] cache_read_input_tokens is not incremental

Resolved 💬 3 comments Opened Dec 4, 2025 by fariouche Closed Dec 8, 2025

Documentation Type

Unclear/confusing documentation

Documentation Location

_No response_

Section/Topic

stream-json usage fields

Current Documentation

The doc currently says that usage reporting in stream-json is incremental.
From what i understand and what I see, that means that i must accumulate the values from each usage reports to have the total input_tokens or output_tokens etc

However, i have a doubt with cache_read_input_tokens. as it seems to be ever increasing (while the other fields values are sometimes lower then higher)

Is it a bug on hiw cache_read_input_tokens is reported?
Today that means that I'm over calculating the token usage.
If this is a documentation issue, then maybe this should be clarified.
Thanks

What's Wrong or Missing?

incorrect reporting of tokens

Suggested Improvement

Either the doc is correct and there is a bug in claude reportings or the doc should stipulate that cache_read_input_tokens is not cumulative

Impact

Medium - Makes feature difficult to understand

Additional Context

_No response_

View original on GitHub ↗

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