Skip to content

Fix Stream DeliveryMode #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025
Merged

Conversation

sw-joelmut
Copy link
Collaborator

Description

This PR fixes an issue with the Stream DeliveryMode not being set correctly when the Agent1 sent a message to Agent2 using the Streamed functionality.

Detailed Changes

  • Send the correctly activity clone that sets the delivery mode to Stream.

Testing

The following image shows the Agent1 and Agent2 working.
image

@sw-joelmut sw-joelmut requested a review from a team as a code owner May 20, 2025 13:27
@github-actions github-actions bot added the ML: Core Tags changes to core libraries label May 20, 2025
Copy link
Contributor

@Copilot 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 corrects the delivery mode of streamed activities by passing the cloned activity into the streaming method rather than the original.

  • Ensure the cloned activity (with DeliveryMode.Stream) is used in the inner streaming call.
  • Prevents the bug where the original activity was sent without the proper delivery mode.
Comments suppressed due to low confidence (2)

src/libraries/Client/Microsoft.Agents.Client/HttpAgentClient.cs:187

  • Consider adding a unit test to verify that the DeliveryMode is set to Stream when using SendActivityStreamedAsync, to catch regressions early.
activityClone.DeliveryMode = DeliveryModes.Stream;

src/libraries/Client/Microsoft.Agents.Client/HttpAgentClient.cs:186

  • [nitpick] The variable name activityClone could be renamed to clonedActivity to align with common naming conventions and improve readability.
var activityClone = CreateSendActivity(agentConversationId, activity, relatesTo);

@tracyboehrer tracyboehrer merged commit fa5d1a6 into main May 23, 2025
8 checks passed
@tracyboehrer tracyboehrer deleted the southworks/fix/stream-deliverymode branch May 23, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ML: Core Tags changes to core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants