Package Information
Available Nodes
Documentation generating…
Documentation
n8n-nodes-jev-openrouter
An n8n community node for TypeSafe Jev — TypeSafe's System One decision model — reached through OpenRouter.
Jev returns typed decisions rather than generated prose. In a single node execution you can ask several independent questions about the same state and get back calibrated probabilities — for classification, routing, verification and scoring.
Why a dedicated node? Jev is not a chat model. On OpenRouter it is served by the Decisions router at
POST /api/alpha/decisions, and calling/chat/completionsis rejected — so n8n's built-in OpenRouter Chat Model node cannot drive it. This node speaks the decisions protocol and gives you a form tailored to Jev's Noul / Choice / Score question types.
Unofficial and community-maintained. Not affiliated with, endorsed by, or supported by TypeSafe or OpenRouter.
Installation
In n8n, go to Settings → Community Nodes, select Install, and enter:
n8n-nodes-jev-openrouter
Self-hosted with Docker:
docker exec -it n8n sh
mkdir -p ~/.n8n/nodes && cd ~/.n8n/nodes && npm i n8n-nodes-jev-openrouter
Credentials
This node reuses n8n's built-in OpenRouter credential — no separate credential to set up. Create a key at openrouter.ai/settings/keys, then in n8n add an OpenRouter credential and paste it. If you already use OpenRouter elsewhere in n8n, select that existing credential.
Node configuration
- Model — defaults to
typesafe/jev-1.13. Use a dated pin such astypesafe/jev-1.13-20260917for reproducibility, or~typesafe/jev-latestto always track the newest release. - Supply State — plain text, a JSON object or a JSON array. Defaults to the whole incoming item (
{{ $json }}). - Choose Question Builder to define questions field by field, or JSON to supply a schema generated upstream.
- Give every question a Name. That name is the key its answer appears under.
Question types
| Type | You provide | Jev returns |
|---|---|---|
| Choice | Two or more labelled options, each with an optional description | choice, confidence, and a probability per label |
| Yes/No | Optional descriptions of what counts as yes and no | noul — the probability of yes |
| Score | An ordered rubric of two or more levels, lowest first | expected score, confidence, legend, and probabilities per level |
Output
| Option | Result |
|---|---|
| Append to Item (default) | Incoming fields, plus the full response under jev |
| Response Only | The full response — model, answers, usage (with usage.cost from OpenRouter) |
| Answers Only | Just answers |
Enable Simplify to reduce each answer to the single value you would branch on: the chosen label, the yes probability, or the expected score. With Answers Only and Simplify together, an item comes out as { "intent": "refund", "urgent": 0.82, "frustration": 1.4 } — ready for a Switch or Filter node.
Under Options you can set the request timeout, rename the output field, and include the OpenRouter request ID for support tickets.
Using it as an AI Agent tool
The node sets usableAsTool, so it can be attached directly to an AI Agent. The agent supplies the state, and Jev answers with a typed decision rather than free text.
JSON mode example
{
"intent": {
"type": "choice",
"instructions": "What is the customer's primary request?",
"criteria": {
"refund": "The customer requests money returned.",
"technical_help": "The customer needs a product or integration fixed.",
"information": "The customer asks a question or seeks information."
}
},
"urgent": {
"type": "noul",
"instructions": "Does the customer explicitly convey time pressure?",
"criteria": {
"true": "They ask for immediate, urgent, or time-bound action.",
"false": "They do not convey time pressure."
}
},
"frustration": {
"type": "score",
"instructions": "How frustrated is the customer?",
"criteria": [
"Calm or neutral",
"Concerned but civil",
"Very angry or strongly negative"
]
}
}
Error handling
The question schema is validated before any request is made — names must be unique, choices need at least two labels, scores need at least two rubric levels. Schema problems are reported as configuration errors; API failures are reported separately with the HTTP status, the server's message and the OpenRouter request ID.
Turn on Continue On Fail if the workflow should carry on and receive an item with an error field instead. n8n's built-in Retry On Fail handles transient failures.
Compatibility
Requires Node.js 20.15 or newer. The package has no runtime dependencies and declares n8n-workflow as a peer dependency, as n8n's verification guidelines require. The OpenRouter credential it uses ships with n8n.
Development
pnpm install
pnpm run lint
pnpm run test
pnpm run build
pnpm run dev starts a local n8n with the node linked.
To check the live OpenRouter Decisions API against every assumption this node makes (costs one decisions call):
OPENROUTER_API_KEY=sk-or-your-key node scripts/verify-api.mjs
See examples/ticket-triage.workflow.json for an importable workflow that exercises both input modes.
Do not run
pnpm run lint --fixovernodes/Jev/properties.ts. Its fixer reorders fixed-collection entries by rebuilding them, and silently dropsdisplayOptionsandtypeOptionsin the process, which flattens the per-type question form.
Credits
Forked from n3ndor/n8n-nodes-typesafe-jev (MIT), which targets TypeSafe's native API; this fork swaps the transport to OpenRouter's Decisions endpoint.