Skip to content

feat: decompose the token "in" headline into fresh vs cached#9

Closed
wan-huiyan wants to merge 1 commit into
dioptx:mainfrom
wan-huiyan:upstream/token-fresh-cached
Closed

feat: decompose the token "in" headline into fresh vs cached#9
wan-huiyan wants to merge 1 commit into
dioptx:mainfrom
wan-huiyan:upstream/token-fresh-cached

Conversation

@wan-huiyan
Copy link
Copy Markdown

Adds an Input X new · Y cached line splitting freshly-billed input (input + cache_creation) from cache reads (cache_read), so the cost line is interpretable when the "in" total is ~97% cheap cache reads. Single-session + live views; headline total unchanged. +2 tests; tsc clean.

Supersedes #5 (which accidentally accumulated unrelated commits when fork-main was merged into its shared branch; re-created clean on a dedicated branch). 🤖 Generated with Claude Code

The "NN in" headline sums input + cache_read + cache_creation, which on a
long multi-turn session is ~97% cheap cache_read — so a user sees an alarming
"37M in / $80" without realizing almost none of it is freshly-billed input.

Add an `Input  X new · Y cached` line that splits freshly-billed input
(input + cache_creation, at $15/M + $18.75/M) from cache reads ($1.50/M), so
the cost line is interpretable. Single-session and live views; +2 tests. 89 pass.
@wan-huiyan
Copy link
Copy Markdown
Author

Consolidated into #11 (token accounting: dedupe fallback + fresh-vs-cached).

@wan-huiyan wan-huiyan closed this May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant