diff --git a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs index b584ce7983..11b0dbc62b 100644 --- a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs +++ b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs @@ -333,6 +333,8 @@ internal static ResumeSessionConfig CopyResumeSessionConfig(SessionConfig? sourc { Model = source?.Model, ReasoningEffort = source?.ReasoningEffort, + ReasoningSummary = source?.ReasoningSummary, + ContextTier = source?.ContextTier, Tools = source?.Tools, SystemMessage = source?.SystemMessage, AvailableTools = source?.AvailableTools, diff --git a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs index 25316d4705..fc073b7b69 100644 --- a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs @@ -169,6 +169,8 @@ public void CopyResumeSessionConfig_CopiesAllProperties() { Model = "gpt-4o", ReasoningEffort = "high", + ReasoningSummary = ReasoningSummary.Detailed, + ContextTier = ContextTier.LongContext, Tools = tools, SystemMessage = systemMessage, AvailableTools = ["tool1", "tool2"], @@ -189,6 +191,8 @@ public void CopyResumeSessionConfig_CopiesAllProperties() // Assert Assert.Equal("gpt-4o", result.Model); Assert.Equal("high", result.ReasoningEffort); + Assert.Equal(ReasoningSummary.Detailed, result.ReasoningSummary); + Assert.Equal(ContextTier.LongContext, result.ContextTier); Assert.Same(tools, result.Tools); Assert.Same(systemMessage, result.SystemMessage); Assert.Equal(["tool1", "tool2"], result.AvailableTools); @@ -213,6 +217,8 @@ public void CopyResumeSessionConfig_WithNullSource_ReturnsDefaults() // Assert Assert.Null(result.Model); Assert.Null(result.ReasoningEffort); + Assert.Null(result.ReasoningSummary); + Assert.Null(result.ContextTier); Assert.Null(result.Tools); Assert.Null(result.SystemMessage); Assert.Null(result.OnPermissionRequest); @@ -223,6 +229,26 @@ public void CopyResumeSessionConfig_WithNullSource_ReturnsDefaults() Assert.True(result.Streaming); } + [Fact] + public void CopyResumeSessionConfig_RoundTripsReasoningSummary() + { + // Regression: ReasoningSummary controls whether the model returns readable + // extended-thinking summaries. It must round-trip onto resumed turns, just like + // ReasoningEffort, otherwise callers lose readable reasoning after the first turn. + var source = new SessionConfig + { + ReasoningEffort = "high", + ReasoningSummary = ReasoningSummary.Detailed, + }; + + // Act + ResumeSessionConfig result = GitHubCopilotAgent.CopyResumeSessionConfig(source); + + // Assert + Assert.Equal(ReasoningSummary.Detailed, result.ReasoningSummary); + Assert.Equal("high", result.ReasoningEffort); + } + [Fact] public void CopySessionConfig_WithStreamingDisabled_PreservesStreamingValue() {