// open source · for teams running llm calls in production

Stop paying LLM prices for yes/no answers.

jev-swap finds the LLM calls in your code that only ever return a label, a yes/no or a 1–5 score, rewrites them for TypeSafe Jev with your current call as the fallback, and proves the swap on your own traffic.

No API key needed to scan · TypeScript, JavaScript, Python

44% cheaper3.6× fastertypical for decision calls in public code. See the data
triage.tsapi.tsspam.pydb.pychat.tsmoderate.tsutils.pysummarize.tsauth.tsrefunds.pybilling.tsroute.tschoicecategory · 3 optionsyes / nourgent · confidencescorepriority · 1–5jev// your codebase// decisions found// typed answers on jevcost + speed vs your modelllm fallback below threshold$ jev-swap scan ./appFound 5 candidate(s):triage.ts:15 category urgent priorityspam.py:8 answer (yes/no)moderate.ts:6 action contains_piirefunds.py:9 decision fraud_riskroute.ts:21 intent
triage.tsapi.tsspam.pydb.pychat.tsmoderate.tsutils.pysummarize.tsauth.tsrefunds.pybilling.tsroute.tschoicecategory · 3 optionsyes / nourgent · confidencescorepriority · 1–5jev// your codebase// decisions found// typed answers on jev$ jev-swap scan ./appFound 5 candidate(s)triage.ts:15 category urgentspam.py:8 yes/no
344
decision calls found in public repos so far source
44%
median cost cut per call, counting the ones with no saving source
3.6×
median speedup: each model's OpenRouter latency vs Jev at {JEV_MS} ms, its p50 over 45 live calls we timed on 2026-09-24 source
$0.042
per 1M input tokens on Jev. Output tokens are free. source

Your LLM is making decisions. You're paying it to write essays.

Ticket routing, spam checks, moderation verdicts, refund triage, priority scores: each one runs a text-generation model to return one word from a list you already wrote.

Jev is built for that job. Send the input and typed questions; get back a typed answer with probabilities and a confidence score, with no text generated and no output tokens billed.

The hard part is finding which calls qualify and trusting the swap. That's what jev-swap does.

// cost and speed

The same decision at a fraction of the cost, and faster.

On Claude Sonnet 5, a typical 400-token decision call costs $0.00100 and takes about 3.1 s. On Jev it costs $0.000024 and answered in 327 ms at the median of our live test calls.

Claude Sonnet 5 · per call$0.001000$1,000.00 per million calls
jev · per call$0.0000241$24.11 per million calls
difference97.6% lower41.5× cheaper · 9.6× faster

A 400-input, 20-output-token call at OpenRouter list prices fetched 2026-09-24: Claude Sonnet 5 at $2 in / $10 out per 1M tokens, Jev at $0.042 in, output free. Jev bills its own framing: 574 input tokens for this call, from 259 + 31 per question + 0.71 × input, measured on live calls.

Independent check: a test of 1,000 eight-way routing decisions found Jev about 40× cheaper than GPT-5.6 Terra ($0.0151 vs $0.6089). AY Automate

// how it works

Three commands from LLM call to Jev call.

</>
01 · scan

Find the decisions

Reads your code's syntax tree and flags LLM calls whose output is an enum, a boolean, or a small integer range, whether it's a zod schema, a Pydantic model, JSON schema, or a raw HTTP call to the API. Also catches plain "answer yes or no" prompts.

npx jev-swap scan ./app
llm()jev
02 · convert

Generate the Jev version

Writes one module per call, in the same language, on TypeSafe's official SDK: one short question per field, all in a single request. Free-text fields Jev can't produce are flagged, never silently dropped.

npx jev-swap convert
jevyour llm
03 · shadow

Prove it on your traffic

Replays inputs your LLM already answered through Jev and measures agreement, Jev's latency and cost per call. It picks the confidence threshold that hits your accuracy target and writes it into the code.

npx jev-swap shadow logs.jsonl

// the safety net

Jev when it's sure. Your LLM when it isn't.

Every Jev answer carries a confidence score. The generated code acts on Jev above your threshold and calls the model you use today below it, so the cases Jev isn't sure about keep the accuracy you have now. Your existing call stays in the code.

// generated: jev-swap-out/jev/triage-classifyTicket.ts
export const THRESHOLD = 0.7; // set by shadow run

