Skip to content

.NET: Add regression test for AzureAI Foundry conversation ID semantics#4755

Open
brandonh-msft wants to merge 2 commits intomicrosoft:mainfrom
brandonh-msft:copilot/add-unit-test-for-4752
Open

.NET: Add regression test for AzureAI Foundry conversation ID semantics#4755
brandonh-msft wants to merge 2 commits intomicrosoft:mainfrom
brandonh-msft:copilot/add-unit-test-for-4752

Conversation

@brandonh-msft
Copy link

@brandonh-msft brandonh-msft commented Mar 18, 2026

This pull request adds a new unit test to ensure that a newly created Azure AI session exposes a durable Foundry conversation ID after the first run, rather than a response-chain ID. This helps verify correct behavior in session management for chat clients.

Testing improvements:

  • Added a test ChatClient_UsesFoundryConversationId_ForNewSessionsAsync in AzureAIProjectChatClientTests.cs to verify that new sessions use a durable Foundry conversation ID after the first run, ensuring session IDs are managed correctly.

For #4752

Motivation and Context

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible

Co-authored-by: brandonh-msft <20270743+brandonh-msft@users.noreply.github.com>

For microsoft#4752
Copilot AI review requested due to automatic review settings March 18, 2026 03:48
@github-actions github-actions bot changed the title Add regression test for AzureAI Foundry conversation ID semantics .NET: Add regression test for AzureAI Foundry conversation ID semantics Mar 18, 2026
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

Adds a regression test to the AzureAI adapter unit tests to validate that newly created sessions expose a durable Azure AI Foundry conv_* conversation identifier after the first run (vs. a resp_* response-chain identifier), addressing the scenario described in #4752.

Changes:

  • Added ChatClient_UsesFoundryConversationId_ForNewSessionsAsync to assert new-session conversation ID behavior after the first run.

assert not null on the conv id as well

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.

4 participants