llm-output-guard 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -269,7 +269,6 @@ re-released as 0.5.0. The rule it broke is the one in the table above.
269
269
  - Not a hallucination detector. It measures *shape*, never truth.
270
270
  - `REPETITION` does not work on Chinese, Japanese or Thai — a known, measured gap, not an oversight.
271
271
  - `LANG_MISMATCH` is a function-word heuristic covering `id`/`en`/`es`/`pt`/`it`/`fr`/`de`/`nl`, and is unreliable under 25 words. `expectScript` is the stronger check wherever the alphabets differ.
272
- - `expectLang: 'es'` does not reliably catch Portuguese, Italian or French: its profile is built from function words all four share. Measured, and unfixable without a threshold change — see **[docs/detectors.md](docs/detectors.md#answering-in-the-wrong-language)**.
273
272
  - `PROMPT_ECHO` cannot tell a degenerate echo from a rewrite or translation — the difference is in what you asked for, not in the text.
274
273
  - `SCRIPT_MISMATCH` and `PROMPT_ECHO` do not run mid-stream by default: both measure a property of the whole response, and a mid-stream check reads a trailing window. `earlyDocumentChecks: true` opts in, with a measured false-positive risk — see **[docs/streaming.md](docs/streaming.md)**.
275
274
  - Tool *arguments* are measured only with `checkToolArguments: true`, non-streaming responses only.
package/dist/ai-sdk.cjs CHANGED
@@ -210,7 +210,7 @@ function jsonScore(text, options = {}) {
210
210
  var PROFILES = {
211
211
  id: /* @__PURE__ */ new Set(["yang", "dan", "di", "untuk", "dengan", "ini", "itu", "dari", "pada", "tidak", "adalah", "akan", "bisa", "kita", "saya", "atau", "juga", "dalam", "sudah", "ke"]),
212
212
  en: /* @__PURE__ */ new Set(["the", "and", "of", "to", "in", "is", "that", "for", "it", "with", "as", "this", "are", "be", "you", "on", "not", "or", "can", "we"]),
213
- es: /* @__PURE__ */ new Set(["el", "la", "de", "que", "y", "en", "los", "un", "por", "con", "las", "para", "una", "es", "no", "se", "del", "al", "lo", "como"]),
213
+ es: /* @__PURE__ */ new Set(["el", "los", "las", "y", "es", "no", "muy", "pero", "este", "esta", "sus", "cuando", "donde", "porque", "sin", "hasta", "aunque", "mismo", "otro", "todos"]),
214
214
  pt: /* @__PURE__ */ new Set(["n\xE3o", "\xE9", "s\xE3o", "uma", "com", "em", "do", "da", "dos", "das", "ao", "voc\xEA", "tamb\xE9m", "muito", "mais", "j\xE1", "pelo", "isso", "seu", "sua"]),
215
215
  it: /* @__PURE__ */ new Set(["il", "di", "che", "non", "per", "della", "nel", "nella", "gli", "pi\xF9", "anche", "perch\xE9", "questo", "sono", "essere", "dei", "delle", "agli", "per\xF2", "sia"]),
216
216
  fr: /* @__PURE__ */ new Set(["les", "des", "du", "qui", "dans", "pour", "sur", "pas", "ce", "est", "plus", "nous", "vous", "avec", "cette", "aux", "\xEAtre", "mais", "leur", "tout"]),