ANcpLua.Agents.BitNet.Core 4.0.0-preview.3

This is a prerelease version of ANcpLua.Agents.BitNet.Core.
There is a newer version of this package available.
See the version list below for details.
dotnet add package ANcpLua.Agents.BitNet.Core --version 4.0.0-preview.3
                    
NuGet\Install-Package ANcpLua.Agents.BitNet.Core -Version 4.0.0-preview.3
                    
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="ANcpLua.Agents.BitNet.Core" Version="4.0.0-preview.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ANcpLua.Agents.BitNet.Core" Version="4.0.0-preview.3" />
                    
Directory.Packages.props
<PackageReference Include="ANcpLua.Agents.BitNet.Core" />
                    
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 ANcpLua.Agents.BitNet.Core --version 4.0.0-preview.3
                    
#r "nuget: ANcpLua.Agents.BitNet.Core, 4.0.0-preview.3"
                    
#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 ANcpLua.Agents.BitNet.Core@4.0.0-preview.3
                    
#: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=ANcpLua.Agents.BitNet.Core&version=4.0.0-preview.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ANcpLua.Agents.BitNet.Core&version=4.0.0-preview.3&prerelease
                    
Install as a Cake Tool

ANcpLua.Agents.BitNet.Core

The client core for the BitNet (bitnet.cpp / llama-server) stack — the shared base that both ANcpLua.Agents.Hosting.BitNet and ANcpLua.Agents.Testing.BitNet build on, with no hosting / ASP.NET Core dependency.

Type What it does
BitNetClientOptions Endpoint / API-path / model config, with BITNET_URL · BITNET_API_PATH · BITNET_MODEL environment overrides.
BitNetChatClientFactory Create(options) → an OpenAI-compatible IChatClient bound to the llama-server endpoint.
LegacyMaxTokensPolicy Mirrors max_completion_tokensmax_tokens for llama-server builds before ggml-org/llama.cpp PR #19831. Self-deleting once the server honors the new field.
using ANcpLua.Agents.Hosting.BitNet;
using Microsoft.Extensions.AI;

IChatClient client = BitNetChatClientFactory.Create(new BitNetClientOptions
{
    Endpoint = new Uri("http://localhost:8080"),
    Model    = "bitnet-b1.58-2B-4T",
});

The types live in the ANcpLua.Agents.Hosting.BitNet namespace for API stability (shipped that way in 4.0.0-preview.1); this package is the assembly split-out so the client core can be taken without the hosting stack.

BitNet is a local test-double / system-under-test — not an authoritative judge. See docs/bitnet-not-a-judge.md.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  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 (2)

Showing the top 2 NuGet packages that depend on ANcpLua.Agents.BitNet.Core:

Package Downloads
ANcpLua.Agents.Hosting.BitNet

BitNet (bitnet.cpp llama-server) hosting facades. Reads the OpenAI-compatible /v1 surface exposed by bitnet.cpp and registers a keyed IChatClient, health-check, and legacy-max-tokens shim. Bundles a Roslyn source generator that auto-wires [assembly: BitNetEndpoint] attributes. BitNet is a local test-double / system-under-test, not an authoritative judge.

ANcpLua.Agents.Testing.BitNet

xUnit v3 fixture that auto-manages a local BitNet (bitnet.cpp llama-server) Docker container (digest-pinned, idempotent inspect-before-pull) and exposes an IChatClient for tests. BitNet is a local test-double / system-under-test, not an authoritative judge.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.1 124 6/28/2026
4.0.0 113 6/28/2026
4.0.0-preview.4 58 6/28/2026
4.0.0-preview.3 61 6/27/2026
4.0.0-preview.2 84 6/26/2026