const ticket = await decideWithFallback(
  text,
  () => classifyWithLLM(text), // your existing call
);
ticket.source // "jev" or "llm"
jev answerllm≥ t ?// every decision// confidence ≥ THRESHOLD// below: your existing call

// in the wild

What we found in public code.

See what open source could save
1,035public repos scanned
150make decisions with an LLM, including widely used projects like firecrawl and LightRAG
44%median cost cut per decision call
3.6×median speedup on Jev

Estimates at OpenRouter list prices and latency, data as of 2026-09-24. Every call links to its file and line; here's the method.

// also from jev-swap: the shadow proxy

Or watch it happen on live traffic.

Point your OpenAI or Anthropic client at the shadow proxy. Every request still reaches your model untouched, while decision calls are mirrored to Jev in parallel and a live dashboard compares answers, latency and cost.

Meet the shadow proxy
llm: billingjev: billing · 0.94agree · faster · cheapermatchmirrorcomparelatencycost</>llmjev// your app// shadow proxy// your llmforwarded unchanged// jev · mirrored70–500 ms$0.042 / 1M inyour app · triage.ts// point your SDK at the proxynew OpenAI({ baseURL: "http://localhost:8787 /openai/v1"});

// savings calculator

What are your decisions costing you?

Plug in one decision-type call from your app. The share Jev handles comes from your shadow report. Until you run one, it's your estimate.

OpenRouter list prices per 1M tokens, fetched 2026-09-24. Edit the prices below for a different model or a negotiated rate.
you could save / year a month · lower cost on this call
Today, all LLM/mo
Hybrid: Jev + LLM fallback/mo
All Jev/mo

Hybrid = Jev on every call + your LLM on the share Jev isn't confident about. Jev priced at $0.042 per 1M input tokens, output free. Jev input tokens = 259 + 31 per question + 0.71 × your input tokens, fitted from live calls. Check your provider's current rates, then measure with a shadow run.

// the report

A report your team can review in the pull request.

Every shadow run writes a REPORT.md that drops straight into a pull request: agreement with your current model per field, a confidence-versus-coverage table, the recommended threshold, and cost per call on your real token counts.

Measured on inputs your model already answered, not on a benchmark.

# jev-swap-out/REPORT.md
## triage-classifyTicket  src/triage.ts:15

Agreement with your model      per field: category, urgent, priority
Coverage vs confidence         share of calls Jev answers at each threshold
Recommended threshold          lowest one that meets your accuracy target
Latency                        Jev p50 and p95 on your inputs
Cost per call                  your model vs Jev vs hybrid, on your token counts

Reads the SDKs you already use.

// ts · js

TypeScript & JavaScript

OpenAI chat completions and Responses, Anthropic Messages including forced tool schemas, the Vercel AI SDK (generateText, generateObject, Output.choice), and raw fetch/axios calls to those APIs. Reads zod and JSON schema.

// python

Python

OpenAI, Anthropic, LangChain's with_structured_output, and raw requests/httpx calls. Reads Pydantic models, Enum classes, Literal, Field(ge, le) and JSON schema dicts, even when they live in another file.

Questions

Does it touch my code?

No. It writes new modules and a report into jev-swap-out/. You decide what to merge.

Do I need a Jev API key to try it?

Not to scan or convert. Shadow runs call Jev, so they need a TypeSafe API key in TYPESAFE_API_KEY.

What if Jev gets one wrong?

Below the confidence threshold, the generated code calls your existing LLM instead. The shadow run sets that threshold from your data, against the accuracy target you choose.

Is Jev always cheaper?

No. Against mid-size and large models it is, by a wide margin. Against the cheapest small models, like Gemini Flash-Lite, the cost can come out about even or higher, and the case is speed. The explorer shows every call, including the ones with no saving.

What won't it convert?

Anything that generates text: summaries, drafts, explanations. Jev doesn't write, so those calls stay on your LLM, and any text fields mixed into a decision schema are flagged for review.

Is this made by TypeSafe?

No. jev-swap is an independent open-source tool built on TypeSafe's official SDKs.

See what your decisions cost. One command.

Node 22.12+. Python 3.9+ on your PATH for Python projects.

# run it on your app, no install needed
npx jev-swap scan ./your-app
npx jev-swap convert
npx jev-swap shadow logs.jsonl \
  --llm-price-in 2 --llm-price-out 10

# or install it
npm install -g jev-swap