Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.
Python calibrationclassificationdecision-modelhuggingfacejevmodernbertmultilingualnlppythonpytorchroutingtyped-decisionszero-shot
docs(typescript): describe the controls the client really forwards
Aashish4de0e33b0e19
diff --git a/docs/typescript-sdk.md b/docs/typescript-sdk.mdindex b2c94f14..60a6a4a3 100644--- a/docs/typescript-sdk.md+++ b/docs/typescript-sdk.md@@ -33,18 +33,33 @@ inside JavaScript through its local ONNX runtime, without a Python server.Requests contain `state` and `questions`. Unless configured or supplied for aprediction, `laya-client` omits `model`, letting `laya-serve` select a localcheckpoint automatically. A client-wide or per-call `model` can select a local-checkpoint. Choice label arrays are normalized to maps with null descriptions-before transport.+checkpoint, as can the other per-request controls in the table below. Choice label+arrays are normalized to maps with null descriptions before transport.Responses preserve `model`, `answers`, and token `usage`. Laya's `routing` andanswer `action` fields are optional extensions; Noul confidence is optional too.Choice and Score confidence, distributions, and Score legends remain required.Optional extensions are validated when present.-`/v1/systemone` does not expose Python's standalone routing method or `task` and-`lang` overrides. The SDK rejects those legacy options instead of silently-ignoring them. Laya's public `/health` returns `status`, `loaded`, and `device`.-Prediction never probes health first.+`/v1/systemone` is the only endpoint the client calls, and it has no standalone routing method:+`laya-client` exposes `predict` and `health` and nothing else, and the live integration test asserts the+server answers `404` for `/v1/route`. The controls the endpoint does honour are per-request, and each is+sent only when the caller supplied the option -- an absent option leaves the deployment's own+`Router(...)` settings in charge instead of overriding them with a client-side default:++| option | request field |+| --- | --- |+| `model` | `model` |+| `task` | `task` |+| `lang` | `lang` |+| `langGuess` | `lang_guess` |+| `maxLen` | `max_len` |+| `headMaxLen` | `head_max_len` |+| `minConfidence` | `min_confidence` |++An option that cannot mean anything is refused locally, before the request goes out: a blank `task`, a+budget that is not a positive integer, a threshold outside `[0, 1]`. Nothing is silently ignored. Laya's+public `/health` returns `status`, `loaded`, and `device`. Prediction never probes health first.FastAPI detail strings and validation arrays are preserved as `LayaAPIError`messages/details. Structured error envelopes from compatible backends are also@@ -54,8 +69,9 @@ are never retried automatically.## Verification and releaseUnit tests cover request construction, all answer shapes, Laya extensions,-FastAPI errors, JSON validation, deadlines and cancellation.-Type checks cover optional metadata, rejected legacy methods/options, inferred+FastAPI errors, JSON validation, deadlines and cancellation, and hold this+page's control table to the fields the client actually puts on the wire.+Type checks cover optional metadata, inferredanswer types, and ESM/CommonJS consumers. The live integration test starts theunchanged `laya.serve` application with a tiny offline checkpoint, compares SDKpredictions against direct Python inference, and exercises routing, presets,