Soenneker.SemanticKernel.Dtos.Options 11.0.138

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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:

  • KernelFactory creates an IKernelBuilder and receives the options plus cancellation token.
  • ConfigureBuilder runs synchronously before the builder is built.
  • ConfigureKernel runs asynchronously after the Kernel has 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 Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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 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
11.0.156 0 12/3/2026
11.0.155 0 12/2/2026
11.0.153 31 12/2/2026
11.0.152 444 12/1/2026
11.0.151 116 11/30/2026
11.0.150 60 11/30/2026
11.0.149 298 11/29/2026
11.0.148 569 11/18/2026
11.0.146 665 11/14/2026
11.0.145 310 11/11/2026
11.0.144 277 11/11/2026
11.0.143 514 11/7/2026
11.0.142 740 10/27/2026
11.0.141 120 10/27/2026
11.0.140 375 10/26/2026
11.0.139 191 10/26/2026
11.0.138 279 10/26/2026
11.0.137 206 10/26/2026
11.0.136 153 10/26/2026
4.0.135 534 10/15/2026
Loading failed

Updated NuGet packages