Universal.Operative.Sdk.Discrete.Xiaomi.MiMo
2.0.0
dotnet add package Universal.Operative.Sdk.Discrete.Xiaomi.MiMo --version 2.0.0
NuGet\Install-Package Universal.Operative.Sdk.Discrete.Xiaomi.MiMo -Version 2.0.0
<PackageReference Include="Universal.Operative.Sdk.Discrete.Xiaomi.MiMo" Version="2.0.0" />
<PackageVersion Include="Universal.Operative.Sdk.Discrete.Xiaomi.MiMo" Version="2.0.0" />
<PackageReference Include="Universal.Operative.Sdk.Discrete.Xiaomi.MiMo" />
paket add Universal.Operative.Sdk.Discrete.Xiaomi.MiMo --version 2.0.0
#r "nuget: Universal.Operative.Sdk.Discrete.Xiaomi.MiMo, 2.0.0"
#:package Universal.Operative.Sdk.Discrete.Xiaomi.MiMo@2.0.0
#addin nuget:?package=Universal.Operative.Sdk.Discrete.Xiaomi.MiMo&version=2.0.0
#tool nuget:?package=Universal.Operative.Sdk.Discrete.Xiaomi.MiMo&version=2.0.0
Universal.Operative.Sdk.Discrete.Xiaomi.MiMo
MiMo adapters for the provider-neutral IModel contract in Universal.Operative.Sdk. The package uses Universal.Xiaomi.MiMo.Client 1.0.0.
ChatCompletionsModel: chat completions, text and image input, streamed text and reasoning, function calls.ResponsesModel: Responses API, text and image input, streamed text and reasoning, function calls. SetLiteModefor MiMo Responses lite.MessagesModel: Anthropic-compatible Messages API, text and image input, streamed text and thinking, function calls and results.
using Universal.Operative.Sdk;
using Universal.Operative.Sdk.Discrete;
using Universal.Operative.Sdk.Discrete.Xiaomi.MiMo;
using Universal.Xiaomi.MiMo.Client.V1.Chat;
using Message = Universal.Operative.Sdk.Discrete.Message;
using ChatCompletionsModel model = new ChatCompletionsModel(apiKey, new ChatCompletionsModel.Options { ModelId = Models.MiMoV26Flash, MaxCompletionTokens = 1024, });
Message answer = await model.CompleteAsync(conversation);
Each adapter also accepts an existing MiMoClient, which remains owned by the caller. Unsupported content blocks are reported as exceptions when building a request. ASR and TTS options remain available directly on MiMoClient; these adapters target conversational models.
Live tests
The adapter test project reads Xiaomi:MiMo:ApiKey from .NET user secrets. From the solution directory:
dotnet user-secrets set Xiaomi:MiMo:ApiKey YOUR_KEY --project Universal.Operative.Sdk.Discrete.Xiaomi.MiMo.Tests
dotnet test Universal.Operative.Sdk.Discrete.Xiaomi.MiMo.Tests/Universal.Operative.Sdk.Discrete.Xiaomi.MiMo.Tests.csproj --filter "TestCategory=Live"
The live suite checks streamed text and tool-result continuations through Chat Completions, Responses, and Messages.
Responses streams preserve response.incomplete reasons (max_output_tokens becomes StopReasons.MaxTokens) and usage. Failed/error events throw InvalidOperationException carrying Data["ErrorCode"] and the available typed Data["MiMoEvent"]; no provider payload is automatically logged. Unsupported assistant Chat content throws before sending.
A Responses stream that ends without a completed or incomplete terminal event throws InvalidOperationException, including when partial content has already arrived. Caller cancellation propagates as cancellation; neither case emits a successful message stop.
| 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.Operative.Sdk.Discrete (>= 4.0.0)
- Universal.Xiaomi.MiMo.Client (>= 1.0.0)
-
net11.0
- Universal.Operative.Sdk.Discrete (>= 4.0.0)
- Universal.Xiaomi.MiMo.Client (>= 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.
Targets .NET 10 and .NET 11; removes .NET 8 support. Preserves incomplete Responses and native failure context; rejects premature stream EOF and unsupported assistant content. Cancellation remains cancellation rather than completing partial output. Validates owned-client configuration before allocation.