Teknium
03c0b00f45
fix(usage): read DeepSeek's native prompt_cache_hit_tokens cache field ( #65678 )
...
DeepSeek's own API (api.deepseek.com) reports context-cache hits as
top-level usage.prompt_cache_hit_tokens / prompt_cache_miss_tokens
(prompt_tokens = hit + miss), not the OpenAI nested
prompt_tokens_details.cached_tokens shape. Neither normalize_usage()
nor the chat_completions transport's extract_cache_stats() read those
fields, so direct DeepSeek sessions always showed 0 cache-hit tokens:
invisible in accounting, mis-billed at the full input rate, and 0%
cache display.
Both layers now fall back to prompt_cache_hit_tokens when the nested
shape is absent; the nested value wins when both are present (proxies).
Fixes #61871 .
2026-07-16 07:29:53 -07:00
..
2026-07-16 07:29:53 -07:00
2026-07-14 03:23:19 -07:00
2026-07-16 07:28:07 -07:00
2026-07-06 12:46:20 -07:00
2026-07-15 07:47:18 -07:00
2026-07-16 04:23:12 -07:00
2026-07-16 04:23:12 -07:00
2026-07-06 12:46:20 -07:00
2026-07-05 19:23:26 -07:00
2026-07-15 09:59:38 -07:00
2026-07-08 01:51:05 +05:30
2026-07-07 14:54:50 +05:30
2026-07-06 12:46:20 -07:00
2026-07-15 09:47:37 -07:00
2026-07-15 04:55:48 -07:00
2026-07-14 02:19:40 +05:30
2026-07-11 22:59:49 +05:30
2026-07-14 00:14:55 +05:30
2026-07-15 12:28:09 -07:00
2026-07-14 02:19:40 +05:30
2026-07-08 11:56:17 -07:00
2026-07-15 09:47:04 -07:00
2026-07-16 14:34:03 +05:30
2026-07-14 02:19:40 +05:30
2026-07-14 17:09:40 +05:30
2026-07-13 23:20:48 +05:30
2026-07-16 06:14:56 -07:00
2026-07-12 03:00:53 -07:00
2026-07-07 14:54:50 +05:30
2026-07-12 23:07:02 -07:00
2026-07-11 11:07:34 +05:30
2026-07-10 18:32:32 +05:30
2026-07-12 23:30:52 -07:00
2026-07-10 19:14:06 +05:30
2026-07-10 19:14:06 +05:30
2026-07-16 00:27:39 +05:30
2026-07-16 00:18:38 -07:00
2026-07-13 22:26:19 -07:00
2026-07-11 05:59:42 -07:00
2026-07-14 16:47:33 +05:30
2026-07-16 14:34:03 +05:30
2026-07-09 03:21:54 +05:30
2026-07-15 00:11:04 -07:00
2026-07-09 14:08:44 +05:30
2026-07-09 19:57:43 -07:00
2026-07-09 21:10:07 -07:00
2026-07-08 06:18:18 -07:00
2026-07-16 01:13:43 -07:00
2026-07-09 14:08:44 +05:30
2026-07-16 04:32:23 -07:00
2026-07-09 14:35:14 +05:30
2026-07-10 05:41:59 -05:00
2026-07-09 15:04:14 +05:30
2026-07-11 05:41:58 -07:00
2026-07-16 04:32:23 -07:00
2026-07-16 07:28:07 -07:00
2026-07-14 16:41:21 +05:30
2026-07-09 02:41:24 +05:30
2026-07-15 00:10:22 -07:00
2026-07-16 04:32:23 -07:00
2026-07-16 01:07:29 +05:30
2026-07-11 05:41:58 -07:00
2026-07-11 05:41:58 -07:00
2026-07-07 15:12:49 -07:00
2026-07-14 02:59:39 +05:30
2026-07-14 03:32:45 +05:30
2026-07-14 03:32:46 +05:30
2026-07-10 11:53:58 +05:30
2026-07-16 04:56:10 -07:00
2026-07-16 04:23:12 -07:00
2026-07-16 04:23:12 -07:00
2026-07-16 07:29:53 -07:00
2026-07-12 04:32:52 -07:00
2026-07-14 02:59:39 +05:30