.NET: [BREAKING] Update providers in such a way that they can participate in a pipeline (#3846)

* Make providers pipeline capable

* Fix unit tests

* Move source stamping to providers from base class

* Also update samples.

* Address PR comments

* Rename AsAgentRequestMessageSourcedMessage to WithAgentRequestMessageSource
This commit is contained in:
westey
2026-02-11 16:24:37 +00:00
committed by GitHub
parent 65f7aff145
commit 1d158c24be
25 changed files with 332 additions and 549 deletions
@@ -3135,7 +3135,7 @@ public sealed class AzureAIProjectChatClientExtensionsTests
{
protected override ValueTask<AIContext> InvokingCoreAsync(InvokingContext context, CancellationToken cancellationToken = default)
{
return new ValueTask<AIContext>(new AIContext());
return new ValueTask<AIContext>(context.AIContext);
}
}
@@ -3146,7 +3146,7 @@ public sealed class AzureAIProjectChatClientExtensionsTests
{
protected override ValueTask<IEnumerable<ChatMessage>> InvokingCoreAsync(InvokingContext context, CancellationToken cancellationToken = default)
{
return new ValueTask<IEnumerable<ChatMessage>>(Array.Empty<ChatMessage>());
return new ValueTask<IEnumerable<ChatMessage>>(context.RequestMessages);
}
protected override ValueTask InvokedCoreAsync(InvokedContext context, CancellationToken cancellationToken = default)