Download Latest Version 0.65.16 -- sloppy LLM JSON keeps all its fields again source code.zip (59.4 MB)
Email in envelope

Get an email when there's a new version of Langroid

Home / 0.65.16
Name Modified Size InfoDownloads / Week
Parent folder
langroid-0.65.16-py3-none-any.whl 2026-07-29 459.6 kB
langroid-0.65.16.tar.gz 2026-07-29 409.3 kB
0.65.16 -- sloppy LLM JSON keeps all its fields again source code.tar.gz 2026-07-29 58.9 MB
0.65.16 -- sloppy LLM JSON keeps all its fields again source code.zip 2026-07-29 59.4 MB
README.md 2026-07-29 2.4 kB
Totals: 5 Items   119.1 MB 79

0.65.16 — sloppy LLM JSON keeps all its fields again

A dependency-only release. json-repair 0.61.3 changed how it repairs unquoted values, in a way that silently dropped a field from the kind of imperfect JSON that weaker models emit. This release caps the dependency below that version.

:::bash
pip install -U langroid

What was going wrong

Langroid repairs malformed JSON from LLM tool calls in langroid/parsing/parse_json.py. Given an unquoted value followed by another key and a nested object — a very common shape from smaller models:

{request: foo, args: bar baz, opts: {"a": b, "c": d e}}

the behavior diverged:

result
json-repair ≤ 0.61.2 {'request': 'foo', 'args': 'bar baz', 'opts': {...}}
json-repair ≥ 0.61.3 {'request': 'foo,\n args: bar baz', 'opts': {...}}

The args field is gone — absorbed into the previous value. No exception, no warning; a tool call just arrives with one fewer argument than the model sent. If you run agents against smaller or local models that produce loose JSON, this could have silently changed what your tools received.

The fix

json-repair is now constrained to >=0.29.9,<0.61.3.

Every published release was bisected to place the cap precisely:

0.60.1  ok        0.61.3  drops the field
0.61.0  ok        0.61.4  drops the field
0.61.1  ok        0.61.5  drops the field
0.61.2  ok        0.61.6  drops the field
                  0.61.7  drops the field   (current latest)

so 0.61.0–0.61.2 remain installable rather than being excluded along with the broken releases. The lockfile resolves to 0.61.2.

Guarding against a repeat

The behavior is now asserted directly, on realistic tool-call shapes, in tests/main/test_json.py::test_repair_keeps_unquoted_value_fields — rather than being implicit in one contrived fixture string, which is how it was caught the first time. The cap is documented inline in pyproject.toml with the reproducer, so a future dependency sweep does not lift it blindly.

Upgrade notes

Upgrade if you use any agent that parses tool calls from models that emit imperfect JSON — which is most non-frontier models. If you pin json-repair yourself, note the new upper bound.

No API changes.

Upgrade

:::bash
pip install -U langroid

Full changelog: 0.65.15...0.65.16

Source: README.md, updated 2026-07-29