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
{{ message }}
Repository navigation
[Bug]: TPS can be misleading when the first effective output arrives late or output is buffered #3672
The chat TPS indicator can report an implausibly high "Average output" rate when the first effective output event arrives late or the provider buffers output. The numerator is the provider-reported output token count for the whole turn, while the denominator sums only streamDurationMs - firstVisibleOutputMs for each round. That can omit most of the time during which the model generated output.
Reproduction or evidence
Observed on OpenBitFun 1.0.8 (cbe1fb8972b22609fcd2f5d7fc1ac703e18b1d2d) with a Responses-compatible model, across six model calls in one turn:
The value is reproducible from the saved round timing fields. The 362.4K token badge for this turn is total input plus output (362,396), not the output numerator.
Expected behavior
Please clarify or adjust the metric so it is not presented as model generation speed when the client only measures post-first-event stream receipt. A provider that buffers deltas can make receipt speed differ sharply from decode speed. Consider labeling it as observed post-first-event throughput, or only reporting model TPS when token counts and timing cover the same output scope. If timing or usage breakdown is unavailable, suppress the speed value or mark it approximate.
The Responses usage adapter also currently keeps aggregate output_tokens but does not deserialize output_tokens_details.reasoning_tokens into the unified usage model. If a gateway includes hidden reasoning in aggregate output usage, those tokens can be in the numerator while their generation happens before the first visible event. I could not verify whether the gateway used for this observation returned that breakdown, so I am not claiming the 2,479-token count itself is wrong.
Activity