- Anthropic system prompt sent as a cacheable content block (cache_control: ephemeral) so repeated turns reuse the cached prefix - Parse cache_read_input_tokens and cache_creation_input_tokens from Anthropic message_start; parse cached_tokens from OpenAI prompt_tokens_details - Normalise Usage so CachedInputTokens is always excluded from InputTokens regardless of provider - computeCostUSD now takes backend.Usage and applies correct cache discounts: 10% read / 125% creation for Anthropic, 50% read for OpenAI - Session tracks TotalCachedInputTokens / TotalCacheCreationTokens; /usage shows cached token count when non-zero Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| commands.go | ||
| core.go | ||
| core_test.go | ||
| cost.go | ||
| fifo_test.go | ||
| hooks.go | ||
| loop.go | ||
| prompt_resolver.go | ||
| session.go | ||
| state.go | ||
| types.go | ||
| waitchange_test.go | ||