Skip to content

Jev Model Tokengate

OpenAI-compatible proxy that holds streamed tokens in a sliding buffer and scores the full criteria matrix before release, cutting the stream before a violating token reaches the client.

Stars
4
Language
JavaScript
License
MIT
Published by
Community
Author
Thanh-Mathieu95
Last verified
Oct 2026

An OpenAI-compatible proxy that sits between your LLM and your users. It evaluates each sliding window of tokens while the response is still streaming and cuts the stream before a violating token can reach the screen.

Forks
0
Last pushed
Updated Sep 2026

Repo stats from the GitHub API, cached Oct 2026.

About this project

An OpenAI-compatible proxy that sits between your LLM and your users. It evaluates each sliding window of tokens while the response is still streaming and cuts the stream before a violating token can reach the screen. Same attack prompt, two architectures side by side. Left (post-hoc): the API key sk-proj-... and DBPASSWORD render in full, and the "content removed" notice arrives 2.98s later — 173 characters already leaked. Right (tokengate): the stream is cut inside the buffer. 0 characters leaked.

Quoted from the project's README. Read the full README.

Highlights

  • Zero leaked characters measured across 5 scenarios on 3 engines, versus 173 leaked by post-hoc redaction.
  • Swappable local, Jev, and Claude engines returning five 0-1 scores against a shared threshold.
  • Evaluates only LOOKBACK recent tokens plus current batch with ordered pipelined passes to avoid quadratic cost.
  • Policies live outside source in a config file, and a malformed criterion refuses startup rather than failing open.

Watch out

The 35ms interception target is missed at about 300ms over the public internet, and fixed-window evaluation can miss violations spanning a whole response. Copy reviewed against the repository README on 2026-10-04, not from running it.

Questions about this entry

Short answers drawn from the linked project or page.

More Jev resources like this

3GitHub stars
A single-file port of jev-ultrafast that lets Jev drive an Ego Lite browser on macOS: an in-page script indexes visible controls and one typed-choice request returns both the operation and the target index.
Jev Practices & Patterns#community#awesomejev#catalog-import
4GitHub stars
Memory admission evaluator that asks Jev three typed Choice questions on support, durability and commitment, then applies a versioned policy to recommend save, skip or defer.
Jev Practices & Patterns#community#awesomejev#catalog-import
An eval that puts Jev two questions about shadcn-ui/lint: whether each finding is a real rule violation, and whether the linter's message tells you what to change. It runs the real linter over 131 rule test cases and scores both the detections and the messages.
Jev Practices & Patterns#community#jevbest#catalog-import
24GitHub stars
Unofficial laptop study of parallel constrained decoding: prefill once, share the KV cache across fields, and decide all schema fields in one batched forward pass without writing JSON.
Jev Practices & Patterns#community#jevbest#catalog-import
23GitHub stars
Live race rig that labels 1,000 real app reviews with Jev typed questions against Gemini JSON output on identical batches, then replays recordings and re-ranks rows locally without extra model calls.
Jev Practices & Patterns#community#jevbest#catalog-import
16GitHub stars
Vendor-neutral harness that tests whether Jev reranking improves a small RAG stack, using frozen hybrid BM25 plus BGE-M3 candidates and isolating retrieval, rerank, and generation stages.
Jev Practices & Patterns#community#jevbest#catalog-import

From the Jev guides

Original write-ups on what this entry is for.

Most Jev accuracy problems are state problems. What belongs in a state, what is a pre-made judgment to leave out, and why naming the slice you ask about matters more than the wording.
Jev Practices & Patterns#state#design#primitives
Read article
A Noul returns one number and no separate confidence. How to read the value, pin its boundary with criteria, split compound questions, and set a per-action threshold that matches the cost of being wrong.
Jev Practices & Patterns#noul#primitives#confidence
Read article
A Score is a weighted position, not a ruler. Why the number can land between levels, why levels are judged separately, and how to combine several atomic scores in code instead of one crowded rubric.
Jev Practices & Patterns#score#primitives#scoring
Read article
Back to all resources

From the Jev community

Posts from builders shipping with Jev right now.

Follow @typesafeai