Akari
455bc1ebba
fix: use last API call's cache tokens for context-size display ( #13698 ) ( #13805 )
...
The UsageAccumulator sums cacheRead/cacheWrite across all API calls
within a single turn. With Anthropic prompt caching, each call reports
cacheRead ≈ current_context_size, so after N tool-call round-trips the
accumulated total becomes N × actual_context, which gets clamped to
contextWindow (200k) by deriveSessionTotalTokens().
Fix: track the most recent API call's cache fields separately and use
them in toNormalizedUsage() for context-size reporting. This makes
/status Context display accurate while preserving accumulated output
token counts.
Fixes #13698
Fixes #13782
Co-authored-by: akari-musubi <259925157+akari-musubi@users.noreply.github.com >
2026-02-12 08:01:36 -06:00
..
2026-02-01 10:03:47 +09:00
2026-02-12 08:01:36 -06:00
2026-02-12 00:13:15 -06:00
2026-02-11 07:54:48 +08:00
2026-02-07 22:16:59 -05:00
2026-02-10 17:33:57 -06:00
2026-02-12 07:55:19 -06:00
2026-02-12 07:45:38 -06:00
2026-01-30 03:16:21 +01:00
2026-02-12 07:55:05 -06:00
2026-02-12 07:55:05 -06:00
2026-02-12 07:55:29 -06:00
2026-02-11 13:10:37 -06:00
2026-02-04 10:37:14 -05:00
2026-02-12 07:55:26 -06:00
2026-02-11 12:04:30 +01:00
2026-02-10 00:44:38 -06:00
2026-02-11 23:21:21 -06:00
2026-02-10 00:44:38 -06:00
2026-02-01 10:03:47 +09:00
2026-02-12 07:45:36 -06:00
2026-01-31 16:19:20 +09:00
2026-02-12 08:11:57 -05:00
2026-02-12 07:45:22 -06:00
2026-02-09 20:34:56 -08:00
2026-02-11 21:42:33 -06:00
2026-02-11 07:54:48 +08:00
2026-02-10 19:48:02 -05:00
2026-02-09 19:21:33 -08:00
2026-02-11 12:04:30 +01:00
2026-02-12 07:55:19 -06:00
2026-02-09 09:58:58 +09:00
2026-02-09 09:20:52 +09:00
2026-02-01 10:03:47 +09:00
2026-02-09 22:22:29 -08:00
2026-02-09 20:42:35 -08:00
2026-01-31 16:19:20 +09:00
2026-02-10 00:44:38 -06:00
2026-02-12 00:13:07 -06:00
2026-02-12 08:11:57 -05:00
2026-02-03 06:22:51 +00:00
2026-02-07 22:16:59 -05:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-08 04:53:31 -08:00
2026-02-02 01:52:33 +01:00
2026-02-09 20:34:56 -08:00
2026-02-11 23:09:09 -06:00
2026-02-01 10:03:47 +09:00
2026-02-10 07:31:02 -05:00
2026-02-01 10:03:47 +09:00
2026-01-13 08:40:39 +00:00
2026-02-10 18:04:48 -05:00
2026-02-08 04:53:31 -08:00
2026-02-03 20:18:16 +09:00
2026-01-31 16:19:20 +09:00
2026-01-14 15:02:19 +00:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-14 15:02:19 +00:00
2026-02-03 06:10:19 +00:00
2026-02-08 20:06:29 -05:00
2026-02-09 18:56:58 -08:00
2026-02-06 00:09:48 -05:00
2026-02-06 00:09:48 -05:00