ANcpLua.Agents.BitNet.Core
4.0.1
dotnet add package ANcpLua.Agents.BitNet.Core --version 4.0.1
NuGet\Install-Package ANcpLua.Agents.BitNet.Core -Version 4.0.1
<PackageReference Include="ANcpLua.Agents.BitNet.Core" Version="4.0.1" />
<PackageVersion Include="ANcpLua.Agents.BitNet.Core" Version="4.0.1" />
<PackageReference Include="ANcpLua.Agents.BitNet.Core" />
paket add ANcpLua.Agents.BitNet.Core --version 4.0.1
#r "nuget: ANcpLua.Agents.BitNet.Core, 4.0.1"
#:package ANcpLua.Agents.BitNet.Core@4.0.1
#addin nuget:?package=ANcpLua.Agents.BitNet.Core&version=4.0.1
#tool nuget:?package=ANcpLua.Agents.BitNet.Core&version=4.0.1
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 stack and no provider SDK — it speaks the OpenAI-compatible wire
protocol directly over HttpClient + System.Text.Json, exposing only the vendor-neutral
IChatClient.
| Type | What it does |
|---|---|
BitNetClientOptions |
Endpoint / API-path / model config, with BITNET_URL · BITNET_API_PATH · BITNET_MODEL environment overrides. |
BitNetChatClient |
A dependency-free IChatClient that POSTs straight to the OpenAI-compatible /chat/completions endpoint. No provider SDK; emits max_tokens natively. |
BitNetChatClientFactory |
Create(options) → a configured BitNetChatClient as IChatClient. |
LegacyMaxTokensPolicy |
Obsolete. Was an OpenAI-SDK pipeline shim mirroring max_completion_tokens → max_tokens; the agnostic client emits max_tokens natively, so it is unused. Kept for compatibility. |
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.BitNetnamespace for API stability (shipped that way in4.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 | Versions 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. |
-
net10.0
- ANcpLua.Roslyn.Utilities (>= 2.2.27)
- Microsoft.CodeAnalysis.CSharp (>= 5.3.0)
- Microsoft.Extensions.AI (>= 10.7.0)
- System.ClientModel (>= 1.10.0)
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 |