Jev compatibility¶
Verified against docs.typesafe.ai and laya 0.3.x source.
Deliberate, documented divergences:
- Laya-only fields are stripped:
actionon every answer, andconfidenceonnoulanswers. Responses contain exactly the Jev fields. modelechoes the serving checkpoint (e.g.laya-english), the same way Jev echoes the resolved version id (jev-1.13.0).output_tokensis0. Laya never generates tokens; this layer does not invent counts.input_tokensis the backend's token count.- Confidence formula differs: Laya uses entropy-based
1 - H(p)/log(k); Jev documents a peak-based normalization. Same probabilities can yield differentconfidencevalues — calibrate thresholds against Laya, not Jev. - Validation: choice ≤ 255 options, score 2–10 levels,
modelrequired, non-emptyquestions— all422. Context budgets mirror Jev's 64k (state + all questions) / 32k (state + longest question) accounting and surface as422, as do option sets overflowing the per-question head budget; request sizes are counted with the checkpoint tokenizer when one is loaded, word approximation otherwise. The checkpoint still truncates per-question sequences at its ownmax_len. - Score
legend/probabilitieskeys are strings on the wire ({"0": …}), matching Jev HTTP. choicecriteria as a list is accepted leniently (mapped to{label: None}); Jev requires a map.
Practical notes¶
- Unknown
modelnames are422(fail fast on typos, like Jev). 429rate-limit handling is future work; transient pressure surfaces as529withRetry-After: 1.500responses never leak backend internals; details go to server logs.