joaomarcos
e331b834fe
fix(usage): preserve OpenAI-wire cache writes at canonical accounting boundary ( #85706 )
...
Salvaged from PR #85702 by @JoaoMarcos44, composed onto the mapping-safe
_usage_get reads (PR #74591 by @RelaxJonh) and the flat cached_tokens /
Anthropic-name fallbacks (PRs #66105 , #52571 ):
- cache-write precedence in the chat_completions branch:
details.cache_write_tokens > details.cache_creation_input_tokens >
usage.cache_creation_input_tokens > usage.cache_write_tokens
- codex_responses branch reads details.cache_write_tokens (GPT-5.6+
documented name) with cache_creation_tokens fallback (from PR #70522 )
- _usage_count(): clamp malformed negative counters to 0
- all reads in every branch are mapping-safe via _usage_get
2026-08-13 22:09:37 -07:00
..
2026-08-08 04:19:49 -07:00
2026-08-13 22:09:37 -07:00
2026-08-12 13:30:01 -05:00
2026-08-13 14:22:14 -07:00
2026-08-09 22:09:49 -04:00
2026-08-13 11:49:24 -07:00
2026-08-13 20:30:12 -07:00
2026-08-13 20:30:12 -07:00
2026-08-10 11:01:15 +05:30
2026-08-13 23:43:15 +05:30
2026-08-04 17:36:26 -04:00
2026-08-08 18:11:02 -07:00
2026-08-13 11:49:14 -07:00
2026-08-13 11:11:53 -07:00
2026-08-14 12:41:26 +10:00
2026-08-13 02:38:28 -07:00
2026-08-12 19:13:32 -07:00
2026-08-12 16:11:51 -07:00
2026-08-09 14:10:21 -07:00
2026-08-08 12:33:19 -07:00
2026-08-13 20:30:26 -07:00
2026-08-13 12:21:04 -07:00
2026-08-07 10:11:05 -07:00
2026-08-12 19:13:32 -07:00
2026-08-12 17:25:30 -05:00
2026-08-06 05:00:17 +05:30
2026-08-13 22:44:23 +05:30
2026-08-08 05:21:09 -07:00
2026-08-12 19:13:32 -07:00
2026-08-09 22:09:49 -04:00
2026-08-09 22:09:49 -04:00
2026-08-09 22:09:49 -04:00
2026-08-09 22:09:49 -04:00
2026-08-13 23:45:21 +05:30
2026-08-13 23:43:15 +05:30
2026-08-13 23:43:15 +05:30
2026-08-13 02:38:28 -07:00
2026-08-08 19:46:35 -07:00
2026-08-13 02:44:48 -07:00
2026-08-13 02:38:28 -07:00
2026-08-13 18:39:54 +00:00
2026-08-13 18:39:54 +00:00
2026-08-07 19:44:35 +05:30
2026-08-11 17:06:15 -05:00
2026-08-09 22:09:49 -04:00
2026-08-10 13:49:37 -04:00
2026-08-13 11:49:14 -07:00
2026-08-12 18:55:14 -07:00
2026-08-10 17:02:56 -07:00
2026-08-08 12:33:19 -07:00
2026-08-07 00:41:58 -04:00
2026-08-10 17:02:56 -07:00
2026-08-10 17:02:56 -07:00
2026-08-06 07:49:42 -07:00
2026-08-12 19:43:29 -07:00
2026-08-12 19:43:41 -07:00
2026-08-08 14:18:26 +05:30
2026-08-06 19:35:47 -06:00
2026-08-13 09:36:02 -07:00
2026-08-07 09:44:21 -07:00
2026-08-06 23:08:23 -05:00
2026-08-14 02:02:18 +05:30
2026-08-06 19:35:47 -06:00
2026-08-09 13:43:14 -07:00
2026-08-12 20:02:07 -07:00
2026-08-09 22:09:49 -04:00
2026-08-13 02:38:28 -07:00
2026-07-24 23:06:05 -07:00