Add Anthropic support to Advanced Paste - #50268
Draft
Sthitadhi Maity (Sthitadhi1) wants to merge 5 commits into
Draft
Add Anthropic support to Advanced Paste#50268Sthitadhi Maity (Sthitadhi1) wants to merge 5 commits into
Sthitadhi Maity (Sthitadhi1) wants to merge 5 commits into
Conversation
This commit adds a test to verify that `SemanticKernelPasteProvider.CreateExecutionSettings()` does not set the `ReasoningEffort` property on `OpenAIPromptExecutionSettings` for OpenAI configurations, which caused an HTTP 400 on models that don't support it. Co-authored-by: Sthitadhi1 <137975462+Sthitadhi1@users.noreply.github.com>
…fort-test-12006183165712339204 Add regression test for microsoft#49838 to ensure ReasoningEffort is not hardcoded for OpenAI models
* Introduce `AIServiceType.Anthropic` and `AnthropicPasteProvider` powered by the official `Anthropic` SDK. * Integrate into settings UI, preserving compatibility with Semantic Kernel providers. * Support GPO configurations for Anthropic. Co-authored-by: Sthitadhi1 <137975462+Sthitadhi1@users.noreply.github.com>
* Introduce `AIServiceType.Anthropic` and `AnthropicPasteProvider` powered by the official `Anthropic` SDK using the `IChatClient` abstraction. * Integrate into Settings UI (Strings, Icons, Default Model). * Add GPO configurations for Anthropic in the C++ layer and expose to WinRT securely. Co-authored-by: Sthitadhi1 <137975462+Sthitadhi1@users.noreply.github.com>
* Introduce `AIServiceType.Anthropic` and `AnthropicPasteProvider` powered by the official `Anthropic` SDK using the `IChatClient` abstraction. * Integrate into Settings UI (Strings, Icons, Default Model). * Add GPO configurations for Anthropic in the C++ layer and expose to WinRT securely. Co-authored-by: Sthitadhi1 <137975462+Sthitadhi1@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
|
Hi Sthitadhi Maity (@Sthitadhi1),
I have to ask: have you built this locally and tested the change yourself? |
Mike Griese (zadjii-msft)
requested changes
Sep 1, 2026
Mike Griese (zadjii-msft)
left a comment
Member
There was a problem hiding this comment.
What the hell is the number in this PR title?
You'll need to force push these commits without attribution to a language model. Humans are responsible for maintaining this codebase, not machines.
We will close this with prejudice if there's no visual evidence you ran this locally.
Sthitadhi Maity (Sthitadhi1)
marked this pull request as draft
September 2, 2026 13:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary of the Pull Request
Adds official support for Anthropic (Claude) to Advanced Paste with AI. It introduces an
AnthropicPasteProviderusing the officialAnthropicC# SDK rather than forcing Claude traffic through Semantic Kernel's OpenAI compatibility layer, ensuring native message/content semantics are preserved.PR Checklist
Detailed Description of the Pull Request / Additional comments
I initially considered routing Anthropic through
Microsoft.SemanticKernel.Connectors.OpenAIusing Claude's OpenAI-compatible endpoint, but after checking the current Anthropic/Semantic Kernel ecosystem, I think a native Anthropic provider is a better fit.Anthropic now provides an official C#
AnthropicSDK withIChatClientintegration. Semantic Kernel still does not provide a first-party .NET Anthropic connector, and Anthropic's OpenAI compatibility layer is intended primarily for compatibility/testing and does not expose the full Claude API surface.For Paste with AI, I propose keeping
SemanticKernelPasteProviderfocused on providers with native Semantic Kernel connectors and adding a dedicatedAnthropicPasteProviderbacked by the officialAnthropicpackage. This lets us map the existingPasteAIRequestdirectly to Claude's native Messages API (viaIChatClientabstraction), including the current text/image clipboard input, without relying on an OpenAI compatibility layer.The resulting structure is:
AIServiceType.Anthropic → AnthropicPasteProvider → AnthropicClient/IChatClientThis PR adds:
AIServiceType.Anthropicintegration acrossSettings.UIandAdvancedPaste.AnthropicPasteProviderutilizing the officialAnthropicC# SDK (AnthropicClient).AllowAdvancedPasteAnthropic) to properly restrict or allow its usage in enterprise environments.Validation Steps Performed
AnthropicPasteProviderand configuration fallback.