-
Notifications
You must be signed in to change notification settings - Fork 40
feat: Read Anthropic's thinking_tokens and surface reasoning spend in abctl #1114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
huang195
merged 24 commits into
rossoctl:main
from
huang195:feat/anthropic-thinking-tokens
Sep 24, 2026
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
4e29888
fix: Read Anthropic's thinking_tokens into the reasoning counter
huang195 b3ec965
feat: Show reasoning spend in abctl's tier panel and detail pane
huang195 3c8fd1f
chore: Regenerate the README demo asset for the reasoning row
huang195 2996665
fix: Address review — couple reasoning's value to its presence bit
huang195 74dea02
fix: Review round 2 — a dead assertion, a lost ceiling, a dead clamp
huang195 d55075e
fix: Review round 3 — $0.00 for a reported split, and the untested bu…
huang195 0616001
fix: Review round 4 — three more assertions that could not fail
huang195 a5598f6
fix: Review round 5 — a narrow-terminal regression, and one place for…
huang195 98b8ac3
fix: Review round 6 — negative money escaped ApportionReasoning with …
huang195 7835205
fix: Review round 7 — the max wrapper put back the panic the min prev…
huang195 dafb18e
fix: Review round 8 — mirror the pointer on the OpenAI path, and trim
huang195 e40413a
fix: Review round 9 — the narrow-terminal fix was never tested
huang195 f0aeaca
fix: Review round 10 — the height floor never followed the drawer's g…
huang195 f6f9e84
fix: Review round 11 — pin the rank search and the README's threshold
huang195 422bf93
fix: Review round 12 — the README pin could not detect the drift it w…
huang195 ad100b5
fix: Review round 13 — two more self-comparisons, and mark the child …
huang195 8d1cc5e
fix: Review round 14 — a reported zero is a measurement, not an absence
huang195 31cecea
fix: Self-review caught a misaligned reported-zero row
huang195 50782a5
fix: Review round 15 — three classes swept, not six locations
huang195 8068d48
refactor: Trim out-of-scope changes — one provider, one claim
huang195 5733b7c
test: Fold the drawer's adjacency check into the orphan-glyph test
huang195 e9ddc89
test: Collapse the child cell's six states into one truth table
huang195 94c6739
fix: Restore three files the scope trim wrongly removed
huang195 d9a20fa
fix: Review round 16 — pin the drawer's height floor, and show a meas…
huang195 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion — the new max-seen merge for reasoning has no fixture that would catch its removal.
Every streaming fixture carries at most one non-zero
thinking_tokens:948in the non-streaming test, and119here and inThinkingTokensOnMessageStart— two different tests, never two competing deltas within one stream. So replacingwith a plain assignment passes the entire suite.
Worth closing precisely because coupling the value to its presence bit in
mergeAnthropicUsageMaxSeenwas the round-4 fix — the mechanism the signature change exists for is the one part of it no fixture pins. A stream with twomessage_deltaframes carrying119then205(asserting205) would pin last-wins; a descending pair would additionally witness the max direction, which is the half a cumulative-looking counter hides.