Repository navigation
0.10.13 (behind DARKBLOOM_GEMMA_JSON_ANSWERS): Gemma 4 JSON answers are grammar-constrained after the thought - #2071
Merged
Merged
Conversation
The tests and the API, no behaviour: GemmaAnswerPieces decodes nothing, GemmaJSONAnswerPolicy declines every request, and the constraint admits nothing, so the new suites fail. - GemmaAnswerPiecesTests: SentencePiece pieces as the bytes the decoder writes (U+2581 spaces, non-ASCII byte fallback, no ASCII byte fallback, control tokens and <unusedN> slots never text), and the pinned contract (marker ids, 262,144 ids, terminators among the engine stops). - GemmaJSONAnswerConstraintTests: one JSON value across token boundaries; non-ASCII bytes only inside strings; fences, prose and endless blank lines refused; a free thought then the answer (the close as its token, spelled from pieces, or fused with the value); no control spelling in the answer; schemas (nested, enums, required, maxItems, keys once); root scalars; the mask independent of the budget; past the state cap the answer continues unconstrained. - GemmaJSONAnswerPolicyTests: eligibility per model type, format and thinking; the DARKBLOOM_GEMMA_JSON_ANSWERS switch and its launchd passthrough; out-of-scope requests keep today's path; unsupported schemas (incl. $ref) fall back to a JSON object or prompt-only, never a refusal; a cluster pair or native-tracked engine gets no Gemma JSON constraint. - GemmaJSONAnswerServingTests: through the scheduler and bridge, streaming, thought then answer through the Gemma 4 parser, a fence dropped, a budget cut stays length with no error, unformatted requests unchanged. - GemmaJSONAnswerRealTokenizerTests (DARKBLOOM_TEST_GEMMA_TOKENIZER_DIR): every piece equals the shipped tokenizer's decode; real prompts and answers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e thought OpenRouter scores 2.1-5.0 % of Gemma 4's structured outputs as failures (41K-108K a day): the provider neither constrained nor checked them. A text request on gemma4 / gemma4_text with a JSON response_format, no tools, no tool_choice, no client stop, the gemma4 reasoning parser and the pinned chat template now samples under GemmaJSONAnswerConstraint: - Vocabulary: Gemma's tokenizer is SentencePiece BPE with byte fallback, not byte-level. GemmaAnswerPieces gives every id the bytes its decoder writes (U+2581 a space, <0x80>..<0xFF> that byte, other pieces their UTF-8); the 24 added tokens, <unusedN> slots and ASCII byte-fallback tokens are never text (a byte-fallback run that is not UTF-8 decodes to U+FFFD per token, so an ASCII byte spelled that way could vanish). Pinned: <|channel> 100, <channel|> 101, <turn|> 106, <eos> 1, exactly 262,144 ids, terminators among the engine stops. Built once per tokenizer and stop set. - Phases: thinking off renders a closed empty thought, so output starts in the answer; thinking on may open a free thought (no EOS, no added token) that the first <channel|> ends, as its token or spelled from pieces, or answer at once. The answer is one JSON value of the shared FlintJSONGrammar (json_object, or json_schema within the subset); no Gemma control spelling completes in it; <turn|>/<eos> only once the value is complete, and after a self-delimited value the terminator only. Whitespace outside strings runs at most 64 bytes, so a model reaching for a fence cannot loop on newlines. - Best effort: no post-validation, so a budget cut stays length as before; past 16,384 interned states the answer continues unconstrained instead of failing; an unsupported json_schema with an object root is held to a JSON object, any other keeps prompt-only steering; a cluster pair or native-tracked engine (which refuse token constraints) gets the request unconstrained (EngineV2Bridge.admittedConstraint). - DARKBLOOM_GEMMA_JSON_ANSWERS=off restores prompt-only answers; LaunchAgent passes it to the launchd job. A constrained row never drafts (mtpBasicEligible); on Gemma's non-recurrent target its decode steps run target-only for every row in them, as a stop or penalty row does today. Docs: inference.md, configuration.md; changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iew fixes From the independent review of ab972c2 (APPROVE WITH NITS) and the first local compile: - Mask keys: states that differ only in a whitespace run no piece can push past the 64-byte cap admit the same tokens, so they share one mask key (GemmaJSONAnswerBoundary.maskEquivalent, using the vocabulary's longest leading whitespace run, 31 bytes for Gemma 4). Indentation no longer multiplies O(vocabulary) mask builds and uploads. - Host memory: no per-state allowed-set cache (the sampler keeps the uploaded mask per key); at most two broad allowed sets per request. - A tool-free tool_choice "auto" is eligible (the same request). - "held to a JSON object" is logged only once the constraint is built. - Comments and docs: a byte-fallback run decodes as a whole (U+FFFD for a run that is not UTF-8); no tokenizer clean-up for Gemma; leading whitespace before the thought stays content. - Tests: compile fixes (raw strings holding "#, nested #require, a Sendable static fixture); a long pretty-printed answer stays far below the state cap and shares masks; whitespace runs share a key until the cap is in reach; an enum spelling a Gemma control in an object root is held to a JSON object; the real-tokenizer check tolerates swift-transformers' clean-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… state-cap walk reaches a fourth state The synthetic Gemma tokenizer spelled "model" and "thought" one character at a time, so the rendered prompt's tail outgrew ReasoningPromptProbe's eight tokens and the policy (correctly) declined: the shipped tokenizer keeps both words whole (checked by GemmaJSONAnswerRealTokenizerTests). A string body is one interned state, so the state-cap test now walks to the colon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Behavior-preserving, from the required refactor-pass subagent (earnings/gemma-json-evidence/review/REFACTOR.md): one guard for the bounded state in nextState and Node.maskEquivalent for the mask-key bookkeeping; clearer private names (thoughtOpen, thoughtCloseMarkers, extendWhitespaceRun); comments and the inference.md section corrected (the answer ends with <turn|> or <eos>; the thought admits the two thought markers; the caps named); test fixture shorthands. Token sets, transitions, mask keys and interning are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…tokenizer decode; stamps From the delta review of db19ace (APPROVE WITH NITS): - every mask equals exactly the tokens its state accepts (plus the terminators once complete) across whitespace runs, in the opening phase and three answer positions, including the runs where mask sharing stops; - the real-tokenizer check is exact again (the provider's loader turns the tokenizer's clean-up off for Gemma) and asserts that a space before punctuation survives; - the changelog says a tool-free "auto" is covered; inference.md and configuration.md restamped 2026-11-13. No source change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
… object
A json_object answer's root is an object, so the walk to the array position
starts with {"a": [1, (the bare [1, prefix was refused at the root, as it
must be).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
…de its keys The LaunchAgent doc lines move next to the prompt-cache knobs, in the order of the passthrough keys, which also keeps them off the line #2071 inserts after. Comment only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hemas as written
The GPU check's one invalid answer of 100 (base 0.10.12: 87/100 valid; this
branch: 99/100) was a Pydantic schema (, $ref, an optional field as
anyOf with null) held to a JSON object: a stray token became a key.
ResponseSchemaRewrite rewrites a json_schema in the shapes common clients
generate into the shared subset where the result admits exactly the same
instances: local $refs into the root's $defs/definitions inlined (no
recursion, no escaped or remote pointers, annotations only beside them), a
one-branch allOf unwrapped, an anyOf of one schema and {"type":"null"} made
nullable (null added to its finite values), the root's $schema/$id/$comment
dropped, at most 4,096 nodes. Anything else keeps today's fallback (a JSON
object when the root is one, else prompt-only). The policy tries the request's
schema, then the rewrite, then the fallback.
Tests: the client shapes compile exactly ($defs, definitions + $schema,
allOf, nullable enum); the GPU check's Pydantic person keeps its keys and
requirements; recursive, remote, constrained and wider references still fall
back. Local: 61 tests in 10 suites pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
…s, within its node budget A JSON pointer reads "a/b" as a path and "a~1b" as the name "a/b", and a fragment may percent-encode, so a definition whose name needs escaping is never resolved: its references fall back instead of reaching the wrong definition. Tests: escaped and nested pointers are refused, a definition graph that doubles past 4,096 nodes is refused, zod's named shape (a root $ref) is enforced as written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
…3 fold resolution #2069 moved its LaunchAgent note above the template-loops line, so #2071 and #2069 now also merge cleanly on their own; this tree equals that clean merge (ecfa075 + a2ab578). The conflict here is only against this branch's earlier resolution of the same comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
…06 to 2020-12 From the second delta review (REQUEST CHANGES at 0829cad): - bounded work: the walk stops past the compiler's 16 levels and past 8 references or compositions in a row, and tracks the references it is inlining in one set (insert and remove) instead of copying it per hop, so a 4,000-hop chain or a 100-level chain is refused at once; - a root $schema is dropped only when it names draft-06, draft-07, 2019-09 or 2020-12 (draft-04 has no const, draft-03 spells required as a boolean); any other value keeps the fallback; - $comment is dropped everywhere, not only at the root. Tests: the rewrite's output for anyOf-null over an object, an array, const, a type array and an enum with null, and for reference/allOf annotations and the meta-schemas; refusals for draft-04, a non-string $schema, a two-branch allOf, anyOf with a constraint beside it or a ["null"] branch, a non-object $defs, escaped and self references, and the three bounds; nested $id, $anchor and $defs fall back to a JSON object; the mask oracle also covers a position inside a string and the closed value. Docs list the conditions. Local: 63 tests in 10 suites pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the fourth delta review (REQUEST CHANGES at 2354404, the rest APPROVE WITH NITS): string hashing is linear in length and was not charged, so a long reference or property name reached from many places could burn CPU on the request path. A reference costs one unit per 64 bytes of its path before it is looked up, inserted or removed, a property name the same before it is hashed, and the annotation check refuses a key longer than 11 bytes (no keyword or annotation is longer) before hashing it. Tests: a 100,000-byte reference reached from 64 properties and 64 property names of 32,768 bytes are refused. Local: 63 tests in 10 suites pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
From the fifth delta review (APPROVE WITH NITS at 347dc46, finding 1 recommended before ready): a native non-ASCII key is compared by normalizing, so a long run of combining marks made each dictionary probe that landed on it linear in its length, unpaid. A visited node with a key longer than additionalProperties (20 bytes, the compiler's longest) is refused before any lookup, as the compiler would refuse it; a definition name over 256 bytes is not registered; isNull checks the keys and the type's length before comparing. No result changes for a schema the compiler takes. Tests: a 21-byte key and a 257-byte definition name are refused, a 256-byte name resolves. Local: 63 tests in 10 suites pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
…copy From the sixth delta review (REQUEST CHANGES at 941157b): the compiler reads a node's type and required names on every inlined copy, and their length was the client's, so a fan-out of one definition could make the compiler lowercase or hash megabytes per copy. The walk now bounds each as the compiler could ever take it, before copies multiply: a type name of at most 7 bytes (boolean, integer), a type array paid per member, at most 128 required names of at most 64 bytes each (a declared property name). Anything else could never compile, so results are unchanged where the compiler compiles; the type doc lists these refusals and the earlier key and definition-name limits. Tests: an 8-byte type name, an 8-byte type member, a 20,001-member type array, a 65-byte and a 129th required name are refused; an upper-case 7-byte type, a [T, null, null] type and a short required list pass unchanged. Local: 63 tests in 10 suites pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
…c comments only) The required refactor pass over the review-round hardening (2354404 to 3502545; subagent report review/REFACTOR-3.md): the type doc says the key, type and required limits are what the compiler refuses wherever it reads them, refused at every node (the seventh delta review's nit: the old wording said "never"), and maximumWork's doc lists the per-member charges. No executable line changed. One accepted boundary test from the same review: a 64-byte property name, required. Local: 63 tests in 10 suites pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 13, 2026
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
…int (0.10.13 final fold; head 3ce6f5c)
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0.10.13 (behind its switch): Gemma 4 JSON answers are grammar-constrained after the thought
Why. OpenRouter scores 2.1–5.0 % of Gemma 4 26B's structured outputs (
response_format) as failures:41K–108K bad answers a day, the largest absolute count of any of our models. The provider neither constrained nor
checked Gemma's JSON: stray tokens, prose and schema misses passed through. Peers that constrain sit at 0.1–0.9 %.
On Mac A, signed 0.10.12 answered 87 of 100 structured requests validly; this branch answers 100 of 100 (three runs).
What. A text request on
gemma4/gemma4_textwith a JSONresponse_format(json_object, orjson_schema),no
tools(tool_choiceabsent or a tool-free"auto"), no clientstop, no media, thegemma4reasoning parserand the pinned chat template is sampled under
GemmaJSONAnswerConstraint:JSONAnswerVocabularybuilder can't read it.GemmaAnswerPiecesgives every id the bytes the decoder writes(U+2581 → space,
<0x80>…<0xFF>→ that byte, other pieces → UTF-8). The 24 added tokens, the<unusedN>slotsand the ASCII byte-fallback tokens have no piece: the decoder turns a byte-fallback run that is not UTF-8 into one
U+FFFD per token, so an ASCII byte spelled that way could erase a quote; every ASCII character JSON needs has its
own piece. Pinned:
<|channel>100,<channel|>101,<turn|>106,<eos>1, exactly 262,144 ids, theterminators among the engine stops. Built once per tokenizer (2.3–2.9 s in a debug build).
free thought (no EOS, no added token) that the first
<channel|>ends — as its token or spelled from pieces, as theSDK's text-based Gemma 4 parser reads it — or answer at once. The answer is one JSON value of the shared
FlintJSONGrammar; no Gemma control spelling can complete in it;<turn|>/<eos>only once it is complete;after a self-delimited value only the terminator; whitespace outside strings ≤ 64 bytes per run.
json_schemaoutside the shared subset is first rewritten into it where theresult admits exactly the same instances (
ResponseSchemaRewrite):$refs to plainly named entries of the root's$defs/definitionsinlined, a one-branchallOfunwrapped,anyOf[S,{"type":"null"}] made nullable, withonly annotations beside them;
$comment, the root's$idand a draft-06…2020-12$schemadropped. Bounded on therequest path: at most 16 levels, 8 references or compositions in a row, and a work budget that pays for every node
copied and every byte hashed (
maximumWork). That covers Pydantic v1/v2, OpenAI's strict conversion andzod-to-json-schema (named or not). Anything else whose root is
"type":"object"is held to a JSON object;otherwise prompt-only.
max_tokenscut stayslengthasbefore. Past 16,384 interned states the answer continues unconstrained. A cluster pair or native-tracked engine,
which refuse token constraints, gets the request unconstrained (
EngineV2Bridge.admittedConstraint).DARKBLOOM_GEMMA_JSON_ANSWERS=off(0,false,no) restores prompt-only answers; default on;LaunchAgent forwards it to launchd.
Unchanged. Requests without a JSON format (the policy returns nil for them); Qwen, Flint, GPT-OSS; Gemma's tool
constraints; the loop guard and exit-thinking (already off for JSON requests); the SDK pin.
Speculative decoding. A constrained row never drafts (
mtpBasicEligible), and Gemma's target is not recurrent,so a decode step holding one runs target-only for every row in it, as a
stop/penalty/logprob row does today.Measured below: JSON rows decode at the same speed as on 0.10.12; constrained greedy answers are identical with MTP on
and off.
Before / After: observable behavior
flowchart LR subgraph Before["Before (0.10.12)"] A1["Gemma 4 request with response_format"] --> B1["format instruction in the prompt"] B1 --> C1["free sampling: thought, then answer"] C1 --> D1["answer may hold a stray token, prose or a schema miss (13 of 100 on Mac A)"] end subgraph After["After (DARKBLOOM_GEMMA_JSON_ANSWERS on, the default)"] A2["Gemma 4 request with response_format"] --> B2["same prompt"] B2 --> C2["thought: free"] C2 --> E2["answer: every token masked to the format's JSON grammar"] E2 --> D2["one JSON value of the format, then the turn ends (100 of 100, three runs)"] endBefore / After: code flow
flowchart TD subgraph Before["Before"] F1["ToolConstraintFactory.make"] --> Q1["QwenJSONAnswerPolicy: nil for gemma4"] Q1 --> N1["no token constraint: prompt-only"] end subgraph After["After"] F2["ToolConstraintFactory.make"] --> G2{"GemmaJSONAnswerPolicy: switch on, gemma4, JSON format,<br/>no tools / stop / media, pinned template and tokenizer?"} G2 -- no --> Q2["QwenJSONAnswerPolicy, as before"] G2 -- yes --> S2{"answerFormat: the schema, else ResponseSchemaRewrite (exact),<br/>else a JSON object for an object root"} S2 -- none --> Q2 S2 -- format --> K2["GemmaJSONAnswerConstraint (vocabulary cached per tokenizer)"] K2 --> B2{"EngineV2Bridge.admittedConstraint:<br/>cluster pair or native-tracked engine?"} B2 -- yes --> U2["submitted unconstrained"] B2 -- no --> M2["CBv2 sampler masks: opening, free thought, JSON answer"] endFiles
Inference/GemmaJSONAnswerConstraint.swiftInference/Tools/GemmaJSONAnswerPolicy.swiftadmittedConstraintInference/Tools/ResponseSchemaRewrite.swiftInference/Tools/ToolConstraintFactory.swiftInference/Engine/Bridge/EngineV2Bridge+Submission.swiftService/LaunchAgent.swiftinference.md,configuration.md),changelog.d/gemma-json-answer-grammar.mdGemmaJSONAnswerConstraintTests,GemmaJSONAnswerServingTests,GemmaJSONAnswerRealTokenizerTestsEvidence
pass (
7891de7713's stubs; its test files had compile errors fixed in2a888f6438).production
gemma-4-26b-qat-4bitsnapshot (DARKBLOOM_TEST_GEMMA_TOKENIZER_DIR, template SHA94899c0f…): everyallowed piece equals the decoder's output for that id; the real template's tails give the expected phases; real
tokenizations of a direct answer and of a thought-then-answer walk through and end with
<turn|>. Tests cover thebyte mapping, the phase machine across token boundaries, every mask against its transitions (an oracle over
whitespace runs, in a string and at the closed value), nested / enum /
$ref/ nullable schemas, a thought thenthe answer, streaming, a
lengthcut, the switch and its launchd passthrough, engines that run no constraint, andthe rewrite's output, refusals and bounds. MTP is covered on the GPU (its eligibility rule lives in the SDK's engine
loop): constrained greedy answers are identical with MTP on and off.
cab7aed23a(run 43412897091: build + both provider unit shards), as at3502545903(the last reviewed source; the head adds doc comments and one boundary test),db19ace157and2baa9b5e00.Repository checks at the head:
changelog.py checkanddocs-impact-check --base 6bc14de2c2pass;docs-checkreports only 3 links into the SDK submodule that predate this branch (not checked out locally).
review/in the evidence folder): first review APPROVE WITH NITS(
ab972c2008); delta review APPROVE WITH NITS (db19ace157). The schema rewrite took six rounds, each finding a waya small body could make the request path do large work through
$reffan-out, each fixed: unbounded chain depthand an unchecked
$schema(e6bfd86bf7); copies of large nodes (2354404dc4); string hashing (347dc46b00);long non-ASCII keys (
941157b8ed); the compiler's per-copytype/requiredreads (3502545903). **The lastreview, APPROVE WITH NITS at
3502545903, lists everything that runs on the rewritten output and finds every steppaid by the walk or bounded by a small constant.
AGENTS.md):db19ace157for the constraint and policy (CHANGED);3810f18e63for the rewrite (CHANGED: one compile helper, named branches, bound wording);cab7aed23afor thereview-round hardening (CHANGED, doc comments only, closing the last review's wording nit). No behavior change.
3c0c5ff0…; cand = release builds of this branch on the samemetallib
5b97893c…; 100 structured requests: 50json_object, 50json_schemaacross 10 shapes, 1 in 5 withthinking; 4 workers):
db19ace157ecfa0750d8(+ rewrite), run A941157b8edlength)$refschema held to an object)lengthlengthDARKBLOOM_CBV2_MTP=0): 10/10 identical. Constrained rows don'tdraft, yet JSON decode matches 0.10.12 at c=1 and c=2: no speed cost.
json-answerlog lines in every GPQA arm), andtheir speed and finish reasons match 0.10.12. Their greedy text is not byte-stable run to run on this stack:
the same build with the switch on and off gives 1/8 identical GPQA-shaped outputs (temperature 0, 1,024 tokens),
diverging at the same near-tie positions as 0.10.12 vs this branch (0/8), so byte identity is no signal here.
2354404dc4…3502545903) only add refusals and costs for adversarial schema shapes, none ofwhich the request set uses;
941157b8edis the last build measured.Fold (0.10.13)
fix/gemma-json-answer-constraint-fold013(thishead + 0.10.13: strict Qwen 3.5-family tool calls follow their schemas in the sampler (DARKBLOOM_STRICT_TOOL_GRAMMAR) #2069's head; since 0.10.13: strict Qwen 3.5-family tool calls follow their schemas in the sampler (DARKBLOOM_STRICT_TOOL_GRAMMAR) #2069 moved its LaunchAgent note the two also merge cleanly). Neither PR edits the shared JSON
lexer; the constraint paths are disjoint.
ToolConstraintFactory.make(keep both blocks, Gemma first) and a semantic one git does not see: fix(provider): JSON answers on Bonsai 2 and Nemotron 3.5 Lightning follow their schema in the sampler #2075 renames
JSONAnswerProfile.init'sfirstAddedTokenID:tobpeIDs:, soJSONAnswerProfile.gemma4must readbpeIDs: 0..<0. Checked (0.10.13 (behind DARKBLOOM_GEMMA_JSON_ANSWERS): Gemma 4 JSON answers are grammar-constrained after the thought #20710829cad4f9+ fix(provider): JSON answers on Bonsai 2 and Nemotron 3.5 Lightning follow their schema in the sampler #2075154fd29c60): with that line the merged tree builds and the 62 Gemma/Qwen JSON tests pass.Limitations and follow-ups
typeorrequiredat positions the compiler ignores (a safe fallback, neveran error); an optional charge per enum value would make the last unpaid per-copy constants exact (a few
milliseconds at most). Pre-existing, outside this PR: the compiler sorts property names before validating them, so
a raw body with 128 huge names costs tens of milliseconds once (Qwen and Flint formats already reach it).
FlintJSONContentAutomaton.swiftstill admits a lone\uD800escape (Qwen, Flint and Gemmaanswers; 0.10.13: strict Qwen 3.5-family tool calls follow their schemas in the sampler (DARKBLOOM_STRICT_TOOL_GRAMMAR) #2069 refuses it in its own grammar): a shared fix after both land.
"auto"admission yet.