Soenneker.SemanticKernel.Dtos.Options
4.0.108
Prefix Reserved
dotnet add package Soenneker.SemanticKernel.Dtos.Options --version 4.0.108
NuGet\Install-Package Soenneker.SemanticKernel.Dtos.Options -Version 4.0.108
<PackageReference Include="Soenneker.SemanticKernel.Dtos.Options" Version="4.0.108" />
<PackageVersion Include="Soenneker.SemanticKernel.Dtos.Options" Version="4.0.108" />
<PackageReference Include="Soenneker.SemanticKernel.Dtos.Options" />
paket add Soenneker.SemanticKernel.Dtos.Options --version 4.0.108
#r "nuget: Soenneker.SemanticKernel.Dtos.Options, 4.0.108"
#:package Soenneker.SemanticKernel.Dtos.Options@4.0.108
#addin nuget:?package=Soenneker.SemanticKernel.Dtos.Options&version=4.0.108
#tool nuget:?package=Soenneker.SemanticKernel.Dtos.Options&version=4.0.108
Soenneker.SemanticKernel.Dtos.Options
A shared configuration object for constructing Semantic Kernel instances and carrying model policy metadata.
Installation
dotnet add package Soenneker.SemanticKernel.Dtos.Options
Usage
using Microsoft.SemanticKernel;
using Soenneker.SemanticKernel.Dtos.Options;
using Soenneker.SemanticKernel.Enums.KernelType;
var options = new SemanticKernelOptions
{
ModelId = "primary-chat-model",
Endpoint = "https://models.example.com",
ApiKey = configuration["Models:ApiKey"],
Type = KernelType.Chat,
RequestsPerMinute = 60,
TokensPerDay = 100_000,
MaxTokens = 2_000,
Temperature = 0.2,
KernelFactory = static (options, cancellationToken) =>
{
IKernelBuilder builder = Kernel.CreateBuilder();
// Add the connector for options.ModelId, Endpoint, and ApiKey.
return ValueTask.FromResult(builder);
},
ConfigureBuilder = builder =>
{
// Add pre-build services or plugins.
},
ConfigureKernel = async (kernel, cancellationToken) =>
{
// Perform asynchronous post-build setup.
await ValueTask.CompletedTask;
}
};
What applies the values
SemanticKernelOptions only stores values. It does not create a connector, enforce request/token limits, or apply MaxTokens and Temperature to execution settings by itself. The cache, pool, connector factory, or request pipeline consuming the options must implement those behaviors.
The three delegates define the construction hooks used by Soenneker Semantic Kernel caches and pools:
KernelFactorycreates anIKernelBuilderand receives the options plus cancellation token.ConfigureBuilderruns synchronously before the builder is built.ConfigureKernelruns asynchronously after theKernelhas been built.
When KernelFactory is absent, consumers may create an empty default builder. ModelId, Endpoint, and ApiKey are therefore not automatically meaningful unless the selected consumer or connector reads them.
Serialization
The scalar configuration properties use explicit camel-case JSON names. KernelFactory, ConfigureBuilder, and ConfigureKernel are excluded from JSON because delegates cannot be represented as portable configuration.
ApiKey is included in JSON serialization. Do not serialize this object into logs, client responses, telemetry, or unprotected storage. Prefer resolving secrets from a protected configuration provider at the point where the options are built.
The DTO does not validate ranges or required combinations. Validate provider-specific requirements—such as a positive limit, supported temperature range, absolute endpoint, or required API key—before using the options.
| 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.Abstractions (>= 1.80.1)
- Soenneker.SemanticKernel.Enums.KernelType (>= 4.0.55)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Soenneker.SemanticKernel.Dtos.Options:
| Package | Downloads |
|---|---|
|
Soenneker.SemanticKernel.Cache
Providing async thread-safe singleton Semantic Kernel instances |
|
|
Soenneker.SemanticKernel.Cache.Options
Providing async thread-safe singleton Semantic Kernel Options instances |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.108 | 1,036 | 9/4/2026 |
| 4.0.107 | 528 | 9/3/2026 |
| 4.0.106 | 584 | 8/31/2026 |
| 4.0.105 | 160 | 8/30/2026 |
| 4.0.104 | 166 | 8/30/2026 |
| 4.0.103 | 476 | 8/30/2026 |
| 4.0.102 | 294 | 8/29/2026 |
| 4.0.101 | 86 | 8/29/2026 |
| 4.0.100 | 923 | 8/21/2026 |
| 4.0.99 | 373 | 8/18/2026 |
| 4.0.98 | 359 | 8/18/2026 |
| 4.0.97 | 1,146 | 8/7/2026 |
| 4.0.96 | 102 | 8/7/2026 |
| 4.0.95 | 1,119 | 7/28/2026 |
| 4.0.94 | 210 | 7/28/2026 |
| 4.0.93 | 95 | 7/28/2026 |
| 4.0.92 | 1,769 | 7/17/2026 |
| 4.0.91 | 251 | 7/16/2026 |
| 4.0.90 | 433 | 7/16/2026 |
| 4.0.89 | 940 | 7/7/2026 |
Updated Soenneker.SemanticKernel.Enums.KernelType to 4.0.55