Uh oh!
There was an error while loading. Please reload this page.
feat: display tokens per second for assistant messages - #5497
Conversation
Track firstToken timestamp when streaming begins and display tok/s rate next to response duration for completed text responses. - Add firstToken timestamp to AssistantMessage.time schema - Track first/last output delta timestamps during streaming - Accumulate tokens instead of overwriting for multi-part responses - New utility module with calculateTokensPerSecond validation - Minimum 250ms elapsed time threshold to avoid noisy metrics - Comprehensive test coverage for token utilities Closes#5374
edlsh
commented
Dec 14, 2025
haltingstate
commented
Dec 24, 2025
Is this merged yet? |
SohaibTaqat
commented
Dec 28, 2025
we need this!! |
edlsh
commented
Dec 29, 2025
No not merged yet. @rekram1-node 😁 |
0pilatos0
commented
Jan 9, 2026
Would love to see this merged, +1 |
f1ae801 to
08fa7f7CompareMrHaila
commented
Jan 31, 2026
+1 on possibly getting this merged. Would be a highly interesting metric to follow while evaluating providers and I don't think the added information density hurts usability since there's very little to do while waiting for inference. |
JohnCode-Dev
commented
Feb 10, 2026
Hey @edlsh — nice work on the original implementation here, this was a great reference. Since this one's been sitting with merge conflicts for a while, I went ahead and reimplemented it cleanly on current Full credit for pioneering this — just wanted to get it across the finish line since a few people have been asking for it. If you get a chance, would appreciate your eyes on the new PR! |

Summary
Implements tokens/second display for assistant messages per #5374.
Changes
firstTokentimestamp when streaming beginstok/srate next to response duration (only for completed text responses)Notes
If styling is not the direction the team wants to take, I'm happy to make revisions or move the display to a different location.
Closes#5374