Skip to content

Conversation

@lokitoth
Copy link
Member

@lokitoth lokitoth commented Nov 3, 2025

Motivation and Context

We updated the aggregation logic for AIAgent's outgoing ChatMessages in #1439; this changes the messages that get received by the aggregating executor in the sample from ChatMessage to List<ChatMessage>, which was resulting in their getting dropped when going across the edge (except in telemetry).

Description

The fix is to update the ConcurrentAggregatingExecutor to process List<ChatMessage>. In the long run, the proper fix is to ensure that (1) fan-in properly understands ChatProtocol via different reduction strategies, and (2) to make the output for hosted AIAgent more configurable - both in the streaming and non-streaming case.

This fixes the immediate problem that has been driving issues, but the underlying need to make FanIn more configurable so it can work well with ChatProtocol still remains.

Relevant issues:
Closes #1863
Closes #1805

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings November 3, 2025 17:44
@github-actions github-actions bot changed the title fix: Update Concurrent sample for changes to message aggregation .NET: fix: Update Concurrent sample for changes to message aggregation Nov 3, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the concurrent workflow sample to rename the aggregation executor and change its message handling signature from single ChatMessage to List<ChatMessage>.

Key changes:

  • Renamed ConcurrentAggregationExecutor to ConcurrentEndExecutor for consistency with the internal framework implementation
  • Updated the executor's generic type parameter from ChatMessage to List<ChatMessage> to properly handle batched messages
  • Changed the message handling logic from Add to AddRange to accommodate the new list-based input

@lokitoth lokitoth force-pushed the dev/dotnet_workflow/fix_concurrent_workflow_sample branch from 61a0141 to 62fc736 Compare November 3, 2025 18:20
@lokitoth
Copy link
Member Author

lokitoth commented Nov 3, 2025

Pulled into #1612

@lokitoth lokitoth closed this Nov 3, 2025
@crickman crickman deleted the dev/dotnet_workflow/fix_concurrent_workflow_sample branch November 11, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET & Python: Conditional & Switch-Case Edges Evaluation During Streaming .NET: Fan-in issue

4 participants