Soenneker.SemanticKernel.Pool.OpenAi
4.0.562
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.SemanticKernel.Pool.OpenAi --version 4.0.562
NuGet\Install-Package Soenneker.SemanticKernel.Pool.OpenAi -Version 4.0.562
<PackageReference Include="Soenneker.SemanticKernel.Pool.OpenAi" Version="4.0.562" />
<PackageVersion Include="Soenneker.SemanticKernel.Pool.OpenAi" Version="4.0.562" />
<PackageReference Include="Soenneker.SemanticKernel.Pool.OpenAi" />
paket add Soenneker.SemanticKernel.Pool.OpenAi --version 4.0.562
#r "nuget: Soenneker.SemanticKernel.Pool.OpenAi, 4.0.562"
#:package Soenneker.SemanticKernel.Pool.OpenAi@4.0.562
#addin nuget:?package=Soenneker.SemanticKernel.Pool.OpenAi&version=4.0.562
#tool nuget:?package=Soenneker.SemanticKernel.Pool.OpenAi&version=4.0.562
Soenneker.SemanticKernel.Pool.OpenAi
OpenAI connector registration helpers for Soenneker.SemanticKernel.Pool.
Installation
dotnet add package Soenneker.SemanticKernel.Pool.OpenAi
Add an OpenAI entry
Resolve the pool and HTTP client cache from dependency injection, then register an entry:
using Soenneker.SemanticKernel.Enums.KernelType;
using Soenneker.SemanticKernel.Pool.OpenAi;
await pool.AddOpenAi(
poolId: "chat",
key: "openai-primary",
type: KernelType.Chat,
modelId: "chat-model-id",
apiKey: configuration["OpenAI:ApiKey"]!,
endpoint: "https://api.openai.com/v1",
httpClientCache: httpClientCache,
rps: 2,
rpm: 60,
rpd: 1_000,
tokensPerDay: null,
cancellationToken);
Supported types are:
KernelType.Chatfor chat completionKernelType.Embeddingfor embedding generationKernelType.Audiofor text-to-audioKernelType.Imagefor text-to-image
Other types throw NotSupportedException when the pool first constructs the kernel.
Chat and embedding create an OpenAIClient using the supplied endpoint. Audio and image use Semantic Kernel connector overloads that receive the API key and cached HttpClient, but this adapter does not apply the supplied endpoint to those paths. Use this package's audio/image registrations only when the connector's default endpoint is appropriate.
The HTTP client is cached under openai:{poolId}:{key} with a five-minute timeout. Pool quota values are reservations made when GetAvailable selects the entry. tokensPerDay counts one unit per acquisition; it is not populated from provider token usage.
Remove the entry
Use the matching helper so both the pool entry and cached HTTP client are removed:
await pool.RemoveOpenAi(
"chat",
"openai-primary",
httpClientCache,
cancellationToken);
Keep the API key in a protected configuration provider and avoid logging or serializing the generated SemanticKernelOptions.
| 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
- Microsoft.SemanticKernel.Connectors.OpenAI (>= 1.80.0)
- Soenneker.SemanticKernel.Pool (>= 4.0.391)
- Soenneker.Utils.HttpClientCache (>= 4.0.2048)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.563 | 0 | 8/31/2026 |
| 4.0.562 | 0 | 8/31/2026 |
| 4.0.561 | 0 | 8/31/2026 |
| 4.0.560 | 38 | 8/31/2026 |
| 4.0.559 | 29 | 8/30/2026 |
| 4.0.558 | 30 | 8/30/2026 |
| 4.0.557 | 34 | 8/30/2026 |
| 4.0.556 | 34 | 8/30/2026 |
| 4.0.555 | 41 | 8/30/2026 |
| 4.0.554 | 42 | 8/30/2026 |
| 4.0.553 | 43 | 8/30/2026 |
| 4.0.552 | 29 | 8/29/2026 |
| 4.0.551 | 44 | 8/29/2026 |
| 4.0.550 | 39 | 8/29/2026 |
| 4.0.549 | 72 | 8/26/2026 |
| 4.0.548 | 66 | 8/26/2026 |
| 4.0.547 | 74 | 8/26/2026 |
| 4.0.546 | 93 | 8/22/2026 |
| 4.0.545 | 89 | 8/21/2026 |
| 4.0.544 | 100 | 8/18/2026 |
Updated NuGet packages