Darkspyre.Inference.Connect.Common
11.19.3-rc.2
Prefix Reserved
See the version list below for details.
dotnet add package Darkspyre.Inference.Connect.Common --version 11.19.3-rc.2
NuGet\Install-Package Darkspyre.Inference.Connect.Common -Version 11.19.3-rc.2
<PackageReference Include="Darkspyre.Inference.Connect.Common" Version="11.19.3-rc.2" />
<PackageVersion Include="Darkspyre.Inference.Connect.Common" Version="11.19.3-rc.2" />
<PackageReference Include="Darkspyre.Inference.Connect.Common" />
paket add Darkspyre.Inference.Connect.Common --version 11.19.3-rc.2
#r "nuget: Darkspyre.Inference.Connect.Common, 11.19.3-rc.2"
#:package Darkspyre.Inference.Connect.Common@11.19.3-rc.2
#addin nuget:?package=Darkspyre.Inference.Connect.Common&version=11.19.3-rc.2&prerelease
#tool nuget:?package=Darkspyre.Inference.Connect.Common&version=11.19.3-rc.2&prerelease
Darkspyre.Inference.Connect.Common
Provider-neutral conversations, agent sessions and embeddings for .NET applications. The package holds the
conversation and embedding contracts, the services that run them, the provider setup model and the discovery that
finds the Connect provider packages an application references. It registers no provider of its own: add one or more
provider packages, such as Darkspyre.Inference.Connect.OpenAiApi.
Install
dotnet add package Darkspyre.Inference.Connect.Common
Register
services.AddSingleton<ILlmConnectionSource, MyConnectionStore>();
services.AddSingleton<ILlmDataFolder, MyDataFolder>();
services.AddLlmConnect();
AddLlmConnect() registers LlmProviderService, LlmAgentProviderService and LlmEmbeddingProviderService, and
registers every Connect provider package deployed beside this library. Call it once per service collection.
The application supplies two services:
ILlmConnectionSourcereturns a savedLlmConnection, with its credential and version, and saves a refreshed credential only when the version still matches.ILlmDataFolderreturns the folder where providers keep their files.
ConfigureInferenceHttpPipelines, or the AddLlmConnect(configureHttp) overload, sets how the providers' HTTP
clients are created and logged.
Example
LlmAgentProviderService agents = serviceProvider.GetRequiredService<LlmAgentProviderService>();
await using ILlmAgentSession session = await agents.StartSessionAsync(connectionId,
new LlmAgentSessionOptions { ModelId = modelId }, cancellationToken);
await foreach (LlmAgentEvent agentEvent in session.RunTurnAsync(
new LlmAgentTurnRequest { Input = [new LlmAgentTextContent("Summarize the attached report.")] },
cancellationToken))
{
if (agentEvent is LlmAgentMessageCompletedEvent message)
Console.WriteLine(message.Text);
}
A session runs host tools through LlmAgentSessionOptions.Tools and its ToolHandler. The host validates and
authorizes every tool call; the model never reaches host resources directly. LlmProviderService lists a connection's
models (ListModelsAsync), reports its capabilities and its account usage, and signs it in (SignInAsync).
LlmEmbeddingProviderService.EmbedAsync embeds text or image inputs through a connection whose provider offers
embeddings.
Settings
LlmProviderService.SetupDefinitions lists the discovered providers with their names, icons and setup steps.
CreateSettingsManager(target) returns the LlmSettingsManager that opens a provider's settings, runs its actions
(check, sign in, test) and saves through the host's ISetupCommitTarget<LlmSetupChanges>. Each provider declares the
fields its settings show: an endpoint address, a command-line tool, an engine choice, an API key, a sign-in action and
the model choice. A field edit changes only the settings object; only Save reaches the host. The
Darkspyre.Inference.UI.Settings editors render these settings.
Limits
- Discovery reads provider assemblies from disk beside this library. An application that is not deployed as assembly files fails at composition.
- The host owns connection storage, credentials and consent. Connect reads a credential through
ILlmConnectionSourcefor each operation and writes it back only throughSaveCredentialAsync. - A connection's provider package must be referenced; a connection whose provider is not registered is refused.
The Darkspyre.Inference packages
This package is one library of the Darkspyre.Inference family. The family runs AI inference from .NET applications through typed, provider-neutral contracts.
Darkspyre.Inference.Commonholds the contracts every other package shares: requests, results, capabilities, failures and the provider setup model.Darkspyre.Inference.Connect.Commonholds the conversation and embedding services. Each Connect provider package adds one provider, andAddLlmConnect()discovers every provider package the application references.- The Tensor packages load and run models inside the application's own process.
- The UI.Settings packages provide the setup editors a host places in its own window or page.
Every package of the family carries the same version. Reference all of them at the same version: each package depends on the exact version of the family packages it uses.
The packages are licensed under the MIT license. LICENSE.md in each package holds the license text.
| Package | Holds |
|---|---|
| Darkspyre.Inference.Common | Shared contracts for Connect and Tensor |
| Darkspyre.Inference.Connect | Image, speech and audio connectors |
| Darkspyre.Inference.Connect.Common | Conversation and embedding services and provider discovery |
| Darkspyre.Inference.Connect.Codex | Conversations on a ChatGPT subscription |
| Darkspyre.Inference.Connect.Claude | Conversations on a Claude subscription through the Claude CLI |
| Darkspyre.Inference.Connect.HostTools | The host-tools local service and its client |
| Darkspyre.Inference.Connect.Antigravity | Conversations on a Google subscription through the Antigravity CLI |
| Darkspyre.Inference.Connect.Grok | Conversations on a Grok subscription |
| Darkspyre.Inference.Connect.OpenAiApi | Conversations and embeddings through the OpenAI API |
| Darkspyre.Inference.Connect.SelfHost | Conversations and embeddings on engines the application runs |
| Darkspyre.Inference.Tensor.Common | Model packs, the model lifecycle and the Tensor capability interfaces |
| Darkspyre.Inference.Tensor.Decision.Laya | Laya typed decisions through ONNX Runtime |
| Darkspyre.Inference.Tensor.Embedding | Text embeddings from GGUF sentence encoders |
| Darkspyre.Inference.Tensor.Embedding.Gemma | EmbeddingGemma text and image embeddings |
| Darkspyre.Inference.Tensor.Ggml | The process's GGML and MLX native runtime |
| Darkspyre.Inference.Tensor.Image.Supra | Supra2-IMG image generation |
| Darkspyre.Inference.Tensor.LLM.Qwen | Qwen GGUF text generation |
| Darkspyre.Inference.Tensor.Registry | Registration and discovery of the Tensor engines |
| Darkspyre.Inference.Tensor.STT.Whisper | Whisper speech transcription |
| Darkspyre.Inference.UI.Settings.Core | Editor state and host contracts both setup editors share |
| Darkspyre.Inference.UI.Settings.Avalonia | The Avalonia setup editor |
| Darkspyre.Inference.UI.Settings.Blazor | The Blazor setup editor |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Darkspyre.Inference.Common (= 11.19.3-rc.2)
- Darkspyre.ML.Tokenizers (>= 2.0.1.1)
- JsonSchema.Net (>= 9.4.0)
- Microsoft.Bcl.Memory (>= 10.0.9)
- Microsoft.Extensions.Http (>= 10.0.9)
- Microsoft.ML.Tokenizers.Data.O200kBase (>= 2.0.1)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Darkspyre.Inference.Connect.Common:
| Package | Downloads |
|---|---|
|
Darkspyre.Inference.Connect.Claude
Conversations and agent sessions on a Claude subscription through the official Claude CLI. |
|
|
Darkspyre.Inference.Connect.OpenAiApi
Conversations, agent sessions and text embeddings through the OpenAI Responses API. |
|
|
Darkspyre.Inference.Connect.Codex
Conversations and agent sessions on a ChatGPT subscription. |
|
|
Darkspyre.Inference.Connect
Image, speech and audio inference connectors for Darkspyre applications. |
|
|
Darkspyre.Inference.Connect.Antigravity
Conversations and native agent sessions on a Google subscription through the official Antigravity CLI. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.20.0 | 117 | 11/15/2026 |
| 11.19.4-rc.3 | 115 | 11/6/2026 |
| 11.19.3-rc.3 | 98 | 11/5/2026 |
| 11.19.3-rc.2 | 116 | 10/31/2026 |
| 11.17.3-rc.2 | 112 | 10/26/2026 |