VOOZH about

URL: https://www.nuget.org/packages/FieldCure.AssistStudio.Anthropic/

⇱ NuGet Gallery | FieldCure.AssistStudio.Anthropic 0.2.0-preview.4




👁 Image
FieldCure.AssistStudio.Anthropic 0.2.0-preview.4

This is a prerelease version of FieldCure.AssistStudio.Anthropic.
dotnet add package FieldCure.AssistStudio.Anthropic --version 0.2.0-preview.4
 
 
NuGet\Install-Package FieldCure.AssistStudio.Anthropic -Version 0.2.0-preview.4
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FieldCure.AssistStudio.Anthropic" Version="0.2.0-preview.4" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FieldCure.AssistStudio.Anthropic" Version="0.2.0-preview.4" />
 
Directory.Packages.props
<PackageReference Include="FieldCure.AssistStudio.Anthropic" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FieldCure.AssistStudio.Anthropic --version 0.2.0-preview.4
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FieldCure.AssistStudio.Anthropic, 0.2.0-preview.4"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FieldCure.AssistStudio.Anthropic@0.2.0-preview.4
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FieldCure.AssistStudio.Anthropic&version=0.2.0-preview.4&prerelease
 
Install as a Cake Addin
#tool nuget:?package=FieldCure.AssistStudio.Anthropic&version=0.2.0-preview.4&prerelease
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

FieldCure.AssistStudio.Anthropic

Platform-agnostic Anthropic SDK adapter for the AssistStudio ecosystem. Maps Anthropic streaming events to StreamEvent and converts ChatMessage to SDK MessageParam.

👁 License: MIT

Features

  • AnthropicStreamEventMapper — Stateful, per-stream mapper that converts RawMessageStreamEvent to IAsyncEnumerable<StreamEvent>. Handles text deltas, thinking deltas, usage, truncation, and unknown block types gracefully.
  • AnthropicMessageConverter — Converts ChatMessage lists to Anthropic MessageParam format. Extracts system prompts, handles image/text attachments, and groups messages by role.
  • Platform-agnostic — Targets net8.0 and net9.0. No WinUI, no Windows dependency. Use in console apps, ASP.NET, MAUI, or any .NET host.

Install

dotnet add package FieldCure.AssistStudio.Anthropic

Usage

Stream mapping

using FieldCure.AssistStudio.Anthropic;

var mapper = new AnthropicStreamEventMapper();
var sdkStream = client.Messages.CreateStreaming(params);

await foreach (var evt in mapper.MapAsync(sdkStream))
{
 switch (evt)
 {
 case StreamEvent.TextDelta td:
 Console.Write(td.Text);
 break;
 case StreamEvent.ThinkingDelta tk:
 // extended thinking content
 break;
 case StreamEvent.Usage u:
 Console.WriteLine($"Tokens: {u.TokenUsage.TotalTokens}");
 break;
 case StreamEvent.StreamCompleted sc:
 Console.WriteLine(sc.IsTruncated ? "(truncated)" : "(done)");
 break;
 }
}

Message conversion

var result = AnthropicMessageConverter.Convert(messages);

var response = await client.Messages.Create(new()
{
 Model = "claude-sonnet-4-6",
 System = result.SystemPrompt is not null
 ? new(result.SystemPrompt) : null,
 Messages = result.Messages,
 MaxTokens = 4096,
});

Dependencies

Package Version
Anthropic >= 12.13.0
FieldCure.Ai.Providers (transitive)

Related Packages

Package Description
FieldCure.AssistStudio.Controls.WinUI.Anthropic WinUI 3 ChatPanel integration — extension methods to stream Anthropic responses directly into the chat UI
FieldCure.AssistStudio.Controls.WinUI The ChatPanel control itself

License

MIT

Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on FieldCure.AssistStudio.Anthropic:

Package Downloads
FieldCure.AssistStudio.Controls.WinUI.Anthropic

WinUI 3 ChatPanel integration for the Anthropic SDK. Provides extension methods to stream Anthropic responses into ChatPanel.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0-preview.4 57 5/25/2026
0.1.0-preview.3 68 5/4/2026
0.1.0-preview.2 59 4/27/2026
0.1.0-preview.1 57 4/21/2026

v0.2.0-preview.4: Tool calling support — AnthropicMessageConverter now groups consecutive ChatRole.Tool messages into a single user MessageParam carrying ToolResultBlockParam entries (Anthropic requires this; separate user messages 422). ConvertAssistantMessage emits a mixed [TextBlockParam?, ToolUseBlockParam, ...] content list whenever ToolCalls is populated; pure-text turns keep the simple string form. AnthropicStreamEventMapper now emits ToolCallStart on block-start and ToolCallDelta on InputJsonDelta for regular ToolUse blocks; ServerToolUse is tracked but intentionally not surfaced (those tools run inside the SDK). The new file-level StopReason alias (SdkStopReason) disambiguates against the Ai.Providers 0.8.0 domain enum that landed concurrently. Anthropic SDK pin 12.16.0 → 12.21.0 (five minor versions, no breaking changes to the surface this adapter uses). Multi-target: net9 dropped (STS EOL 2026-05-12), net10 added — now net8.0 + net10.0. Phase B (thinking signature round-trip alongside tool calls) deferred — package remains preview until that lands.