Skip to content

Commit 362cf9d

Browse files
committed
docs: describe the non-1h cache write remainder accurately
CodeRabbit pointed out that cacheCreationTokens minus cacheCreation1hTokens also includes writes from records that reported no TTL split, not only 5-minute writes. Both are billed at the 5-minute rate, which is what the section now says.
1 parent 2964c6a commit 362cf9d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎docs/guide/json-output.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ In `auto` [cost mode](/guide/cost-modes), an entry's `cost` can add together cos
304304

305305
## Cache Write TTL Split
306306

307-
[Claude Code](/guide/claude/) records whether each cache write used the 5-minute or the 1-hour cache TTL, and the two tiers are billed at different rates. Each `modelBreakdowns` entry where at least one record reported that split carries `cacheCreation1hTokens`, the part of `cacheCreationTokens` written with the 1-hour TTL; `cacheCreationTokens - cacheCreation1hTokens` is the 5-minute part. Entries whose records never reported a split, including every other agent, omit the key.
307+
[Claude Code](/guide/claude/) records whether each cache write used the 5-minute or the 1-hour cache TTL, and the two tiers are billed at different rates. Each `modelBreakdowns` entry where at least one record reported that split carries `cacheCreation1hTokens`, the part of `cacheCreationTokens` written with the 1-hour TTL; the rest of `cacheCreationTokens` is 5-minute writes plus writes from records that reported no split, all billed at the 5-minute rate. Entries whose records never reported a split, including every other agent, omit the key.
308308

309309
```json
310310
{

0 commit comments

Comments
 (0)