Skip to content
System One

jh1373/jev-search

Searches an Obsidian vault locally and offline with a BM25 engine, then reranks the top results with Jev only after you approve exactly what gets sent to it.

jh1373/jev-search on GitHub

Stars
0
Forks
1
Language
JavaScript
License
MIT
Last push
20 Sep 2026

Read from GitHub on . Counts change daily.

How it uses Jev

export const GATEWAY_MODEL = 'typesafe-ai/jev';
/** Undocumented AI SDK evaluation contract version; pin it and fail closed if it changes. */
export const GATEWAY_SPEC_VERSION = '4';
export const ENDPOINTS: Record<Target,{host:string;url:string}> = {
  openrouter: {host:'openrouter.ai',url:'https://openrouter.ai/api/alpha/decisions'},
  direct: {host:'api.typesafe.ai',url:'https://api.typesafe.ai/v1/systemone'},
  gateway: {host:'ai-gateway.vercel.sh',url:'https://ai-gateway.vercel.sh/v4/ai/evaluation-model'},
};
/** Published list price per million input tokens, observed 2026-09-18. Not a guarantee. Jev output tokens are free. */
export const PRICE_PER_MTOK: Record<Target,number> = {openrouter:0.042,direct:0.042,gateway:0.04};
export type Document = { title: string; heading: string; text: string };
export type Judgement = { scores: number[]; inputTokens: number | null; cost: number | null };
export type Endpoint = { url: string; headers: Record<string,string> };
/** The gateway selects the model by header; the direct and OpenRouter APIs select it in the body. */

View in src/core/jev.ts

Open on GitHub

More like this

Use cases this is tagged with