Universal.Operative.Sdk.Discrete.MoonshotAI
1.0.0
dotnet add package Universal.Operative.Sdk.Discrete.MoonshotAI --version 1.0.0
NuGet\Install-Package Universal.Operative.Sdk.Discrete.MoonshotAI -Version 1.0.0
<PackageReference Include="Universal.Operative.Sdk.Discrete.MoonshotAI" Version="1.0.0" />
<PackageVersion Include="Universal.Operative.Sdk.Discrete.MoonshotAI" Version="1.0.0" />
<PackageReference Include="Universal.Operative.Sdk.Discrete.MoonshotAI" />
paket add Universal.Operative.Sdk.Discrete.MoonshotAI --version 1.0.0
#r "nuget: Universal.Operative.Sdk.Discrete.MoonshotAI, 1.0.0"
#:package Universal.Operative.Sdk.Discrete.MoonshotAI@1.0.0
#addin nuget:?package=Universal.Operative.Sdk.Discrete.MoonshotAI&version=1.0.0
#tool nuget:?package=Universal.Operative.Sdk.Discrete.MoonshotAI&version=1.0.0
About
Universal.Operative.Sdk.MoonshotAI plugs Moonshot AI's Kimi models into Universal.Operative.Sdk via an IModel adapter (Model) backed by the Universal.MoonshotAI.Client transport.
Unlike OpenAI, Moonshot has no Responses-equivalent endpoint — Chat Completions is the only surface — so there's a single Model here rather than a Chat/Responses pair.
How to Use
Installation
dotnet add package Universal.Operative.Sdk.MoonshotAI
Configuration
using Universal.Operative.Sdk;
using Universal.Operative.Sdk.MoonshotAI;
IModel model = new Model(apiKey, new Model.Options
{
ModelId = "kimi-k3",
MaxCompletionTokens = 4096,
});
The constructor also accepts an existing Universal.MoonshotAI.Client.V1.V1Client in place of an API key, so you can reuse a pre-built client (custom endpoint — e.g. api.moonshot.cn — headers, etc.) across models:
using Universal.MoonshotAI.Client.V1;
V1Client client = new V1Client("https", "api.moonshot.cn", apiKey);
IModel model = new Model(client, new Model.Options { ModelId = "kimi-k3" });
Usage
Drop the model into EngineBuilder like any other IModel:
IEngine engine = EngineBuilder.FromDefaults(model)
.AddBaselineTools()
.Build();
await foreach (EngineEvent e in engine.ExecuteAsync(conversation))
{
// handle events as usual — see Universal.Operative.Sdk's Package.md
}
Reasoning models
kimi-k3 takes a ReasoningEffort hint ("low"/"high"/"max"); kimi-k2.6/kimi-k2.5 take a Thinking toggle instead (kimi-k2.7-code always reasons and exposes neither). Either way, the chain-of-thought comes back as a ReasoningBlock in the settled Message, same as any other provider's extended thinking:
IModel reasoningModel = new Model(apiKey, new Model.Options
{
ModelId = "kimi-k2.6",
Thinking = new ThinkingConfiguration { Type = ThinkingTypes.Enabled },
});
Structured output
Model.Options.ResponseFormat is the escape hatch for JSON object output, forwarded verbatim as response_format. Moonshot's own JSON-mode guide only documents {"type": "json_object"} — describe the desired shape in the prompt itself, since this parameter alone doesn't communicate a schema to the model.
Known gaps
Universal.MoonshotAI.Client has no typed content-block classes (see its own Package.md), so this adapter builds image_url content parts by hand from ImageBlock; DocumentBlock, AudioBlock, and VideoBlock throw NotSupportedException rather than guessing at an unverified wire shape. Moonshot's built-in $web_search tool isn't wired up here — as of this writing it reliably fails server-side even when built exactly to Moonshot's documented protocol (confirmed via a raw request bypassing the client library entirely); wire it up once that's fixed upstream.
License
Free for noncommercial use under the Universal.Operative Noncommercial License. Source is closed; commercial use requires a separate license from Andrew Ong.
| 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
- Universal.MoonshotAI.Client (>= 1.0.0)
- Universal.Operative.Sdk (>= 5.0.0)
- Universal.Operative.Sdk.Discrete (>= 1.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 |
|---|---|---|
| 1.0.0 | 78 | 8/12/2026 |
1.0.0 — Renamed from Universal.Operative.Sdk.MoonshotAI v1.0.2 as part of the Universal.Operative.Sdk 5.0.0 split; see that package's release notes for prior history. Now depends on the slimmed-down Universal.Operative.Sdk 5.0.0 (shared kernel) plus the new Universal.Operative.Sdk.Discrete 1.0.0 (turn-based engine) instead of the pre-5.0.0 unified package.