Skip to content

Fix streaming aggregation issues#47

Merged
Stephen Belanger (Qard) merged 2 commits intomainfrom
fix/streaming-aggregation-issues
May 5, 2026
Merged

Fix streaming aggregation issues#47
Stephen Belanger (Qard) merged 2 commits intomainfrom
fix/streaming-aggregation-issues

Conversation

@Qard
Copy link
Copy Markdown
Contributor

Summary

  • fix streaming usage alias handling so maps to prompt tokens and maps to completion tokens
  • aggregate streamed tool calls across chat completion deltas into final output
  • preserve detailed streaming usage metrics including token detail breakdowns and prediction token counts
  • add focused tests covering aliases, tool call aggregation, and detailed usage extraction

Testing

running 7 tests
test stream::tests::skips_keep_alive_markers ... ok
test stream::tests::aggregates_detailed_usage_from_final_chunk ... ok
test stream::tests::aggregates_content_from_streaming_values ... ok
test stream::tests::aggregates_usage_with_input_output_token_aliases ... ok
test stream::tests::aggregates_usage_from_final_chunk ... ok
test stream::tests::caches_finalized_result ... ok
test stream::tests::aggregates_tool_calls_from_streaming_values ... ok

test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 139 filtered out; finished in 0.00s

Fixes #41
Fixes #30
Fixes #32

@Qard Stephen Belanger (Qard) merged commit 9e0941b into main May 5, 2026
2 checks passed
@Qard Stephen Belanger (Qard) deleted the fix/streaming-aggregation-issues branch May 5, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants