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
<PackageReference Include="Universal.Operative.Sdk.Discrete.LMStudio" Version="4.0.0" />
<PackageVersion Include="Universal.Operative.Sdk.Discrete.LMStudio" Version="4.0.0" />
<PackageReference Include="Universal.Operative.Sdk.Discrete.LMStudio" />
paket add Universal.Operative.Sdk.Discrete.LMStudio --version 4.0.0
#r "nuget: Universal.Operative.Sdk.Discrete.LMStudio, 4.0.0"
#:package Universal.Operative.Sdk.Discrete.LMStudio@4.0.0
#addin nuget:?package=Universal.Operative.Sdk.Discrete.LMStudio&version=4.0.0
#tool nuget:?package=Universal.Operative.Sdk.Discrete.LMStudio&version=4.0.0
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 | 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. net11.0 is compatible. |
-
net10.0
- Universal.Common.Formats.Gif (>= 2.1.0)
- Universal.Common.Formats.Jpeg (>= 2.1.3)
- Universal.Common.Formats.Png (>= 2.2.0)
- Universal.Common.Formats.WebP (>= 2.0.0)
- Universal.LMStudio.Client (>= 2.1.0)
- Universal.Operative.Sdk.Discrete (>= 4.0.0)
-
net11.0
- Universal.Common.Formats.Gif (>= 2.1.0)
- Universal.Common.Formats.Jpeg (>= 2.1.3)
- Universal.Common.Formats.Png (>= 2.2.0)
- Universal.Common.Formats.WebP (>= 2.0.0)
- Universal.LMStudio.Client (>= 2.1.0)
- Universal.Operative.Sdk.Discrete (>= 4.0.0)
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.