Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
367c34c
test(provider): specify native budget-only reasoning conformance
jonathan308 Nov 13, 2026
09e8ec7
fix(gemma): adopt opt-in quoted numeric argument parsing
jonathan308 Nov 13, 2026
aaee9e5
test(ci): inventory isolated Gemma numeric argument runs
jonathan308 Nov 13, 2026
6bf5722
fix(gemma): adopt conservative nested union coercion guard
jonathan308 Nov 13, 2026
d422ea4
test(gemma): carry caller schemas into conformance validation
jonathan308 Nov 13, 2026
3cdddd3
Test native reasoning budget across the provider bridge
jonathan308 Nov 13, 2026
88b4d4b
Carry validated Super and MiMo budgets into native sampling
jonathan308 Nov 13, 2026
b3ec51e
Exercise family reasoning budgets through real request ingress
jonathan308 Nov 13, 2026
e2d760d
Test lookup receipts on native budget refusal
jonathan308 Nov 13, 2026
3323890
test(provider): require drafting around strict tool-call spans
jonathan308 Nov 13, 2026
d0e964a
Finalize policy lookup when reasoning budget admission refuses
jonathan308 Nov 13, 2026
ab3ea28
feat(provider): expose strict-tool free spans for opt-in drafting
jonathan308 Nov 13, 2026
1551839
feat(provider): draft through Qwen JSON reasoning and retain service …
jonathan308 Nov 13, 2026
8b8f4cd
test(provider): drain span fixtures on every failure path
jonathan308 Nov 13, 2026
2ec6d07
fix(inference): pin qualified native reasoning budget runtime
jonathan308 Nov 13, 2026
a875cff
Merge #2099 (O8 provider) into the #2101 resolution
jonathan308 Nov 13, 2026
43bccb5
Merge #2090 (O4 provider) into the #2101 resolution
jonathan308 Nov 13, 2026
928c3a7
test(provider): require the LaunchAgent to forward the SDK feature sw…
jonathan308 Nov 13, 2026
5d5ab14
test(provider): pin 0.10.12's MiMo refusal class with the budget swit…
jonathan308 Nov 13, 2026
d1f7daa
fix(provider): forward the SDK feature switches to the installed service
jonathan308 Nov 13, 2026
a7cf4ee
fix(provider): keep 0.10.12's MiMo refusal with the budget switch off
jonathan308 Nov 13, 2026
9589a11
test(provider): only Qwen JSON answers may offer free spans to the en…
jonathan308 Nov 13, 2026
4950ca3
fix(provider): offer free spans only from Qwen JSON answers
jonathan308 Nov 13, 2026
d58acfe
feat(provider): provider defaults for SDK-read feature switches (none…
jonathan308 Nov 13, 2026
97da9c3
docs: move the Gemma quoted-number and SDK-default sections off the e…
jonathan308 Nov 13, 2026
b0cdf45
fix(provider): apply SDK feature defaults in every process, never per…
jonathan308 Nov 13, 2026
abf364c
refactor(provider): one SDK default list per feature (still all empty)
jonathan308 Nov 14, 2026
5acfd78
docs: list the grammar-MTP switch after the strict tool grammar row
jonathan308 Nov 14, 2026
d30ffb6
test(provider): require the o8 SDK switch on by default
jonathan308 Nov 14, 2026
0ab9b89
feat(provider): turn the o8 SDK switch on by default (kill switch: =0)
jonathan308 Nov 14, 2026
139d2f4
refactor: place #2099's lines and the Gemma switch apart from phase C…
jonathan308 Nov 14, 2026
a554f2d
Merge #2109 139d2f468e (fold prep) into the o8 flip
jonathan308 Nov 14, 2026
2268cb4
Merge the 0.10.13 candidate after phase C (bdda7bc150: #2096 + #2088 …
jonathan308 Nov 14, 2026
8331dcd
Merge #2109 2268cb4c7a (phase C candidate merged) into this branch
jonathan308 Nov 14, 2026
b0addab
test(provider): pin inherited injections, per-build defaults and the …
jonathan308 Nov 14, 2026
7e62206
fix(provider): SDK defaults per build, inherited injections, applied …
jonathan308 Nov 14, 2026
c33c3e3
Merge #2109 7e622061ed (per-build defaults) into the o8 flip; the fli…
jonathan308 Nov 14, 2026
cf22362
test(provider): require the o8 SDK default, scoped to its evidence (red)
jonathan308 Nov 14, 2026
c2e2c06
feat(provider): turn the o8 SDK switch on by default where it was mea…
jonathan308 Nov 14, 2026
52dc8a6
test(provider): exact builds, grammar rides on spans, trusted markers…
jonathan308 Nov 14, 2026
95d2699
fix(provider): exact builds, grammar with spans, trusted markers, dea…
jonathan308 Nov 14, 2026
c14389e
Merge #2109 95d26999e2 (review d4 fixes) into the o8 flip; the flip i…
jonathan308 Nov 14, 2026
6385aa8
test(provider): require the o8 SDK default, scoped to its evidence (red)
jonathan308 Nov 14, 2026
42ec080
feat(provider): turn the o8 SDK switch on by default where it was mea…
jonathan308 Nov 14, 2026
bcb028d
test(provider): the start line's grammar scope, plist skips marked de…
jonathan308 Nov 14, 2026
4a7d0da
fix(provider): qualify the grammar default on the start line; plist s…
jonathan308 Nov 14, 2026
cdf3a7e
Merge #2109 4a7d0da271 (review d5 nits) into the o8 flip; the flip is…
jonathan308 Nov 14, 2026
f1176ca
test(provider): require the o8 SDK default, scoped to its evidence (red)
jonathan308 Nov 14, 2026
5857ee5
feat(provider): turn the o8 SDK switch on by default where it was mea…
jonathan308 Nov 14, 2026
acd0705
chore(provider): pin the SDK to mlx-swift-lm main f41a5f9af3 (#416 + …
jonathan308 Nov 14, 2026
e7f4a0b
Merge #2109 acd07059b9 (SDK pinned to F f41a5f9af3) into this branch
jonathan308 Nov 14, 2026
348c293
test(provider): require MiMo reasoning budgets on by default too (red)
jonathan308 Nov 14, 2026
e3ce265
feat(provider): admit MiMo reasoning budgets by default as well
jonathan308 Nov 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/provider-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,14 @@ jobs:
--output-dir "$RUNNER_TEMP/provider-test-diagnostics" \
--diagnostic-after-seconds 900 --timeout-seconds 1800 \
-- ../scripts/run-provider-tests.sh
- name: Test Gemma quoted numeric argument conformance switches
if: ${{ !cancelled() && matrix.shard == strategy.job-total && steps.test-products.outcome == 'success' }}
working-directory: provider-swift
timeout-minutes: 5
run: |
for enabled in 0 1; do
env DARKBLOOM_GEMMA_SCHEMA_COERCION="$enabled" ../scripts/run-nested-suite.sh GemmaQuotedArgumentConformanceTests --no-parallel
done
- name: Upload provider test diagnostics
if: ${{ !cancelled() && steps.provider-unit-tests.outcome != 'skipped' }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/gemma-quoted-numeric-arguments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Gemma quoted numeric tool arguments

Adopt the opt-in SDK parser fix. `DARKBLOOM_GEMMA_SCHEMA_COERCION=1` enables it (the LaunchAgent forwards the switch to the installed service); unset or `0` retains current behavior. Numeric marker strings become numbers at frame close only when the parameter schema unambiguously requests a numeric type. Potentially converted values stay withheld from argument deltas until the completed parse; unsupported or ambiguous schemas preserve their quoted text. The provider still validates strict calls.
3 changes: 3 additions & 0 deletions changelog.d/grammar-aware-mtp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Grammar-aware MTP

- Adopt SDK #409: with `DARKBLOOM_CBV2_MTP_GRAMMAR=1` (forwarded by the LaunchAgent), constrained rows draft with MTP and every committed position is verified under the row's grammar; unset or `0` keeps 0.10.12's target-only constrained rows. Default per `docs/reference/configuration.md` (SDK feature defaults).
3 changes: 3 additions & 0 deletions changelog.d/native-reasoning-budget.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Changed

- Add native reasoning budgets for supported local Nemotron Super and MiMo routes. Positive `reasoning.max_tokens` now reaches the SDK sampler, closes the thought at its token limit and continues the answer within the original total output ceiling. Unsupported routes and conflicting thinking-off controls remain refused. On by default since 0.10.13 for Nemotron 3.5 Super and MiMo V2.6 (each measured in its ON state); `DARKBLOOM_NATIVE_REASONING_BUDGET=0` restores 0.10.12 for every family. A Super cluster pair cannot hold a budget: there the request is refused at the engine bridge (unsupported output control) instead of by the prompt contract.
4 changes: 4 additions & 0 deletions changelog.d/qwen-constraint-spans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Qwen constraint spans

- Add default-off `DARKBLOOM_CONSTRAINT_SPANS` support for eligible Qwen strict-auto tool requests and JSON reasoning. Ordinary reasoning and content may draft; tool framing/arguments and JSON values remain protected. Text after a completed call may draft again.
- Forward the flag into the installed provider service. Preserve existing grammar admission, masks, engine eligibility and off behavior. No full-model speedup is claimed.
3 changes: 3 additions & 0 deletions changelog.d/sdk-feature-defaults.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### SDK feature defaults

- Add provider defaults for feature switches the SDK reads (`SDKFeatureDefaults`). An unset switch follows the release's default, which is on only where it was measured in its ON state: per exact model id for constraint spans and grammar-aware MTP (grammar only where spans are on), per family for native reasoning budgets, process-wide for the Gemma parser switch. An operator value always wins; `<KEY>=0` restores 0.10.12 on every model. Injected defaults are recorded in `DARKBLOOM_SDK_DEFAULTS_INJECTED` and never written into a service plist, so an installed service follows the running release. `darkbloom start` (and `benchmark`, on stderr) prints `SDK feature defaults on: …`. Nothing is on by default unless its switch is listed.
9 changes: 9 additions & 0 deletions docs/architecture/hardware-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ The native [cross-stream fence ordering](inference.md#cross-stream-fence-orderin
uses the same memory reservations and command-buffer limits. Its component
tests do not change a model's hardware qualification or usable-memory grant.

[Native reasoning token budgets](inference.md#native-reasoning-token-budgets)
use the existing model admission and native retirement owners. They add no
hardware eligibility or memory grant; target-only budget rows can reduce mixed
batch chaining, so the feature carries no throughput qualification.

## Context

Automatic local cluster batching prices each lane's full registered request
Expand Down Expand Up @@ -1203,6 +1208,10 @@ Sources: `libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/GLM5Next
`libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/GLM5Next/Metadata/GLM5NextImageBudget.swift`, and
`libs/darkbloom-cluster/Sources/DarkbloomClusterRuntime/Models/GLM5Next/Metadata/GLM5NextServingMetadata.swift`.

### Gemma o4 parser qualification

The [Gemma quoted numeric tool arguments change](inference.md#gemma-quoted-numeric-tool-arguments) operates on CPU text and schema values. Parser tests do not establish full-model numerical, memory, throughput or concurrency qualification. This parser switch does not change hardware admission or model memory allowances.

### Gemma batch arithmetic evidence boundary

The ordinary Gemma stage decode scope preserves per-request projection, value
Expand Down
70 changes: 70 additions & 0 deletions docs/architecture/inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3757,6 +3757,10 @@ Sources: `provider-swift/Sources/ProviderCore/Inference/Tools/GemmaJSONAnswerPol
`provider-swift/Sources/ProviderCore/Inference/GemmaJSONAnswerConstraint.swift`,
`provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge+Submission.swift`.

### Gemma quoted numeric tool arguments

The SDK parser behind `DARKBLOOM_GEMMA_SCHEMA_COERCION` is adopted through the `libs/mlx-swift-lm` gitlink. Numeric marker strings become numbers at frame close only when the parameter schema unambiguously requests a numeric type. Potentially converted values stay withheld from argument deltas until the completed parse; unsupported or ambiguous schemas preserve their quoted text. The provider still validates strict calls. See the [process switch](../reference/configuration.md#engine-and-scheduler). Source: `libs/mlx-swift-lm/Libraries/MLXLMCommon/Tool/Parsers/GemmaFunctionParser.swift` (`GemmaFunctionParser`).

### Constrained Qwen JSON answers

Qwen, Bonsai 2 27B and Nemotron 3.5 Lightning share this machinery.
Expand Down Expand Up @@ -4280,6 +4284,42 @@ Which requests render this way:
re-encodes the bodies it forwards sorted; darkbloom-platform#919 keeps the
caller's order for the builds it names).

### Native reasoning token budgets

Supported local Super and MiMo requests can opt into a thought-token ceiling
through [the default-off switch](../reference/configuration.md#native-reasoning-budgets).
`NemotronSuperPromptContract` and `MiMoV26RawControlEvidence` retain validated
`reasoning.max_tokens`; explicit thinking-off conflicts with the budget. MiMo
retains the value across both Chat and Responses decoding. Super uses its bound
Chat owner; this change does not register a Super Responses route.

`NativeReasoningBudget` is an internal sidecar excluded from
`ChatCompletionRequest` wire coding. Family owners set the initial thought
state: Super's rendered prompt opens the thought, while MiMo waits for an open
marker. `EngineV2Bridge.submitTokenized` checks its actual engine capability and
validates atomic marker encode/decode round trips with the loaded tokenizer
before admission. Distributed or unsupported engines refuse the control.

The SDK default sampler counts confirmed thought payload tokens, permits an
early natural close and forces the close at N before continuing the same
request's answer. Markers do not spend N, later opens cannot reset it, and the
original total output ceiling and stops still win. The close counts toward
completion usage; logprobs remain the raw model probabilities. Budget rows use
ordinary target decoding for their full lifetime; they do not chain or draft.
Other rows keep their sampling semantics, but a mixed batch may lose chaining.
A generic token constraint or cancel/resubmit thought-exit continuation cannot
be combined with this first budget contract.

Text and supported native image paths carry the same sidecar. Native media
seals, admission, cancellation and retirement remain owned by the existing
engine lifecycle. This capability changes no model memory limit or hardware
qualification and makes no throughput or full-model quality claim.

Sources: `provider-swift/Sources/ProviderCore/Inference/Prompting/NativeReasoningBudget.swift`
(`resolved`), `provider-swift/Sources/ProviderCore/Inference/Engine/Bridge/EngineV2Bridge+Submission.swift`
(`submitTokenized`), and `libs/mlx-swift-lm/Libraries/MLXLMCommon/ContinuousBatchingV2/ReasoningBudgetV2.swift`
(`CBv2ReasoningBudget`).

### Reasoning effort

Every model that reasons takes each effort a client names (`none`,
Expand Down Expand Up @@ -4375,6 +4415,36 @@ the owner's go.

### Strict tool-call grammar

When the [constraint-span setting](../reference/configuration.md#engine-and-scheduler)
(`DARKBLOOM_CONSTRAINT_SPANS`) enables speculation, `QwenStrictToolConstraint`
exposes ordinary reasoning and content as free spans through
`CBv2FreeSpanTokenConstraint`. Its pure preview accepts only tokens that stay
in the same state without touching a marker prefix. Call openings, framing,
arguments and partial markers remain protected; text after a closed call can
become free again. `QwenJSONAnswerConstraint` (the Qwen-family
`JSONAnswerConstraint` that `JSONAnswerPolicy` builds) exposes only Qwen
reasoning before the answer: the JSON value, string bodies and trailing
whitespace stay protected. Other JSON families build the plain
`JSONAnswerConstraint`, which does not conform to `CBv2FreeSpanTokenConstraint`,
so they neither draft nor keep MTP history and retain target-only decoding.
Neither constraint mutates its interned states while previewing a speculative
token.

Disabling the setting retains request-wide target-only constrained decoding.
Existing grammar admission, masks and sampler/model/lifecycle eligibility remain
authoritative. Required/named calls acquire no new strict-auto grammar. An
eligible native Qwen assistant retains committed history through protected
spans, but starts no draft there. Engines with native completion tracking remain
ineligible. The LaunchAgent forwards the flag at installation; the SDK snapshots
it at engine construction.

`QwenConstraintSpanServingTests` checks streamed content, reasoning, calls and
accounting through the scheduler, bridge and engine. Coverage includes multiple
calls, thinking on/off, short budgets, cancellation and refusal recovery. Tiny
native Qwen target/assistant fixtures check committed history across protected
entry and return to free text. These are bounded integration fixtures, not
full-model throughput or production qualification.

A `strict` `auto` call is checked against the caller's schema only when its
frame closes ([streamed auto tool calls](#streamed-auto-tool-calls)), after the
answer has started, so on the Qwen 3.5 template family (`qwen3_5`,
Expand Down
6 changes: 5 additions & 1 deletion docs/developer/build.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Build The Provider And Landing

> Last updated: 2026-11-12
> Last updated: 2026-11-13

Build the provider, its source-matched native resources, and the independent
landing site from this repository. Backend, sidecar, console and admin builds
Expand Down Expand Up @@ -1134,3 +1134,7 @@ Qwen27 TP batch prefix capture/restore changes the Runtime target only; it
reuses the pinned SDK owned-state APIs. Rebuild the worker and planner together
because the same complete LOAD budget prices the additional snapshot banks.
See [warm-prefix validation](test.md#qwen27-tp-warm-prefix-checks).

### Gemma o4 dependency adoption

The Gemma quoted numeric tool arguments conformance suite consumes the exact `libs/mlx-swift-lm` gitlink, including its parser tests. Use the normal recursive dependency checkout and test-product build; the [isolated conformance runs](test.md#gemma-o4-conformance) reuse those products without a second build. Native MLX and nested core pins are unchanged.
19 changes: 19 additions & 0 deletions docs/developer/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,21 @@ No model weights or live provider state are needed.

## Provider And SDK

`QwenConstraintSpanServingTests` sends strict-auto and JSON requests through
the public scheduler, bridge and real `EngineV2`. Deterministic native targets
supply literal reasoning, content and call arguments; an unconstrained control
proves drafting works. Tests require drafting around protected calls, unchanged
off/on output and accounting, multiple calls, thinking on/off and JSON that
never returns to a free span after its value starts. Tiny Qwen target/inline
assistant fixtures also verify committed history through protected entry and
return to text, cancellation with request-ID reuse, short output budgets, and
bridge refusal recovery. `QwenJSONFreeSpanTests` checks preview purity, partial
markers, scalar/string answers, exhaustion and non-Qwen fallback.

Run these with the normal source-matched provider test products and isolated
runner below. Tiny fixtures do not qualify full-model throughput, production
resource use or native completion-tracked engines.

From the repository root, use the [MiMo regression fixture recipe](#mimo-regression-fixtures)
to prepare the inputs and run `make provider-test`.

Expand Down Expand Up @@ -3687,3 +3702,7 @@ one-line explanation and that request lengths still come from every build;
read and the router's build-keyed setup. `swift test --filter
DistributedAutomaticBatchPlannerTests` and `--filter ClusterObservabilityTests`
from `provider-swift` cover replacement calibration and the recorded builds.

### Gemma o4 conformance

`GemmaQuotedArgumentConformanceTests` exercises the adopted SDK through provider-facing types without loading a model. CI reuses the compiled test products and runs this suite in separate processes with `DARKBLOOM_GEMMA_SCHEMA_COERCION=0` and `=1`; the ordinary suite checks the SDK's own default (off); the provider's default is `SDKFeatureDefaults`'s, covered by its own tests (test processes never run `apply()`). In an authorized CPU test lane, from `provider-swift`, use `DARKBLOOM_GEMMA_SCHEMA_COERCION=1 ../scripts/run-nested-suite.sh GemmaQuotedArgumentConformanceTests --no-parallel` after building the exact pinned composition. GPU qualification remains separate.
8 changes: 8 additions & 0 deletions docs/provider/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -4099,8 +4099,16 @@ Positive Gemma caps retain the 128-token floor; `0` defers prefill while decodin
Pure-prefill stripes are unchanged. These variables are not forwarded to a LaunchAgent;
see the [scheduler environment reference](../reference/configuration.md#engine-and-scheduler).

### Gemma o4 parser switch

`DARKBLOOM_GEMMA_SCHEMA_COERCION` is read once when the process starts; the LaunchAgent forwards an operator value to the installed service (`0` turns it off, `1` on). The [configuration reference](../reference/configuration.md#engine-and-scheduler) gives its default ([SDK feature defaults](../reference/configuration.md#sdk-feature-defaults)) and rollback.

## LaunchAgent environment passthrough

`DARKBLOOM_NATIVE_REASONING_BUDGET` is forwarded to the service when the operator
sets it (`0` turns budgets off for every family, `1` on); see [native reasoning budgets](../reference/configuration.md#native-reasoning-budgets)
for its default, values and supported request behavior.

The SDK's [Gemma row-mapped NAX route](../reference/configuration.md#gemma-4-row-mapped-nax)
is enabled by default within its hardware and model guards. The provider forwards
`DARKBLOOM_GEMMA4_NAX_ROW_MAP` verbatim, including an explicit empty value, when
Expand Down
5 changes: 4 additions & 1 deletion docs/provider/hardware-requirements.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Provider hardware requirements

> Last updated: 2026-11-07
> Last updated: 2026-11-13

Reference for what a Mac needs to run the `darkbloom` provider: the minimum
requirements, the chip families the provider distinguishes, which catalog
Expand Down Expand Up @@ -93,6 +93,9 @@ period. `doctor` does not name the reason.

Follow the [authenticated registration steps](https://github.com/Layr-Labs/darkbloom-platform/blob/48a198c71a2d30feec5597bacf1101120f7f955d/docs/consumer/authentication.md#6-register-hardware-interest). Registration is an opt-in record; email delivery is a separate operation.

[Native reasoning budgets](../architecture/inference.md#native-reasoning-token-budgets)
do not widen model eligibility, memory limits or hardware qualification.

## Minimum requirements

New network providers require macOS 27 or later and current qualified App Attest
Expand Down
Loading
Loading