Skip to content

.NET: fix service-stored history provider resolution#6209

Open
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:fix/service-history-provider-session
Open

.NET: fix service-stored history provider resolution#6209
he-yufeng wants to merge 1 commit into
microsoft:mainfrom
he-yufeng:fix/service-history-provider-session

Conversation

@he-yufeng
Copy link
Copy Markdown
Contributor

Summary

  • skip the default chat history provider once a session is backed by a service conversation id
  • keep per-service-call history persistence working when it uses its sentinel conversation id
  • add a regression assertion that service-stored history does not populate the default in-memory provider

Fixes #6120.

To verify

  • dotnet test --project tests\Microsoft.Agents.AI.UnitTests\Microsoft.Agents.AI.UnitTests.csproj -f net10.0 -v Minimal --filter-class Microsoft.Agents.AI.UnitTests.ChatClientAgent_ChatHistoryManagementTests
  • dotnet test --project tests\Microsoft.Agents.AI.UnitTests\Microsoft.Agents.AI.UnitTests.csproj -f net472 -v Minimal --filter-class Microsoft.Agents.AI.UnitTests.ChatClientAgent_ChatHistoryManagementTests
  • dotnet format agent-framework-dotnet.slnx --verify-no-changes --no-restore --include src\Microsoft.Agents.AI\ChatClient\ChatClientAgent.cs tests\Microsoft.Agents.AI.UnitTests\ChatClient\ChatClientAgent_ChatHistoryManagementTests.cs
  • git diff --check

Copilot AI review requested due to automatic review settings May 30, 2026 15:12
@moonbox3 moonbox3 added the .NET label May 30, 2026
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]: InMemoryChatHistoryProvider used even when service stores history (OpenAI Responses)

2 participants