Skip to content

fix(schema): preserve Extra fields when merging message parts during stream concatenation - #855

Merged
JonXSnow merged 1 commit into
mainfrom
fix/messageOutPartExtra
Mar 11, 2026
Merged

fix(schema): preserve Extra fields when merging message parts during stream concatenation#855
JonXSnow merged 1 commit into
mainfrom
fix/messageOutPartExtra

Conversation

@JonXSnow

Copy link
Copy Markdown
Contributor
  • mergeTextParts: collect and merge Extra from all MessageOutputPart chunks
  • mergeReasoningParts: collect and merge Extra from all MessageOutputPart chunks
  • mergeAudioParts: merge outer MessageOutputPart.Extra in addition to inner Audio.Extra
  • mergeTextPartsInChunk: collect and merge Extra from ToolOutputPart text chunks in ConcatToolResults
  • Add test cases covering Extra merging for text, reasoning, audio (outer), and tool output parts

@JonXSnow
JonXSnow force-pushed the fix/messageOutPartExtra branch from 1836c05 to 21b5912 Compare March 10, 2026 11:55
@codecov

codecov Bot commented Mar 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.75862% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.58%. Comparing base (04d2ae0) to head (d15e756).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
schema/message.go 82.75% 9 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #855      +/-   ##
==========================================
+ Coverage   81.56%   81.58%   +0.02%     
==========================================
  Files         146      146              
  Lines       15932    15994      +62     
==========================================
+ Hits        12995    13049      +54     
- Misses       1995     1997       +2     
- Partials      942      948       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread schema/message.go Outdated
Comment thread schema/message.go
@JonXSnow
JonXSnow force-pushed the fix/messageOutPartExtra branch 2 times, most recently from b7b30f9 to 5e5056c Compare March 10, 2026 13:40
Comment thread schema/message.go Outdated
Comment thread schema/message.go Outdated
…stream concatenation

- mergeTextParts: collect and merge Extra from all MessageOutputPart chunks
- mergeReasoningParts: collect and merge Extra from all MessageOutputPart chunks
- mergeAudioParts: merge outer MessageOutputPart.Extra in addition to inner Audio.Extra
- mergeTextPartsInChunk: collect and merge Extra from ToolOutputPart text chunks in ConcatToolResults
- Add test cases covering Extra merging for text, reasoning, audio (outer), and tool output parts
@JonXSnow
JonXSnow force-pushed the fix/messageOutPartExtra branch from 5e5056c to d15e756 Compare March 10, 2026 14:08
@JonXSnow
JonXSnow merged commit 9b3e344 into main Mar 11, 2026
19 checks passed
@JonXSnow
JonXSnow deleted the fix/messageOutPartExtra branch March 11, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants