Portic.Sdk
0.1.0
dotnet add package Portic.Sdk --version 0.1.0
NuGet\Install-Package Portic.Sdk -Version 0.1.0
<PackageReference Include="Portic.Sdk" Version="0.1.0" />
<PackageVersion Include="Portic.Sdk" Version="0.1.0" />
<PackageReference Include="Portic.Sdk" />
paket add Portic.Sdk --version 0.1.0
#r "nuget: Portic.Sdk, 0.1.0"
#:package Portic.Sdk@0.1.0
#addin nuget:?package=Portic.Sdk&version=0.1.0
#tool nuget:?package=Portic.Sdk&version=0.1.0
Portic.Sdk
Public, versioned provider SPI and normalized chat contracts for Portic — VEV's AI gateway. The stable integration surface adapter authors build against, without taking a dependency on the AGPL-3.0 gateway runtime.
dotnet add package Portic.Sdk
What's inside
IChatProvider— the provider SPI. Every model call the gateway makes goes through this one interface; each concrete provider (OpenAI, Anthropic, Ollama, a local stub, …) is a disposable adapter that implements it.- Normalized contracts —
ChatRequest,ChatMessage,ChatCompletion,TokenUsage: the provider-neutral shapes the gateway'sPOST /v1/messagesaccepts and returns. Adapters translate these to and from their own provider's wire format.
The types are plain records/an interface with no runtime dependencies beyond the base class library.
Implementing a provider adapter
using Portic.Sdk.Contracts;
using Portic.Sdk.Providers;
public sealed class MyProvider : IChatProvider
{
public string Name => "my-provider";
public async Task<ChatCompletion> CompleteAsync(
ChatRequest request, CancellationToken cancellationToken = default)
{
// Map `request` onto your provider's SDK/wire call, then map the response back
// onto a normalized ChatCompletion. No provider SDK call may happen outside a
// type like this one that implements IChatProvider (Portic's AGENTS.md guardrail).
var reply = new ChatMessage { Role = "assistant", Content = "…" };
return new ChatCompletion
{
Id = Guid.NewGuid().ToString("n"),
Model = request.Model,
Provider = Name,
Message = reply,
Usage = new TokenUsage { InputTokens = 0, OutputTokens = 0 },
};
}
}
Versioning
SemVer, derived from the git tag (vX.Y.Z) at release. Pre-1.0, the surface
evolves additively across minor/patch versions; a breaking change to IChatProvider or any of the
normalized contracts requires a major version bump and an ADR (see docs/adr/ in this repo).
Links
- Source & issues: https://github.com/Vev-software/portic-sdk
- Gateway runtime (community edition): https://github.com/Vev-software/portic-community
Licence
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Portic.Sdk:
| Package | Downloads |
|---|---|
|
Portic.Client
Thin .NET client for Portic's stable POST /v1/messages HTTP surface. Uses Portic.Sdk's normalized chat contracts and depends only on HttpClient and the base class library. Apache-2.0. |
|
|
Portic.Core
Portic community runtime: the provider-neutral AI gateway domain — routing, orchestration, governance and observability ports (IMessageGateway). Compose it with a Portic.Sdk provider adapter to host a gateway. Dual-licensed AGPL-3.0 or commercial. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 215 | 8/22/2026 |