Repository navigation
0.10.13: strict Qwen 3.5-family tool calls follow their schemas in the sampler (DARKBLOOM_STRICT_TOOL_GRAMMAR) - #2069
Merged
Merged
Conversation
…s in the sampler (red) The API only (no request is constrained yet) and the tests: nested objects, arrays, enums, integers vs strings, $ref/$defs, anyOf with null and open objects, required/optional/duplicate/undeclared parameters, reasoning on and off, multiple calls, auto vs required/named/none, unsupported keywords left unconstrained, the per-model switch and its launchd passthrough, the parser reading against Qwen35ToolCallParser, random calls drawn from the masks, and streamed deltas through the router and through the scheduler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s in the sampler A strict auto call is checked against the caller's schema when its frame closes, after the answer started streaming, so a call that missed the schema failed a started response (OpenRouter's main remaining Qwen 3.8 uptime cause). On Qwen 3.8, 3.6 and 3.5 (qwen3_5, qwen3_5_moe) on one Mac the sampler now holds every call of a request that declares a strict function to the declared schemas: a declared function, declared parameters at most once, required ones before </function>, and values the call parser reads as schema-valid arguments (text, an enum's exact values, or one JSON value of the declared schema, by the parameter's rendered type). Reasoning and text stay free, auto still decides whether to call, and the prompt does not change. Local $ref/$defs are inlined like the coordinator's resolver; anyOf/oneOf with null, a single allOf and objects beside an open object are folded; annotations (format included) are dropped. A schema outside the shared subset, a cluster pair, a native-tracked engine, media, another family or tool choice keep today's unconstrained calls, never a refusal. The loop guard stays on for these requests. A constrained row drafts no MTP tokens (SDK). DARKBLOOM_STRICT_TOOL_GRAMMAR (off word = today; a list picks builds) and DARKBLOOM_STRICT_TOOL_GRAMMAR_ALL_TOOLS (also non-strict requests) reach launchd providers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…e suite's SplitMix64; a real-tokenizer walk The property test's generator was a second internal SplitMix64 in the ProviderCoreTests target (ThroughputSweepTests and SSDBlockIndexTests declare one); it is a private StrictGrammarRandom now. A suite gated by DARKBLOOM_TEST_QWEN_TOKENIZER_DIR builds the vocabulary from the shipped Qwen tokenizer, checks the rendered prompt boundary with tools for thinking on and off, and walks a real tokenization of a call through the grammar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cost as the engine applies it A nested JSON string could end in a lone \uD800-\uDFFF escape, which the parser's JSONSerialization refuses, leaving the whole object or array parameter a string the strict check rejects (review M1). JSON values now never spell a surrogate escape (nor a backslash before such text); other escapes and characters written as such are unchanged. Each span's markers are built once per constraint instead of per byte. As with constrained JSON answers, a constrained row stops MTP speculation for every row of the decode steps it shares on these engines, not only its own (review M2): docs, changelog and the policy's comment say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vior change) From the dedicated refactor-pass subagent (AGENTS.md): drop the unused isInsideCall, build the JSON value markers from the text ones, correct a test suite name and the switches' on words in comments, and keep the forbidden spellings once as strings. Masks, transitions, eligibility, switches and the hook API are unchanged; the suite passes (20/20 in the trimmed local run). 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
…l marker stays text
A call now commits at <function= (after optional whitespace following
<tool_call>), where the parser and the frame scanner commit to one; any other
first byte is text again, as without the grammar, and the text watcher sees
the bytes since the marker. { (the JSON dialect) and a non-ASCII byte right
after the marker are refused (review S1). With parallel_tool_calls false no
call opens after the first one closed (S3).
A parameter the streamed call would expose as text while the parser converts
it (a {"type":"null"} parameter) declines the request:
QwenStrictToolSchema.streamsAsText mirrors Qwen35ArgumentStreamer and a test
checks it against the streamer (M3). The scheduler hook reads the switch
first and counts the grammar's setup, the first request's vocabulary build
included, in the profile's tool_constraint duration (S8). Opening masks are
cached by the bytes matched, stop tokens are merged into sorted masks instead
of re-sorting, and opaque-span masks are keyed by whether stops are allowed.
Tests: the mention, single-call and streamer-mirror tests; the property test
draws calls for the $ref and union fixtures too and checks each one parsed
and streamed. Docs and changelog: the free phases' tokens (S4), calls inside
the thought (S2), the exit-thinking continuation (S5), and the MTP cost with
up to 8 decode rows (M2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
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
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
…es the default builds The third independent review's nits (approve with nits, no must-fix): the architecture note says the MoE builds' cards' presence penalty is what keeps them from drafting, the configuration row says a list replaces the default builds, and the serving tests note that they expect the switch unset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
…ties beside it takes the grammar (red)
Tau2's tools reach the provider with each item union inlined and the render
repair's type and empty properties written beside it
({"anyOf": [...], "properties": {}, "type": "object"}). The grammar refused
the keywords beside the union and served every such request unconstrained:
on the GPU check, all 49 Tau2 turns with strict tools. The union fixture gains
that shape. Red: the fixture no longer compiles (2 issues).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s empty properties beside it An empty properties object asserts nothing, so beside a union it is dropped like the repair's render type, and the union folds as before. Tau2's strict tools now take the grammar (49 of 49 turns in a local probe, with and without the provider's schema repair); unions of several closed objects, minimum and discriminated oneOf still decline, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pty properties beside a union still declines The fourth independent review's nits (approve with nits, no must-fix): the targeted test walks, parses and validates a call that carries the forwarded union shape; a union with a non-empty properties beside it is pinned as unsupported; the doc line is rewrapped and the schema comment credits the provider's own render repair too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
…e 9B does not (red) The owner (11:20Z): Qwen 3.8 27B on by default once a central kill path exists. darkbloom-platform #938 (EIGENINFERENCE_STRICT_TOOLS_UNMARK_MODELS) forwards a listed build's tools without strict, which turns the grammar off for it on every Mac. The default table becomes the MoE builds and qwen3.8-27b; the 9B (also qwen3_5) stays opt-in. Red by assertion: the default setting is still [qwen3_5_moe], Qwen 3.8 is not enabled by default, and the scheduler serves its strict request unconstrained. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 27B The owner (11:20Z): Qwen 3.8 on by default once a central kill path exists. darkbloom-platform #938 (EIGENINFERENCE_STRICT_TOOLS_UNMARK_MODELS, Stage 7) forwards a listed build's tools without strict, which turns the grammar off for that build on every Mac with no provider change. The default builds are now qwen3_5_moe (Qwen 3.6, Qwen 3.5 35B) and qwen3.8-27b (defaultBuilds, read as a list entry: a model_type or a model-id part); the 9B (also qwen3_5) stays opt-in. GPU on Qwen 3.8 (STRICT-GRAMMAR): a lone strict answer decodes at ~50 instead of ~120 tok/s (no MTP while constrained); with two or more rows MTP barely drafts anyway; nested strict set 38/40 -> 40/40, repaired strict requests 50/50, Tau2 all-strict 42/42 valid. Docs: inference, configuration, changelog fragment, LaunchAgent note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the default flip Fresh delta review of af3152b..242b6bd (APPROVE WITH NITS): pin that a list replacing the defaults without qwen3.8-27b turns Qwen 3.8 off on that Mac (nit 2); the changelog names the coordinator switch's limits (those calls are then not checked against their schemas; a body above 4 MiB and a Mac with DARKBLOOM_STRICT_TOOL_GRAMMAR_ALL_TOOLS=on are not reached) (nit 1), the neighbours' ~13 % at four rows (nit 5), and words Qwen 3.8's reason as measured: strict calls missing their schemas were its main remaining failure on OpenRouter (nit 4; also inference.md and the doc comment). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 13, 2026
…t on) into the 0.10.13 fold resolution STRICT-GRAMMAR's FINAL-2 (CONFLICTS.md 12:04Z): its new commits touch only #2069's own files, LaunchAgent note lines, docs sections and changelog fragment; the merge is clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 13, 2026
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.
Draft, 0.10.13 candidate (behind
DARKBLOOM_STRICT_TOOL_GRAMMAR; on by default for Qwen 3.8 27B, Qwen 3.6 35B and Qwen 3.5 35B, opt-in for Qwen 3.5 9B; central kill: darkbloom-platform #938,EIGENINFERENCE_STRICT_TOOLS_UNMARK_MODELS). Grammar-constrained arguments forstricttool calls on the Qwen 3.5 template family on one Mac: the model can only write calls whose function, parameters and values validate against the declared schema.Why
stricttool calls that miss the caller's schema are now the main remaining uptime cause on OpenRouter (UPTIME §3): ≈ 1,360/day on Qwen 3.8, refused after the answer started (tool_noncompliance,schemaandmalformed), mostly one bursty strict-tool client; a few on Qwen 3.6 (QWEN38-SPEED §2–3).strictautocall only when its frame closes, after reasoning and the call's first deltas streamed. Today nothing in the sampler keeps a quoted number, an off-enum value, a missing required argument or a wrong-typed value inside a$refdefinition out of the call. The coordinator cannot fix it (it never sees the call before the Mac does). 0.10.13: an answer cut at max_tokens ends as length; a strict call after the start returns as generated (LOW-GRADE §5 1–2) #2053 returns such a call as generated after the start (a quality miss instead of a failed response); this PR keeps the call from missing in the first place.What the model can write
Qwen 3.5-family calls use the template's XML form; the call parser (
Qwen35ToolCallParser) keeps a parameter's text as a string or converts it to one JSON type by the parameter's rendered schema:</think>) and text admit every byte-level piece, the think and call markers and the stop tokens (the other added tokens, e.g.<|im_start|>or media placeholders, are not sampled);autostill decides whether to call; an answer may end wherever it could before. A mention of<tool_call>that is not followed by<function=(after optional whitespace) stays text, as the parser reads it;{(the JSON dialect) and a non-ASCII byte right after the marker are refused.QwenStrictToolSchema.parserConversion, a mirror of the SDK'sToolArgumentNormalization, tested against the parser itself): text the parser keeps as a string is free (or one of an enum's exact values); a value it converts is one JSON value of the declared schema (FlintJSONGrammar, shared with the Qwen JSON answers). No value can spell</parameter>or a turn, reasoning or call marker; a JSON value never writes a surrogate escape (\uD800–\uDFFF: JSONSerialization refuses a lone one and the value would stay a string). Where the parser's reading and the declared type disagree (a top-level$refthat the render repair typed as a string), or where the streamed call would expose a converted value as text (streamsAsText, the mirror ofQwen35ArgumentStreamer, e.g. a{"type":"null"}parameter), the request stays unconstrained.$ref/$defsare inlined like the coordinator's resolver (ci: remove automated threat model review #889); cycles are refused.anyOf/oneOfof a schema andnull(PydanticOptional), a singleallOf, and objects beside an open object (tau2'sanyOf: [{$ref}, {type: object, additionalProperties: true}], also as the coordinator forwards it inlined, with the render repair'stypeand emptypropertiesbeside the union) are folded;formatand other annotations are dropped. The rest must fit the shared fail-closed subset (ToolConstraintSchemaCompiler):pattern,minLength,minimum,multipleOf,uniqueItems, unions of several types,{}items, … → the request is served unconstrained, as before, never refused (a content-free log line says why).tool_choiceauto(or absent) requests that declare at least onestrictfunction; every call of such a request is constrained (the strict check already validates every call of it).required/named (fix(provider): Qwen 3.5-family forced tool calls open with the call (Qwen 3.6, 3.5 9B; OpenRouter forced tool_choice) #2055's framing),none, requests withoutstrict, media, cluster pairs and native-tracked engines are unchanged. Calls drafted inside the thought are reasoning to the grammar: ondev(calls parsed before the reasoning split) they stay unconstrained; with 0.10.13: Qwen 3.5, 3.6 and 3.8 parse tool calls after the thinking (a mentioned <tool_call> no longer loses the call) #2057 only a call at the end of a never-closed thought is a call. The loop guard stays on; the continuation after an exited thought runs without the grammar.Before / After
Before (observable behavior and code flow,
strictautorequest on Qwen 3.5–3.8, one Mac):flowchart LR R["strict auto request"] --> S["scheduler text path: ToolConstraintFactory.make returns nil for auto"] S --> E["engine samples freely: reasoning, text, calls"] E --> P["Qwen35ToolCallParser + streamed call deltas"] P --> V{"frame closes: ToolConstraintValidation against the declared schema"} V -- "valid" --> OK["tool_calls"] V -- "invalid: quoted number, wrong enum, missing required, wrong type in a $ref" --> X["in-band 422 tool_noncompliance after the answer started"]After:
flowchart LR R["strict auto request"] --> S["scheduler text path: ToolConstraintFactory.make returns nil for auto"] S --> G{"QwenStrictToolGrammar.constraint: switch (default qwen3_5_moe + qwen3.8-27b; the 9B opt-in), auto + strict, .qwen35 parser, no media, engine runs constraints, schemas compile, boundary + vocabulary verify"} G -- "declined" --> E0["engine samples freely, exactly as before"] G -- "constraint" --> E["engine samples under QwenStrictToolConstraint"] E --> F["reasoning and text: free, watched for think-close and tool_call"] E --> C["inside a call: declared function, declared parameters once each, required before function-close, values the parser reads as schema-valid"] F --> P["Qwen35ToolCallParser + streamed call deltas, unchanged"] C --> P P --> V{"frame closes: same validation"} --> OK["tool_calls"]Switches (both reach launchd providers via
LaunchAgent.inferencePassthroughEnvKeys)DARKBLOOM_STRICT_TOOL_GRAMMAR: unset = the MoE builds (qwen3_5_moe: Qwen 3.6, Qwen 3.5 35B), which do not draft with MTP, and Qwen 3.8 27B (qwen3.8-27b,defaultBuilds);on= every Qwen 3.5-family build (adds the 9B); an off word (off,0,false,no,none,disabled) = today's behavior; a list ofmodel_types or model-id parts (qwen3.8-27b,qwen3_5_moe) picks builds. Only Qwen 3.5-family builds can be enabled. TheDARKBLOOM_STRICT_prefix is not folded into the SSD prefix-cache identity.DARKBLOOM_STRICT_TOOL_GRAMMAR_ALL_TOOLS=on: also requests withoutstrictfunctions (off by default).EIGENINFERENCE_STRICT_TOOLS_UNMARK_MODELS, Stage 7 headaec0d7556c, ships unset). The coordinator forwards a listed build's tools withoutfunction.strictand without a tool-levelstrict, soisCandidateis false and the grammar is off for that build on every 0.10.13 Mac, with no provider change. Those calls are then also not checked against their schemas. It does not reach a body above 4 MiB or a Mac with…_ALL_TOOLS=on. With it in Stage 7, the owner's Qwen 3.8 default-on applies (2dfd8a24abred →242b6bd8b2, nits5b4d5bc087). Release condition (review R1; the owner): RELEASE folds this head only if the Stage 7 swap with Reject overflowing occupancy before recording solo throughput #938 has succeeded by the phase-B fold (~13:45Z); otherwiseaf3152b544(Qwen 3.8 opt-in). CI green on5b4d5bc087(run 43421743612). The post-publish kill steps are inrelease-0.10.13/PLAN.md. The 0.10.14 registry control is inearnings/STRICT-GRAMMAR.md.Cost
ineligibleRowsDecodeBesideSpeculationis false;EngineLoopV2.mtpDraftBatchRows). The engine drafts while at mostmaxSpeculativeBatchrows decode (8 by default), so on Qwen 3.8 and the 9B the whole constrained answer, reasoning included, and every answer decoding beside it on that Mac run target-only while it decodes. The 3.6 and 35B builds keep their cards' presence penalty and do not draft anyway. Measured below. Owner's call (10:00Z): the dense builds that draft (Qwen 3.8, the 9B) are opt-in for 0.10.13; "constrain only the call" (drafting outside calls) is the 0.10.14 fix (it needs the SDK's MTP acceptance to respect the constraint, or a provider continuation from<tool_call>, neither safe for 0.10.13).tool_constraintduration). Masks are cached per state.GenerationLoopGuardPolicy).How much Qwen 3.8 traffic is
strict(production, read-only, 11-13)inference_routeshas nostrictcolumn, so the strict client is found by its shape (TAU2-AUDIT §1; everyschemarefusal is on it): OpenRouter key, tools, no media, requested max = the model cap, estimate ≥ 4,100 tokens, thinking off. Selected attempts on Qwen 3.8 (strict-grammar-evidence/prod/p1.1005.out; aggregates only):"Constrain only the call" (thinking and text keep drafting): 0.10.14, not 0.10.13
EngineLoopV2.mtpBasicEligible:tokenConstraint == nil). Drafting while a constrained row is outside a call needs constraint-aware acceptance in the MTP verify step: a speculative round that starts in text can accept<tool_call>,<function=and name tokens before the host sees them, unconstrained. That is an SDK change to the verify/finalize path (with chained decode), not safe for 0.10.13.<tool_call>as a per-request stop token, then continue constrained from the row's tokens, likeLoopExitThinkingContinuation) needs new bridge plumbing (per-request stop tokens and the row's token ids) and a second splice beside the loop guard's; also not safe by 13:00Z.Tests (red first)
Red
4f399c24f2: the API with no behavior and the tests (QwenStrictToolGrammarTests,QwenStrictToolServingTests). Its test file has a raw-string typo (#"…"#around"#/$defs/…"), fixed in the green commit, so the red run uses the green-commit test file on the red sources: 17 of 19 tests fail (45 issues) for the stated reasons (no constraint, stubparserConversion, switch keys absent); the 2 that pass are decline controls a no-op stub satisfies. The independent reviewer reproduced the same red result.Green
c83fb9f233→ head: local trimmed runs (ProviderCore + this suite, Mac A) 26 tests in 4 suites pass (callsDrawnFromTheMasksAlwaysValidate×4 fixtures,unsupportedSchemasStayUnconstrainedWithoutAnError×12), including the real-tokenizer suite on the shipped Qwen 3.8, Qwen 3.6 35B, Qwen 3.5 35B and Qwen 3.5 9B tokenizers (each verifies the vocabulary contract and walks a real tokenization of a call with thinking on and off; vocabulary build 1.9–2.8 s in a debug build). The default switch change has its own red commit (2b7f90ceaa: 3 issues on the previous source). CI below.Coverage: nested objects, arrays, enums, integers vs strings,
$ref/$defs(nested, in items, top-level declined, recursive declined),anyOfwith null and beside an open object, optional/required/undeclared/duplicate parameters, streaming deltas (chunked 1/3/17), reasoning on/off, multiple calls,autovsrequired/named/none,parallel_tool_calls: false, a prose mention of<tool_call>, the parser's reading and the streamer's reading cross-checked against the SDK, the scheduler path (a call that would miss its schema streams valid), other engines/families/boundaries, the switch and its launchd passthrough. A property test draws random calls from the masks for four functions over three fixtures and checks every one parses and streams to arguments the strict check accepts; a second draws whole answers from the first token on over multi-byte pieces (split and spelled markers, mentions, Unicode whitespace, the JSON dialect) and checks that every mask equals the brute-force set and that every call the parsed or streamed reader returns is one the grammar opened and closed.Qwen 3.8 default (11:20Z owner condition met by Reject overflowing occupancy before recording solo throughput #938):
2dfd8a24ab(localred-q38): 4 issues, all for the stated reasons: the default table, Qwen 3.8 not enabled, and the scheduler serving its strict request unconstrained;242b6bd8b2and5b4d5bc087(localgreen-q38,green-q38b): 26 tests in 4 suites pass, plus the real-tokenizer suite on the Qwen 3.6, 3.5 35B and 9B tokenizers;qwen3.8-27bturns Qwen 3.8 off on a Mac (pinned).Independent review and refactor pass
First review (fresh-context subagent, at
c83fb9f233): REQUEST CHANGES. Addressed: M1 lone surrogate escapes (JSON values never write\uD800–\uDFFF), M2 MTP statement (corrected everywhere; measurement in the GPU check), M3{"type":"null"}streamed divergence (streamsAsTextmirror + decline + test), S1 prose mention forced a call (the call commits at<function=), S2/S5 calls in the thought and the exit-thinking continuation (documented), S3parallel_tool_calls: false(one call), S4 free-phase tokens (documented), S6 red log (above), S7 diagrams/refactor outcome (here), S8 vocabulary build now in thetool_constraintduration (the next first-content deadline check still precedes submission), nits.Refactor pass (dedicated subagent, AGENTS.md): small behavior-preserving cleanup, applied as
ce42f3f802(deadisInsideCallremoved, value markers built from the text markers, stale suite name and on-word comments fixed, forbidden spellings kept once); suite green.Delta review (second fresh-context subagent,
c83fb9f233..a2ab57870e): APPROVE WITH NITS, no must-fix; every first-review item resolved or documented; its own probes (≈2,000 masks against brute force, 476 random whole answers through both readers) found no call outside the grammar. Its should-fixes (adopt the whole-answer walk; the 35B MTP note holds unless a request setspresence_penalty: 0) and nits (one spelling of the opening's byte classes, the released mask built once, the mention test streamed) are ind72fdfcc56. The GPU numbers and the default list remain open.Third and fourth reviews (fresh-context subagents): the default change (
a2ab57870e..5bd909cdfb) and the Tau2 union fix (3cca9d3edf..d1bbd37505): APPROVE WITH NITS, no must-fix; their nits are in3cca9d3edfandaf3152b544.Fifth review (fresh-context, the Qwen 3.8 default
af3152b544..242b6bd8b2): APPROVE WITH NITS, no must-fix, with release condition R1 (above).qwen3.8-flash-next, non-family types and cluster pairs stay as before.5b4d5bc087. A fresh check of that commit: APPROVE (one test expectation and wording only; the local run's diff hash matches the commit).GPU check (Mac A)
Qwen 3.8 27B, greedy, one model at a time, port checked to be the arm's own provider. base = signed 0.10.12; cand = this branch's release build (
6c1c6c3361) with the grammar on for Qwen 3.8 (the opt-in); cand-off = the same build withDARKBLOOM_STRICT_TOOL_GRAMMAR=off; on2 = the head's build (d1bbd37505, Tau2 union fix) with=on. Records and scripts:strict-grammar-evidence/gpu/(out/summary*.txt).presence_penalty1e-4): decode, TTFT--localartifact: the local API skips the provider's schema repair (ToolSchemaNormalization.ensureParameterTypes, run on the coordinator path), soreminder_minutes: anyOf [integer, null]is read as text and every such call fails in all three arms; the grammar declines those requests (served as before). With the repair, the grammar takes all 50 (local probe).strict(45 served in both arms): identical calls — the grammar declined Tau2's forwarded union shape (anyOfwith the repair's emptypropertiesbeside it). Fixed ind1bbd37505(49/49 now take the grammar, local probe); re-run below.$refset (45; REF-OTHERS's bodies as the coordinator forwards them, inlined; 4 at a time): cand-off 38/40 valid → on2 40/40, in-band errors 2 → 0. Both misses wereAgentOutputcalls (an undeclared key besideclick_element; a scroll action without itsscrollwrapper); with the grammar the same turns write{"click_element":{"index":2}}and{"scroll":{"amount":600,"direction":"down"}}, and the other 8AgentOutputcalls are byte-identical. The grammar takes 10/45 (AgentOutput);create_order(minimum),pay(a union of closed objects) andact(discriminatedoneOf) decline and are served as before. Decode at 4 at a time: constrained rows 32.2 → 26.0 tok/s, rows beside them 33.2 → 29.0 (host-side masks; MTP barely drafts at this width).reminder_minutesnow 15 / null as integers; decode 25.6 tok/s at 4 at a time (cand-off 29.1 on the unrepaired bodies).strict, grammar engaged (on2, 49/49 constrained, 8 at a time): all 49 served, 42/42 calls valid (base 42/42 of 47 served); 40/47 turns identical; the other 7 already differ inside their thought, before any call (4 call another function, 2 end in text, 1 gains a call); the grammar constrains nothing there, but the constrained rows decode without MTP, so long greedy thoughts can part at near-ties. TTFT p50 2.18 → 1.45 s, decode 34.3 → 26.7 tok/s.Qwen 3.6 35B-A3B (on by default; it does not draft): signed 0.10.12 vs the head's build (
d1bbd37505), switch unset, greedy unless noted.$reftypedstring)$refdefinition wants an object. The one miss left on the nested set iscreate_order, which the grammar declines (minimum), as on Qwen 3.8. Greedy outputs the grammar leaves valid are byte-identical (10/10 lone rows, 38/40 nested set; the two that differ are the fixed calls).inlinecovers Qwen 3.6 (REF-OTHERS), production's top-level$refrequests decline and are served exactly as today.Coordination
git merge-treeat the head is clean with every open PR intodevfrom #2041 on (#2041, #2045–#2055, #2057–#2067, #2070–#2076); the LaunchAgent note moved beside its keys to stay off #2071's insertion. The simulated fold ondev(#2047 → #2051 → #2050 → #2048 → #2049 → #2059 → #2054 → #2046 → #2055 → #2057 → #2041 → this) merges cleanly. Files shared with other PRs:MultiModelBatchSchedulerEngine.swift(onelet→varand one block after the factory call; #2055's hunk is just above),LaunchAgent.swift(two keys and a doc note, away from the others' insertions),GenerationLoopGuardPolicy.swift(one guard line; #2054 edits its doc comment), the two docs. Semantics: with #2053 a declined request's invalid call is returned as generated; with #2057 the grammar constrains calls after</think>and a trailing call in a never-closed thought stays unconstrained.