Universal.Operative.Sdk.Discrete.LMStudio 4.0.0

dotnet add package Universal.Operative.Sdk.Discrete.LMStudio --version 4.0.0
                    
NuGet\Install-Package Universal.Operative.Sdk.Discrete.LMStudio -Version 4.0.0
                    
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="Universal.Operative.Sdk.Discrete.LMStudio" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Universal.Operative.Sdk.Discrete.LMStudio" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Universal.Operative.Sdk.Discrete.LMStudio" />
                    
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 Universal.Operative.Sdk.Discrete.LMStudio --version 4.0.0
                    
#r "nuget: Universal.Operative.Sdk.Discrete.LMStudio, 4.0.0"
                    
#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 Universal.Operative.Sdk.Discrete.LMStudio@4.0.0
                    
#: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=Universal.Operative.Sdk.Discrete.LMStudio&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Universal.Operative.Sdk.Discrete.LMStudio&version=4.0.0
                    
Install as a Cake Tool

Universal.Operative.Sdk.Discrete.LMStudio

LM Studio adapters for Universal.Operative.Sdk, including tool use through Chat Completions, Responses, and Messages compatibility endpoints.

Quick start

using Universal.Operative.Sdk.Discrete;
using Universal.Operative.Sdk.Discrete.LMStudio;

using ChatCompletionsModel model = new ChatCompletionsModel(new ChatCompletionsModel.Options { ModelId = "qwen3.5-2b", MaximumOutputTokens = 512, });

ChatCompletionsModel is the recommended default and supports custom tool definitions. The same local model can instead use the Responses or Messages compatibility surface:

using ResponsesModel responses = new ResponsesModel(new ResponsesModel.Options { ModelId = "qwen3.5-2b", MaxOutputTokens = 512, });
using MessagesModel messages = new MessagesModel(new MessagesModel.Options { ModelId = "qwen3.5-2b", MaxTokens = 512, });

To override the default http://localhost:1234 endpoint or provide an LM Studio API token, pass Universal.LMStudio.Client.Api.V1.LMStudioClientOptions as the first constructor argument.

Adapters dispose clients they create. Clients supplied through the client overload remain owned by the caller.

NativeModel exposes LM Studio's native /api/v1/chat route, including native integrations, response storage, context length and response-ID continuation. It does not accept custom tool definitions. It replaces the former Model name; construct its configuration with NativeModel.Options instead of ModelOptions. Use a compatibility adapter when registering Operative tools.

Function-tool strictness

The adapter reads ToolDefinition.Extensions["openai"]["strict"] for compatible function definitions. Explicit false and true are forwarded unchanged. An absent or null setting retains the existing adapter default. Parameter schemas, including nested optional fields and required lists, are forwarded without strict-schema rewriting. Callers enabling strict mode must supply a compatible schema.

Both the OpenAI-compatible Chat Completions and Responses mappings forward the flag. Native LM Studio and Messages contracts are unchanged. Server/model support determines whether strict generation is enforced.

Product 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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.0 97 11/18/2026
3.2.2 88 11/17/2026
3.2.1 93 11/16/2026
3.2.0 101 11/11/2026
3.1.0 88 11/11/2026
3.0.2 110 11/10/2026
3.0.1 133 10/2/2026
3.0.0 163 9/7/2026
2.1.3 130 9/3/2026
2.1.2 134 9/3/2026
2.1.1 125 9/2/2026
2.1.0 122 9/2/2026
2.0.0 124 9/1/2026
1.0.0 124 8/31/2026

Targets .NET 10 and .NET 11; removes .NET 8 support. Renames the native adapter to NativeModel and its configuration to NativeModel.Options; compatibility adapters retain their existing names.