.NET: coalesce AG-UI text completions#6048
Conversation
63cf392 to
36d9494
Compare
|
Rebased on current Validated locally: dotnet build .\tests\Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests\Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests.csproj -f net10.0 -c Debug --tl:off
dotnet test --project .\tests\Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests\Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests.csproj -f net10.0 -c Debug --no-build -v Normal --report-xunit-trx --ignore-exit-code 8 -- --filter-class Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests.ChatResponseUpdateAGUIExtensionsTests
git diff --check upstream/main...HEADResult: the targeted test class passed after the conflict resolution. |
|
Rebased onto current Validation on Windows: Note: because this repo's |
36d9494 to
099d57a
Compare
099d57a to
06bf735
Compare
|
Updated this to avoid keeping a text message open across tool events. The converter now closes the current I also changed the regression test to assert the wire order directly: Validation on Windows: |
|
Friendly ping: this has two approvals and the latest CI/merge-gatekeeper run is green. Please let me know if there is any remaining AG-UI concern before merge. |
There was another test failing during merge, which I think was unrelated. Trying the merge again. |
|
This one has been green and approved for a few weeks now. Anything still blocking the merge, or is it just waiting in the queue? |
|
@he-yufeng there is an integration test failing: |
|
Thanks @moonbox3, good catch. I looked into it and the failure is a real consequence of this PR, not flaky.
The wrinkle is that this is the exact shape #6010 wants coalesced. The issue's own repro ( My read is that the integration test encodes the pre-#6010 behavior and should move to the coalesced contract: one text message, content preserved in order, still split whenever the role changes or a tool call/result lands between (the unit test in this PR already covers those boundaries). I'm happy to rebase onto main and push that test update now. If you'd rather keep multi-message turns distinct on the AG-UI surface, then #6010 needs a narrower fix, probably where the provider hands out a fresh MessageId per completion above AG-UI, and I'll close this in favor of that. Tell me which way you'd like to go and I'll turn it around. |
Fixes #6010.
Summary
ChatResponseUpdate.MessageIdper completion.Validation
dotnet build dotnet\tests\Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests\Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests.csproj --no-restore --tl:offdotnet dotnet\tests\Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests\bin\Debug\net10.0\Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests.dll --filter-class Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests.ChatResponseUpdateAGUIExtensionsTests --timeout 2mdotnet format dotnet\agent-framework-dotnet.slnx --verify-no-changes --include dotnet\src\Microsoft.Agents.AI.AGUI\Shared\ChatResponseUpdateAGUIExtensions.cs dotnet\tests\Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests\ChatResponseUpdateAGUIExtensionsTests.cs --no-restore --verbosity minimalgit diff --check