diff --git a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs index 053a08f725..e25548cd54 100644 --- a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs +++ b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs @@ -291,6 +291,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 944f2f30ab..887edf4636 100644 --- a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs @@ -167,6 +167,8 @@ public void CopyResumeSessionConfig_CopiesAllProperties() { Model = "gpt-4o", ReasoningEffort = "high", + ReasoningSummary = ReasoningSummary.Detailed, + ContextTier = ContextTier.LongContext, Tools = tools, SystemMessage = systemMessage, AvailableTools = ["tool1", "tool2"], @@ -187,6 +189,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(new List { "tool1", "tool2" }, result.AvailableTools); @@ -211,6 +215,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); @@ -221,6 +227,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 ConvertToAgentResponseUpdate_AssistantMessageEvent_DoesNotEmitTextContent() {