Mythosia.AI.Serving.Abstractions
1.0.0
dotnet add package Mythosia.AI.Serving.Abstractions --version 1.0.0
NuGet\Install-Package Mythosia.AI.Serving.Abstractions -Version 1.0.0
<PackageReference Include="Mythosia.AI.Serving.Abstractions" Version="1.0.0" />
<PackageVersion Include="Mythosia.AI.Serving.Abstractions" Version="1.0.0" />
<PackageReference Include="Mythosia.AI.Serving.Abstractions" />
paket add Mythosia.AI.Serving.Abstractions --version 1.0.0
#r "nuget: Mythosia.AI.Serving.Abstractions, 1.0.0"
#:package Mythosia.AI.Serving.Abstractions@1.0.0
#addin nuget:?package=Mythosia.AI.Serving.Abstractions&version=1.0.0
#tool nuget:?package=Mythosia.AI.Serving.Abstractions&version=1.0.0
Mythosia.AI.Serving.Abstractions
Manage different model servers without coupling your dashboard or operational tools to a runtime's response format. This package defines small, independent contracts for inspecting an already running server and explicitly managing its models.
Use it to keep a model selector, readiness check or operations dashboard independent of Ollama, llama.cpp and vLLM. The package contains contracts and immutable observations; install a concrete client to make HTTP requests.
Version and installation
This README describes 1.0.0. It targets .NET Standard 2.1, has no NuGet dependencies, and does not depend on the AI chat or RAG packages.
dotnet add package Mythosia.AI.Serving.Abstractions --version 1.0.0
Installing a concrete Serving package also brings in these contracts. For source development, reference the project in this repository.
Choose the contract for the operation
| Contract | Purpose |
|---|---|
IModelServer |
Read runtime identity, health, model inventory and observed capabilities |
IModelLifecycle |
Explicitly request model load or unload |
IModelDownloader |
Download a model and wait for the server's completion event |
IModelMetricsProvider |
Read server-wide metric samples, preserving labels |
Concrete clients are implemented by Mythosia.AI.Serving.Ollama, Mythosia.AI.Serving.LlamaCpp and Mythosia.AI.Serving.Vllm. Their namespaces are specific to each runtime; the contracts use Mythosia.AI.Serving.
The optional interfaces identify operations a client can express. They do not promise that the connected server supports those operations. For example, LlamaCppServer implements IModelLifecycle, but a single-model llama.cpp server cannot accept router lifecycle commands.
Inspect any supported runtime
This helper accepts a concrete client through IModelServer:
using System;
using System.Threading;
using System.Threading.Tasks;
using Mythosia.AI.Serving;
public static class ServerInspector
{
public static async Task InspectAsync(
IModelServer server, CancellationToken cancellationToken = default)
{
var info = await server.GetInfoAsync(cancellationToken);
var health = await server.GetHealthAsync(cancellationToken);
Console.WriteLine($"{info.Runtime} {info.Version}: {health.Status}");
var models = await server.GetModelsAsync(cancellationToken);
foreach (var model in models)
Console.WriteLine($"{model.Id}: {model.InstallationState} / {model.LoadState}");
var capabilities = await server.GetCapabilitiesAsync(cancellationToken);
if (server is IModelLifecycle &&
capabilities.ModelLoading == ServingFeatureSupport.Supported)
Console.WriteLine("An explicit load command is available.");
}
}
Interpret observations and completion
| Value or result | Interpretation |
|---|---|
ServingFeatureSupport.Unknown |
The probe was inconclusive; it is not evidence of unsupported functionality. |
ServingFeatureSupport.Supported |
Endpoint support was observed or inferred from the runtime protocol; mutation permissions and every model were not tested. |
ModelInstallationState.Unknown / ModelLoadState.Unknown |
The server did not establish that state. Do not render it as missing or unloaded. |
| Nullable size, memory, context length or locality | No measurement was reported; null is not zero or local. |
ServerHealthStatus.Healthy |
The health probe succeeded; a particular model can still be unavailable. |
| Successful load / unload | The server acknowledged the command; inspect inventory separately for resulting state. |
| Successful download | The client observed the runtime's terminal success condition. |
Capability discovery is read-only and never loads or downloads a model. Inventory gathered through separate native requests is not an atomic snapshot. Capabilities can change and cannot guarantee sufficient memory or success for every request.
Load/unload completion acknowledges the command, not indefinite residency. Download completion requires a terminal success response. Cancelling a call interrupts this client's HTTP work and wait; it cannot promise to reverse a command already accepted by the server. All asynchronous operations accept cancellation tokens.
ServingException exposes a nullable HTTP status and ServingFailureKind (Unknown, Http, Transport, Timeout, InvalidResponse). Server-declared operation errors can have no HTTP status or more specific classification. Caller cancellation propagates as OperationCanceledException. Ollama, llama.cpp and the new common vLLM operations omit raw error bodies and credentials; existing concrete vLLM APIs retain their diagnostic fields for compatibility and need filtering before logging.
Metric samples preserve labels and can contain Prometheus NaN or infinite values. Validate values and select labels before calculating totals across models or engines. ServerMetrics.RawText is the original exposition and can contain deployment-specific labels.
Scope and validation
The contracts have been exercised through the concrete clients against Ollama 0.34.4, llama.cpp b11146 in router and single-model modes, and vLLM 0.30.0. Those small-model checks on one NVIDIA A40 are a bounded compatibility observation, not a guarantee for all runtime versions, models or deployments. See each client's README for its verified operations and limits.
This package does not host engines, start processes, infer text, or implement embeddings. Continue using AI provider and embedding APIs for those operations. See the serving guide and release notes.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Mythosia.AI.Serving.Abstractions:
| Package | Downloads |
|---|---|
|
Mythosia.AI.Serving.Vllm
Inspect served model aliases, readiness and request load on an existing vLLM server. VllmServer reads model cards, health, version and label-preserving Prometheus metrics. What's New in v1.1.0: shared IModelServer and IModelMetricsProvider contracts, observed capabilities and cancellation during response-body reads, preserving the concrete Vllm APIs. Targets .NET Standard 2.1 with a caller-owned HttpClient and no Mythosia.AI core dependency. No lifecycle, download, server hosting or chat API. |
|
|
Mythosia.AI.Serving.LlamaCpp
Build model selectors and management tools for an existing llama.cpp server. Inspect models, health and runtime capabilities; explicitly load, unload and download models in router mode; read single-model or model-specific Prometheus metrics without automatic loading. What's New in v1.0.0: common Serving contracts, mode-aware operations, cancellation-aware HTTP and model-matched SSE download completion. Targets .NET Standard 2.1 with a caller-owned HttpClient. No server hosting or Mythosia.AI chat dependency. |
|
|
Mythosia.AI.Serving.Ollama
Prepare models and diagnose readiness on an existing Ollama server independently of chat providers. Discover registered and running models, check health/version, explicitly preload or unload compatible models, and download models with streaming progress. What's New in v1.0.0: shared Serving contracts, distinct installation/load states, cancellation-aware HTTP and validated download completion. Uses a caller-owned HttpClient; targets .NET Standard 2.1 without a Mythosia.AI core dependency. No server hosting or chat API. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 174 | 9/28/2026 |
v1.0.0 introduces IModelServer, IModelLifecycle, IModelDownloader and IModelMetricsProvider, with immutable state observations, cancellation and shared failure classification. Unknown is distinct from unsupported, unloaded and zero. Concrete clients have bounded live verification against Ollama 0.34.4, llama.cpp b11146 and vLLM 0.30.0; see full notes for scope and limitations. No HTTP implementation, server hosting or chat API is included. Full notes: https://github.com/AJ-comp/Mythosia.AI/blob/main/src/serving/Mythosia.AI.Serving.Abstractions/RELEASE_NOTES.md#v100