Themis.Inference.Remote.Jev 4.1.0

dotnet add package Themis.Inference.Remote.Jev --version 4.1.0
                    
NuGet\Install-Package Themis.Inference.Remote.Jev -Version 4.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Themis.Inference.Remote.Jev" Version="4.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Themis.Inference.Remote.Jev" Version="4.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Themis.Inference.Remote.Jev" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Themis.Inference.Remote.Jev --version 4.1.0
                    
#r "nuget: Themis.Inference.Remote.Jev, 4.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Themis.Inference.Remote.Jev@4.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Themis.Inference.Remote.Jev&version=4.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Themis.Inference.Remote.Jev&version=4.1.0
                    
Install as a Cake Tool

Themis.Inference.Remote.Jev

This optional package maps Jev/TypeSafe AI System One to Themis' existing IDecisionInferenceProvider contract through Themis.Inference.Remote.Http. Jev-specific request mapping, answer validation, and typed-answer semantics live in this adapter; HTTP client lifecycle, cancellation, status handling, and response dispatch use the shared remote transport. The package does not depend on Jev.Net or another Jev client library.

Registration

using Microsoft.Extensions.DependencyInjection;
using Themis.Core;
using Themis.Core.Extensions;
using Themis.Inference.Remote.Jev;

services.AddThemisJevDefaultDecisionInference()
    .ConfigureHttpClient(client => client.Timeout = TimeSpan.FromSeconds(30));
services.AddThemisDecisionRouter(new DecisionRouterOptions("jev-latest")
{
    RouteUnspecifiedRequestsToDefaultModel = true
});

By default, the registration uses https://api.typesafe.ai/ and reads the Bearer API key from TYPESAFE_API_KEY. Pass another environment-variable name to AddThemisJevDefaultDecisionInference("MY_JEV_API_KEY"). A missing or invalid key raises ThemisConfigurationException immediately when the registration method is called. AddThemisJevDecisionInference also checks TYPESAFE_API_KEY by default, before registering the shared HTTP provider.

For host-managed secrets or complete control over client creation, use AddThemisJevDecisionInference and provide an HttpClient configuration callback. Pass apiKeyEnvironmentVariableName: null when the callback supplies authorization itself:

using System.Net.Http.Headers;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Themis.Common.Exceptions;
using Themis.Inference.Remote.Jev;

services.AddThemisJevDecisionInference((serviceProvider, client) =>
{
    client.BaseAddress = new Uri("https://api.typesafe.ai/");
    var apiKey = serviceProvider.GetRequiredService<IConfiguration>()["TypeSafe:ApiKey"];
    if (string.IsNullOrWhiteSpace(apiKey))
        throw new ThemisConfigurationException("TypeSafe:ApiKey is required.");

    client.DefaultRequestHeaders.Authorization =
        new AuthenticationHeaderValue("Bearer", apiKey);
}, apiKeyEnvironmentVariableName: null);

This callback owns the HTTP client configuration; set the base address and authentication there. Both registration methods return an IHttpClientBuilder for additional configuration and message handlers.

The adapter sends POST /v1/systemone; the selected router model is sent as the Jev model override. The request maps Themis choice, score, and noul questions and projects the original state and namespaced extras into Jev's state format. The response mapper validates answer identities, types, score rubrics, probabilities, and usage before creating DecisionResponse.

The returned IHttpClientBuilder can override the default base address and configure timeout, proxy, redirects, resilience, or host-managed caching and replay. Retries are not added by this adapter; configure them in the host's HTTP pipeline and account for their effect on duplicate requests. Cache policy, keys, TTL, and invalidation remain application-owned. Avoid logging request bodies where decision state is sensitive.

The adapter preserves caller cancellation and transport exceptions. Non-2xx responses are raised as HttpRequestException; malformed successful response content is raised as InvalidDataException. The service requires a nonempty question set after mapping, choice criteria with at least two labels, and score criteria with at least two levels.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1.0 47 11/2/2026