Skip to content

.NET: [Bug]: CopySessionConfig() hardcodes Streaming = true, ignoring SessionConfig.Streaming value#4775

Open
feiyun0112 wants to merge 3 commits intomicrosoft:mainfrom
feiyun0112:issues/4732
Open

.NET: [Bug]: CopySessionConfig() hardcodes Streaming = true, ignoring SessionConfig.Streaming value#4775
feiyun0112 wants to merge 3 commits intomicrosoft:mainfrom
feiyun0112:issues/4732

Conversation

@feiyun0112
Copy link

fix #4732

Note

since the default value of SessionConfig.Streaming is false, after this change, all instances creating a new SessionConfig must explicitly set Streaming = true. This will affect existing code that is already in use.

Copilot AI review requested due to automatic review settings March 19, 2026 04:03
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

Fixes GitHub Copilot agent session config copying to respect the caller-provided SessionConfig.Streaming value (instead of hardcoding streaming on), aligning the .NET GitHub Copilot provider with SessionConfig semantics and unblocking scenarios where streaming must be disabled (issue #4732).

Changes:

  • Update GitHubCopilotAgent.CopySessionConfig to copy Streaming from the source config.
  • Update GitHubCopilotAgent.CopyResumeSessionConfig to preserve source.Streaming (defaulting to true only when source is null).
  • Extend unit tests to cover Streaming=true in existing copy tests and add new tests asserting Streaming=false is preserved.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs Preserve Streaming when copying session configs; update XML docs accordingly.
dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs Add/adjust unit tests to validate Streaming preservation behavior in copy helpers.

feiyun0112 and others added 2 commits March 19, 2026 07:03
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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: [Bug]: CopySessionConfig() hardcodes Streaming = true, ignoring SessionConfig.Streaming value

3 participants