Jev directory
CommunityJev Repos & SDKs
JevGen
JevGen 1.0.0-preview.3 is a Refit-style source generator that turns a C# interface into a strongly typed Jev decision client at compile time, with no HTTP code, JSON, question dictionaries, or runtime reflection.
- Reading time
- 2 min
- Published by
- Community
- Added
- Nov 23, 2026
Highlights
- An interface marked [JevClient] becomes a generated implementation, with request construction, question metadata and result mapping written at compile time.
- Result types such as ChoiceResult<Department> expose Value, Confidence and ProbabilityOf for each option.
- Twenty-one diagnostics catch malformed contracts before they run.
- Provider packages JevGen.Providers.TypeSafe and JevGen.Providers.OpenRouter are installed alongside the main package.
- Native AOT is supported; the AOT test publishes and executes a native binary in CI.
Questions about this entry
Short answers drawn from the linked project or page.
Run dotnet add package JevGen --prerelease, plus a provider package such as JevGen.Providers.TypeSafe or JevGen.Providers.OpenRouter. The prerelease flag is required because NuGet ignores prerelease versions unless you ask for them; you can also pin an exact version.
Returning the bare enum would discard confidence and the distribution over other options. ChoiceResult keeps Value, Confidence and ProbabilityOf, so a 94% answer and a 41% answer stay distinguishable. A bare primitive is available only if you opt in with AllowPrimitiveResult.
The same contract can run on TypeSafe through AddTypeSafeJev, on OpenRouter through AddOpenRouterJev, or on a gateway or your own provider. Jev is a decisions model served on its own endpoint rather than through chat/completions, and the provider handles that.
The package targets .NET 10.0 and is compatible with that framework or higher. It is published as a prerelease version, so installs need the --prerelease flag or an explicit version pin.
No. The source generator writes the implementation, the request construction, the question metadata and the result mapping, and the source generator and analyzers flow with the package as analyzer assets. Native AOT is supported, with an AOT test that publishes and executes a native binary in CI.
Register the provider first, for example builder.Services.AddTypeSafeJev with an API key, then call builder.Services.AddJevClient<ITicketAI>(). With OpenRouter you call AddOpenRouterJev and chain UseOpenRouter() on the client registration.
It emits OpenTelemetry activities and metrics, with state recording off by default, and supports retry, timeout, circuit breaking and cross-provider fallback. Confidence thresholds are handled by policies that classify results and never execute business side effects.
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.