Verdict: worth it with changes
PR #461 (jcartu, open) is a docs-only fix plus one grammar test: docs/api.md +27/-14 and helios/src/grammar/strict.rs +12. The branch was a640a302 (reject every strict bound ≥ 2^53), which the author then reverted in e831b496; the net runtime diff against the base is empty, so no request accepted on main gains an HTTP 400 — that claim in the description is verifiable and correct.
Why it fits the charter
The charter's "What gets merged" list explicitly includes PRs that "address a maintainer request ... or bad docs," and the contributor rules say every PR is judged on its merits. This change is exactly that on both counts:
- It closes #418's last open review item (round 4, item 2): named selection "adding no instructions or decoding constraints" (
docs/api.md:522-525before this PR) and required mode "Sampling is unchanged" (:541-549) are false whenever a strict function attaches a request grammar — the whole generation is then constrained (docs/api.md:639-643,docs/core-design.md:1669-1685). - It takes the reviewer's own offered alternative: "Or leave admission as it is and document the limit, which
docs/api.mdnow states." A prior PR attempt to enforce the limit instead would have rejected generated int64 schemas, so the documentation route is the smaller footprint the charter asks for. - Goals include "Support the documented ... APIs" and JSON Schema for structured outputs, and the vision is heavy tool use. A client that believes
strict: trueenforcesmaximum: 9.2e18will execute a tool on out-of-range arguments. Naming the limit, and telling the client to validate exactly before executing, is user-facing correctness, not editorial polish.
Who benefits, and how much
Clients of Chat Completions and Responses on strict tools, especially agent/tool-loop users whose schemas carry large integer bounds (i64::MAX, epoch-nanos, IDs). The benefit is moderate, not large: it changes no behavior, it only stops the API reference from asserting something untrue and marks a place where the guarantee ends. It also prevents a future regression by keeping the current admission (which is wider than llguidance's real precision) instead of introducing 400s.
Cost and risk
Close to zero on the metrics the charter cares about: no code path, no dependency, no perf claim (and the description correctly claims none), 10 net prose lines and an 11-line test. The one durable risk is doc drift when llguidance changes — worth mitigating with a test (below). The removed paragraph did lose some useful detail (the explicit [-9,007,199,254,740,991, 9,007,199,254,740,991] integer-literal interval), which callers relying on the exact thresholds may miss; restoring the numeric limits while keeping the new wording would be strictly better.
Is there a simpler way, or duplication?
No duplication: docs/core-design.md:1669-1685 already stated the correct grammar behavior ("Named tool selection ... does not by itself enable a grammar"), so api.md was the only document contradicting it — this PR removes the contradiction rather than adding a parallel statement. The precision paragraph is new information, not restated elsewhere. The test partially overlaps strict_bounds_do_not_round_integers_or_fractional_multiples (strict.rs:3006-3025, which already covers maximum: 9007199254740992), but the 10^18 and i64::MAX rows are the reviewer's measured rows and are the only executable record of them, so they earn their place. Simpler alternative: prose only, no test — cheaper, but then nothing catches a llguidance bump flipping these statements.
Changes I would require before merge
- The inclusive-maximum sentence is wrong above 2^53.
docs/api.md:610-611says "An inclusivemaximum: 9007199254740992does distinguish the endpoint from the next integer." True for that exact value (2^53 is representable), butnormalize_integer_bounds(llguidance 1.9.1json/numeric.rs:522-533(not opened)) doesmax_val.floor()on an f64 and then the inclusiverx_int_range, so formaximum: 9007199254740995the bound rounds to9007199254740996and the grammar admits a value one above the declared maximum;maximum: 9007199254740993rounds down and rejects the valid...993. Since the paragraph's purpose is to tell clients when strict mode stops enforcing their bound, a sentence that reads as "inclusive maxima are fine" is the one dangerous sentence in it. Say that only the endpoint named in the example is exact, or state that integer ranges are approximated above 2^53 in both directions. - Say that some large bounds are refused, not just rounded. The reviewer measured, on
mainat6d6fe0c6, thatminimum: -9223372036854775808onintegerandminimum: 2^60onnumberare rejected by llguidance with a range error and so return HTTP 400. The source agrees:rx_int_range(Some(i64::MIN), ..)errors on-left, andrx_float_rangeparses integer parts withparse::<i64>().i64::MINis the standard generated int64 bound, so without a sentence here a client cannot distinguish "silently rounded" from "refused at admission" — which is precisely the distinction the PR's own "Why" section says the text should draw for theconst/enumcase. - Pin the two documented rounding examples in a test. The new test (
strict.rs:3888-3898) covers only bounds the grammar gets right, andi64::MAXpasses only because the f64 value 2^63 saturates on theas i64cast. Adding the two examples the docs now quote (exclusiveMinimum: 9007199254740992admitting the endpoint,minimum: 9007199254740993admitting...992) makes the prose a checked statement and surfaces drift when the pinnedllguidance =1.9.1(helios/Cargo.toml:62) is upgraded. - Hygiene. The description no longer carries the unrelated #418 timing provenance the reviewer flagged, good; squash the
a640a302+ reverte831b496pair to the net diff, and confirm each commit has theSigned-off-bythatCONTRIBUTING.md:9-19requires (not checkable from here).
With 1–2 fixed (inclusive-maximum wording and the refusal class), this is a small, correct, charter-aligned documentation PR that closes a real contradiction from a contributor whose prior PR the maintainer already merged. Verdict: worth it with changes — not "worth merging as is," because the current inclusive-maximum sentence understates a limit the paragraph exists to disclose, but nowhere near "not worth it."