#11042·promptfoo

Add TypeSafe Jev provider

Author: athul0rameshan9Created Sep 23, 2026Updated Sep 23, 2026

What

Add a provider for TypeSafe's Jev model — src/providers/typesafe.ts, registered as typesafe:jev-latest (pinned versions like typesafe:jev-1.13.0 also supported), with docs, tests, and an example config.

Why

Jev is a "System One" model: instead of generating text, it answers typed questions about a state and returns calibrated probabilities (POST https://api.typesafe.ai/v1/systemone). Question types:

  • Choice: one of N labels → choice, confidence, probabilities
  • Score: ordered 2–10 level rubric → unrounded score, confidence, legend, probabilities
  • Noul: yes/no → a single probability (no separate confidence)

That makes it a fast, cheap judge for pass/fail and scored assertions.

Open design questions

Jev is not prompt-in/text-out, and model-graded assertions like llm-rubric expect a JSON string back ({"reason", "pass", "score"}). Before implementing, I'd like to agree on:

  1. Input mapping: how a rubric/prompt becomes Jev's state + questions. Proposal: a Noul question for pass/fail rubrics by default, with an optional Score question when rubric levels are given in config.
  2. Output mapping:
    • Noul probability → pass via a configurable threshold (default 0.5), with score = the probability
    • Score → normalized to 0–1 using the level range
    • reason: Jev returns no rationale, so I'd synthesize a short one (e.g. "Noul p=0.95 ≥ 0.5" or the matched legend label). Open to alternatives.
  3. Provider surface: implement callApi so it works as a grader via defaultTest.options.provider for llm-rubric etc., and optionally callClassificationApi so it also works with the classifier assertion (Choice question → label/probability map). Is that the right split?

Plan

  • src/providers/typesafe.ts (plain fetch, TYPESAFE_API_KEY env var)
  • Register typesafe:<model> in the provider registry
  • Docs page under site/docs/providers/
  • Unit tests + example config under examples/

Happy to open a PR once the shape above is agreed.