You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(llm): parse DeepSeek cache metrics + honest 'n/a' when unreported
The Telegram stats line showed 'cache: 0 write / 0 read / 0 total' on
every turn. Two issues:
1. odek parsed Anthropic (cache_creation/read_input_tokens) and OpenAI
(prompt_tokens_details.cached_tokens) cache fields, but not
DeepSeek's native prompt_cache_hit_tokens / prompt_cache_miss_tokens,
which many DeepSeek endpoints and gateways return INSTEAD of the
OpenAI-style details. DeepSeek hits now map to cache read, misses to
cache write (DeepSeek caches missed prefixes automatically).
2. Zeros were displayed even when the provider returned NO cache
metrics at all, falsely implying caching ran and missed. A new
CacheReported flag (llm.CallResult -> loop totals -> IterationInfo)
distinguishes 'no data' from '0 tokens', and the Telegram stats line
now shows 'cache: n/a (provider reports no cache metrics)' instead of
fake zeros.
0 commit comments