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
<PackageReference Include="Themis.Inference.Remote.Jev" Version="4.1.0" />
<PackageVersion Include="Themis.Inference.Remote.Jev" Version="4.1.0" />
<PackageReference Include="Themis.Inference.Remote.Jev" />
paket add Themis.Inference.Remote.Jev --version 4.1.0
#r "nuget: Themis.Inference.Remote.Jev, 4.1.0"
#:package Themis.Inference.Remote.Jev@4.1.0
#addin nuget:?package=Themis.Inference.Remote.Jev&version=4.1.0
#tool nuget:?package=Themis.Inference.Remote.Jev&version=4.1.0
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 | 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
- Themis.Common (>= 4.1.0)
- Themis.Core (>= 4.1.0)
- Themis.Inference.Remote.Http (>= 4.1.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 |
|---|---|---|
| 4.1.0 | 47 | 11/2/2026 |