Jev directory
CommunityJev Integrations & Adapters
@langchain/typesafe
LangChain.js integration for TypeSafe System One models. It wraps the jev classifier as a Runnable that returns typed choice, score, and noul answers with calibrated probabilities, plus agent middleware for model routing and tool gating.
- Reading time
- 2 min
- Published by
- Community
- Added
- Oct 2026
Highlights
- Answers typed questions about unstructured input with calibrated probabilities in 70-500ms.
- Every question in a single request is evaluated in parallel, so ten questions cost barely more than one.
- Question types are choice (label distribution), score (ordered rubric) and noul (single yes/no probability).
- result.model reports the versioned model that answered, such as jev-1.13.0 rather than the jev-latest alias.
- The middleware entrypoint provides modelRouterMiddleware and autoModeMiddleware for LangChain agents.
Questions about this entry
Short answers drawn from the linked project or page.
Run npm install @langchain/typesafe @langchain/core. @langchain/core is a peer dependency, so the docs recommend overrides or resolutions entries to make sure a single instance of it is resolved in your project.
TYPESAFE_API_KEY. Set it in the environment before constructing a TypeSafeClassifier, and note that the key is redacted before it reaches the LangSmith tracer.
choice returns the winning label, the full distribution and a confidence; score returns a probability-weighted number that may land between levels, plus a legend and distribution; noul returns a bare probability with no confidence and no probabilities.
No. It answers typed questions about unstructured input, returning calibrated probabilities with no string generation, no parsing and no schema wrangling, so results are read directly from the answers object.
TypeSafeClassifier is a Runnable, so calls appear in LangSmith traces with inputs, outputs and configuration, nested inside the invoking agent or chain. LangSmith does not attribute token cost to non-LLM runs, so usage appears in the traced output rather than as a costed metric.
modelRouterMiddleware classifies the latest human message once per agent run with a Choice and routes every model call in that run to the selected model. autoModeMiddleware blocks a tool call before it runs when a Noul scores it above a risk threshold, and composes with humanInTheLoopMiddleware.
Use TypeSafeRateLimitError.isInstance() rather than instanceof, since it stays correct when multiple copies of the library are in a dependency tree. Errors carry status, requestId, body and headers but never render the response body into their message, because TypeSafe error bodies echo the request content.
Reactions & coverage
Posts, threads, and videos about this entry from around the web.
Facebook: Intake Router keeps diagnosis out of the answer space at the front desk.
FacebookClinicnotes
X: OpenRouter Decision Model Rankings
X: herdr + jev, an agent router
X: A group chat bot with decision room routing
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.