Skip to content

.Net: Allow Kernel to be mutable by AgentChatCompletions - #12538

Merged
Roger Barreto (rogerbarreto) merged 9 commits into
microsoft:mainfrom
rogerbarreto:issues/12534-fix-agent-kernel-mutability
Jun 25, 2025
Merged

Roger Barreto (rogerbarreto) merged 9 commits into
microsoft:mainfrom
rogerbarreto:issues/12534-fix-agent-kernel-mutability

Conversation

@rogerbarreto

Copy link
Copy Markdown
Member

Motivation and Context

@rogerbarreto
Roger Barreto (rogerbarreto) requested a review from a team as a code owner June 19, 2025 12:42
@markwallace-microsoft Mark Wallace (markwallace-microsoft) added the .NET Issue or Pull requests regarding .NET code label Jun 19, 2025
@rogerbarreto
Roger Barreto (rogerbarreto) added this pull request to the merge queue Jun 20, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 20, 2025
@rogerbarreto
Roger Barreto (rogerbarreto) added this pull request to the merge queue Jun 20, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 20, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 21, 2025
@markwallace-microsoft

Copy link
Copy Markdown
Contributor

Roger Barreto (@rogerbarreto) is this integration test failure related to your changes?

[xUnit.net 00:05:48.23]     SemanticKernel.IntegrationTests.Connectors.AzureOpenAI.AzureOpenAIChatClientRequiredFunctionChoiceBehaviorTests.SpecifiedInPromptInstructsConnectorToInvokeKernelFunctionAutomaticallyAsync [FAIL]
[xUnit.net 00:05:48.23]       Polly.Timeout.TimeoutRejectedException : The operation didn't complete within the allowed timeout of '00:00:30'.
[xUnit.net 00:05:48.23]       ---- System.Threading.Tasks.TaskCanceledException : The operation was canceled.
[xUnit.net 00:05:48.23]       -------- System.IO.IOException : Unable to read data from the transport connection: Operation canceled.
[xUnit.net 00:05:48.23]       ------------ System.Net.Sockets.SocketException : Operation canceled

@rogerbarreto

Copy link
Copy Markdown
Member Author

Mark Wallace (@markwallace-microsoft) This is unrelated error, I tried to run against my local configuration in Azure IT tests and passed as expected.

image

@rogerbarreto
Roger Barreto (rogerbarreto) added this pull request to the merge queue Jun 24, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 24, 2025
@rogerbarreto
Roger Barreto (rogerbarreto) added this pull request to the merge queue Jun 24, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 24, 2025
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 25, 2025
@markwallace-microsoft Mark Wallace (markwallace-microsoft) added the kernel Issues or pull requests impacting the core kernel label Jun 25, 2025
@rogerbarreto

Copy link
Copy Markdown
Member Author

@microsoft-github-policy-service agree company="Microsoft"

@rogerbarreto
Roger Barreto (rogerbarreto) added this pull request to the merge queue Jun 25, 2025
Merged via the queue into microsoft:main with commit cb74902 Jun 25, 2025
@rogerbarreto
Roger Barreto (rogerbarreto) deleted the issues/12534-fix-agent-kernel-mutability branch June 25, 2025 11:08
jcruzmot-te pushed a commit to thousandeyes/aia-semantic-kernel that referenced this pull request Sep 15, 2025
…2538)

### Motivation and Context

- Fixes microsoft#12534 

- This regression seems to be part of microsoft#11689 where `kernel` instance was
is cloned prior agent iterations, as I didn't captured any failing unit
tests for the added `AIContext` providers considering this as a valid
fix.

- Added UT covering the expected `Kernel` mutability.

---------

Co-authored-by: westey <[email protected]>

This branch was previously deployed

1 inactive deployment
integration — ba0fb731 Deployed Jun 25, 2025 by rogerbarreto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.Net: Bug: Kernel.Data no longer retains information across plugins since v1.54

5 participants