Skip to content

provider: Muse Glimmer launch fixes (tool calls, reference prompt, M5 Ultra gate, loop guard) and cancelled-row admission wait - #2152

Draft
jonathan308 wants to merge 17 commits into
feat/muse-glimmer-30bfrom
feat/muse-glimmer-30b-fixes
Draft

jonathan308 wants to merge 17 commits into
feat/muse-glimmer-30bfrom
feat/muse-glimmer-30b-fixes

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Draft for owner review. Do not merge. Refreshed 2026-11-15 by merges only. Round 2: 4a98ef91c merges #2149's 58ae7e94b (dev cc19fe003), and the gitlink is 1d2ba618, #429's head with the new #423 merged in (tree identical to c7dbf1a0's). Round 1: this branch merged #2149's new head be76a1b2c (which merges dev bd67dec73; before, it sat on #2149's older head 7b75e0d99). The SDK gitlink is c7dbf1a0, the refreshed head of mlx-swift-lm#429. Two local API fixes from the go/no-go are added (f0ab193fd, 50cdaaa10), each with red tests first.

Summary

Provider fixes for listing Muse Glimmer 30B. A tool call the model gets wrong is never a 500. Prompts render as the reference servers render them. The model loads and is advertised only on an Apple M5 Ultra. The loop guard and thought exit know Muse's Onyx framing but stay off by default.

One fix is for every model: a request that reaches a full Mac while a cancelled row is still giving back its slot now waits for that release, instead of getting a capacity 503.

Two fixes are for the local API (darkbloom start --local), from the go/no-go:

  • Developer and system messages on the local API. A body with a developer message is decoded again from the ingress repair, which renames it to system. The template extensions were decoded from those repaired bytes, so Muse's reference prompt never saw the developer message and never merged it (gate 4c, 4 of 50 prompts). The local API now reads the extensions from the body as sent, as the coordinator path does.
  • n above 1. The generic local chat routes ignored n and answered one choice. They now refuse it before any engine work, with the coordinator's answer: 400 invalid_request_error "n > 1 is not supported", param n.

Stacked on #2149 (feat/muse-glimmer-30b at 58ae7e94b). The libs/mlx-swift-lm gitlink points at 1d2ba618 on the SDK branch feat/muse-glimmer-atem-reference-reader. That branch is two commits on feat/muse-glimmer-native, plus merges of its refreshed heads 39e5dc5e (mlx-swift-lm#434) and c1103b8c (SDK main fe9b5282, the SDK pin of dev):

  • 05bf60234 adds ATEMReferenceReader;
  • 313ec342 corrects one of its test's expectations.

The SDK branch is up as draft Layr-Labs/mlx-swift-lm#429.

Linked issue

None. Part of the Muse Glimmer 30B onboarding, stacked on #2149.

Test plan

At 50cdaaa10 (this refresh): the local API fixes, red then green

These runs used a debug build on an M3 Ultra:

  • swift build --build-system native --build-tests --disable-index-store;
  • SDKROOT set to the CLT MacOSX27.0.sdk;
  • scratch on a RAM disk;
  • the staged test metallib.

They ran on a local test-only tree. That tree merges the refreshed #2149, #2150, #2151 and #2152, with the SDK combined from #423 and #427–#432. Its file tree equals the go/no-go's except for the fixes. The run used swift test --skip-build --no-parallel with the filter MuseGlimmerReferencePromptTests|LocalMultipleChoicesTests|MuseGlimmerPolicyTests|MuseGlimmerDrafterTests|LaunchAgentRestartTests|LocalStreamingFailureTests.

Fix Red test (commit) Red (tests only) Green
Local API developer merge MuseGlimmerReferencePromptTests.localAPIPath, streamed and not (c8a08c072) failed both ways: no merged system message (MuseGlimmerReferencePromptTests.swift:351) passed, streamed and not (2 cases)
n above 1 LocalMultipleChoicesTests.refused, n = 2, 8, 2.0 and 2.5, streamed and not, on a repaired body, on /chat/completions and in a batch (1cf20bb01) failed all four: 200, and the engine ran passed (4 cases)
n of one or less is served LocalMultipleChoicesTests.served: absent, null, 0, 1, 1.5, "2" and true passed passed (7 cases)

Green at 859b83959 (the fixes in; SDK e63ed56d): 84 tests in 8 suites, 83 passed and 1 failed. The failure is LaunchAgentRestartTests "notInstalled explains how to start the provider" (LaunchAgentRestartTests.swift:20): a local debug build is the dev variant, so the message says darkbloom-dev start. It fails the same way on the red tree, and no commit here touches it.

A wider run on the same tree (filter MuseGlimmer|Local|NemotronSuper|InboundChat|ChatTemplateControls|LaunchAgent|MTPConfig|SDKFeatureDefaults|MiMo|GLM5|Flint|ToolChoice): 1,595 Swift Testing tests, 1,427 passed, 130 skipped and 38 failed; every Muse Glimmer suite and LocalMultipleChoicesTests passed. Each failure is environmental and outside the files these commits touch: dev-variant command names (darkbloom-dev), no installed launchd service in the test session, and absent MiMo fixtures (all 59 XCTest failures are MiMoV26*). That reading is by failure message; no base run of the wide filter was made.

Not proven here. The local API fixes ran against a fake engine only. Go/no-go gate 4c (developer plus system messages) and the n probe were not re-run on an M5.

Earlier runs, at 981e3d565.

Debug build with tests, native build system:

swift build --build-system native --build-tests --disable-index-store --jobs 10
swift test --build-system native --skip-build --no-parallel --filter '<filter>'

State and model snapshots go to a per-run directory. SDKROOT is the CLT MacOSX27.0.sdk. MUSE_GLIMMER_NVFP4_DIR names the pinned snapshot (for its tokenizer only), and MUSE_GLIMMER_LOOP_RECEIPTS names the receipts of a 594-draw GPQA run on Mac B, a team test Mac (effort medium, 8 rows, default settings). The only untracked files in the tree were a temporary two-file harness that runs the SDK's ATEMReferenceReaderTests inside the provider test target.

green-all-01 was one run at 5a2026449 over the focused filters and the wide filter, 1,542 tests in all:

  • Focused filters: MuseGlimmer, CancelledRowAdmissionTests, EngineDeadlineRetirementBridgeTests, EngineV2Bridge, GenerationLoop, LaunchAgentEnvironmentTests, ATEMReferenceReaderTests, NemotronSuperLoopGuardTests, LoopExitThinkingContinuationTests, ModelRuntimeRequirementsTests, ModelRequirementDisplayTests, StandaloneServerModelAdmissionTests, GLM5Next, EngineV2PrefillGeometryTests, AdvertisedModelSelectionTests and PickerEntryTests.
  • Wide filter: the Muse onboarding's regression filter: drafting, MTP, prefix cache, reasoning, tool streams and template fixes across families. On the base it selects 818 Swift Testing tests in 90 suites.
Runner Discovered and executed Passed Failed Skipped
Swift Testing 1,472 in 183 suites 1,371 1 100
XCTest 70 46 7 cases, 8 issues 16
  • Swift Testing failure. ATEMReferenceReaderTests.anIntegralFloatIsAnIntegerAndAWrongTypeKeepsItsText. The SDK test expected the strict parser to refuse 6.0 for an integer. The strict parser reads it as the integer. 313ec342, pinned by 981e3d565, corrects the expectation and changes no source. The corrected test runs in the runs below.

  • Swift Testing skips. The opt-in real-hardware, real-checkpoint and paired-Mac suites: GLM-5.3 calibration and checkpoint, MuseGlimmerLiveTests.servedThroughLoopback, the Nemotron Super pinned checkpoint and the Harmony real tokenizer.

  • XCTest failures. Seven MiMoV26ServingLoadTests cases (payloadFixtureRequired), the same seven, with the same 8 issues, as on the base 7b75e0d99.

  • Mac B replay: MuseGlimmerLoopGuardTests.macBGPQAReplay passed.

    Draw Tokens Cut at token Span Thought ended Est. time of cut Client wall
    q101-e0 69,657 4,099 2,048 yes 212 s 3,600 s
    q173-e0 67,489 4,099 2,048 yes 219 s 3,600 s
    • 594 draws; 115 reach the guard's first check. 0 of the other 592 are cut. The longest other draw is 33,867 tokens.
    • The Python port of the detector gives the same cut token and span. It reports the search period 8; the Swift detector reports the smallest period, 4.
  • CancelledRowAdmissionTests: 3 of 3 passed:

    • admitted at the release, in 0.10 s;
    • refused at once with no cancel and with the switch off;
    • refused at the 2 s bound for a row that never retires.

Other checks:

  • scripts/docs-check.sh on the 8 touched docs: OK.
  • scripts/docs-impact-check.py over the branch: OK.
  • scripts/changelog.py check: 3 valid fragments.
  • swift-format 6.4.4 lint on the SDK test file: clean.

Red first. A local patch, not part of this PR, reverts each fix's behaviour lines in one red build. The tests and APIs stay, so the new tests still compile.

Fix Red revert Tests that must fail red
Loop guard and thought exit No Onyx exit markers, and no ATEM guard markers MuseGlimmerLoopGuardTests, including the Mac B replay (no exit resolves)
Tool reading, never a 500 The strict parser only, and an empty frame fails as before MuseGlimmerToolStreamTests
Reference prompt The reference render is never enabled MuseGlimmerReferencePromptTests, and the 14 new MuseGlimmerPromptGoldenTests cases
M5 Ultra gate Every Mac reports the capability, and Muse requires nothing MuseGlimmerHardwareRequirementTests
Cancelled-row admission wait The wait never happens CancelledRowAdmissionTests: admission at the release, and the refusal at the bound

red-focused-01 ran the focused filters on the red build at 981e3d565, with the 7 patched files as the only tracked changes. The focused filters select no XCTest cases.

Runner Discovered and executed Passed Failed Skipped
Swift Testing 800 in 109 suites 656 48 96

Every fix's tests failed red:

Fix Failed red Passed red
Loop guard and thought exit 15 of 18 MuseGlimmerLoopGuardTests, including macBGPQAReplay 3
Tool reading, never a 500 3 of 17 MuseGlimmerToolStreamTests: strictToolsRefuse, invalidToolOutput, autoCallsAsGenerated 14
Reference prompt 6 of 9 MuseGlimmerReferencePromptTests; 2 of 6 MuseGlimmerPromptGoldenTests: the rendered text and the real-tokenizer token IDs 7
M5 Ultra gate 5 of 5 MuseGlimmerHardwareRequirementTests 0
Cancelled-row admission wait 2 of 3 CancelledRowAdmissionTests: admittedAtRelease, wedgedRowRefusedAtTheBound 1

That is 33 failures. The other 15:

  • 2 are the gate's red, seen by existing tests. GLM5NextHardwareGateTests.capabilityIsReportedOnlyOnQualifyingHardware and ProviderRuntimeCapabilityTests.liveDetectorExplicitBindingOrder pin exact capability sets. Under the red build, both sets also hold muse_glimmer_v1.
  • 13 are SSD-tier tests that could not write on this Mac. They are in EngineV2BridgePumpReceiptTests (4), EngineV2SharedBudgetTests (5), EngineV2SeededSamplingTests (1) and GLM5NextEncryptedCheckpointTests (3). They show filesWritten == 0 or cacheDidNotPersist.
    • The tests put their stores in the system temp directory, on this Mac's internal disk.
    • The SSD tier refuses writes below 20 GiB free (SSDPrefixCachePolicy.lowDiskAbsoluteFloorBytes). The internal disk had about 17 GiB free after the run.
    • None of the 7 red files touches the SSD tier. All 13 passed in green-all-01.

ATEMReferenceReaderTests (9) passed red, as expected: the red patch reverts the provider's wiring, not the SDK reader.

Not proven:

  • Nothing ran on an M5 Ultra or a GPU. This Mac is an M3 Ultra, and the new gate refuses Muse here. No live Muse request has gone through this branch.
  • Loop guard:
    • It cut both of Mac B's walled draws in a replay of their retokenized receipts. That is 2 fires, not the ≥ 20 live fires per model that owner §4 asks for before switching it on.
    • The off-vs-off byte-identical A/B was not run.
    • The answer the model writes after the exit is unmeasured.
  • Tool reading and prompt: checked against fixtures and the prompt golden corpus (36 earlier cases, 14 new), not against a live reference server.
  • M5 Ultra gate: the M5 Ultra path is tested only with injected hardware reports. Refusal on this Mac is the only real-hardware check.
  • Cancelled-row admission wait:
    • Tested only with a fake engine, not reproduced against Mac B's load generator.
    • A normal close (a FIN) is noticed only at the next failed write, so a request that arrives before then is still refused.
    • Another model's cancelled rows on the shared whole-Mac budget are not waited for.
    • The KV-budget refusal later in submission is not covered.
  • live_probe.py has never run against a live endpoint. It passed 8 of 8 probes against an in-process stub.
  • SDK tests: ATEMReferenceReaderTests ran through a temporary provider-side harness against the exact SDK commit the provider links, not under the SDK's own xcodebuild. check_forkdiff.py was skipped because the checkout has no upstream remote.
  • Commits: only the final tree was built and tested. The intermediate commits were not built one by one.
  • Coverage: the full provider suite was not run locally, only the filters above. CI has not run.

Components touched

  • provider-swift (Swift CLI)
  • native runtime / MLX (the mlx-swift-lm gitlink, for ATEMReferenceReader)
  • landing (Next.js)
  • enclave (Swift)
  • CI / provider release
  • docs

Protocol / interface changes

  • No protocol/interface changes

  • Yes — described above and matching side updated

  • New runtime capability muse_glimmer_v1. It is reported only for an M5 Ultra whose Metal device names one. Both Muse identities now require apple_m5, mlx_nax and muse_glimmer_v1, the coordinator's set. The coordinator's side of this lives in darkbloom-platform, not in this PR. Without these requirements the model is left out of advertisement, and a load is refused as permanently ineligible.

  • HTTP status for Muse tool calls. On an auto request, a tool frame the strict parser could not read was a generation failure, HTTP 500. Now:

    • auto without strict returns the call as generated;
    • a strict tool or a forced choice refuses a noncompliant call with 422;
    • a frame with no call is 422 on every request.
  • New environment keys, all passed through by the launch agent:

    • DARKBLOOM_MUSE_GLIMMER_REFERENCE_TOOL_CALLS
    • DARKBLOOM_MUSE_GLIMMER_REFERENCE_PROMPT
    • DARKBLOOM_CANCELLED_ROW_ADMISSION_WAIT
    • muse_glimmer is a new value for DARKBLOOM_LOOP_GUARD and DARKBLOOM_LOOP_EXIT_THINKING.
  • Local API, n above 1. The generic local chat routes (/v1/chat/completions, /chat/completions and any item of a batch) answer 400 invalid_request_error "n > 1 is not supported", param n, as the coordinator does (refuseMultipleChoices). n is read as the coordinator reads it: an integer, or a number truncated toward zero. The answer comes before any engine work. Nemotron Super's raw-body owner keeps its own documented 400. Responses and /v1/completions are unchanged.

  • Local API, template extensions. For a body that needs the ingress repair, the extensions (hasDeveloperMessage, and MiMo, GLM and Flint raw controls) now come from the body as sent, as on the coordinator path. A body the strict decode accepts is decoded as before.

  • No WebSocket message, CLI flag or release artifact changes. No version bump.

Documentation impact

  • Canonical documentation updated
  • No documentation needed — reason:

Updated:

  • docs/architecture/inference.md: the reference prompt, tool reading, the loop guard default and the cancelled-row admission wait.
  • docs/architecture/hardware-support.md and docs/provider/hardware-requirements.md: the M5 Ultra gate.
  • docs/reference/configuration.md, docs/provider/cli-reference.md, docs/reference/protocol-messages.md and docs/reference/model-registry-format.md.
  • docs/developer/test.md: the new Muse suites, and the replay's variables.
  • scripts/muse-glimmer-qualification/README.md: the live probe, and the request fields that turn drafting off for Muse.
  • docs/provider/direct-mode.md: n above 1 in "Refused request shapes".

Changelog

  • Added or updated this PR's unique changelog.d/<topic>.md fragment and ran make changelog-check.
  • No user-visible change, or an explicitly authorized release/history change.

The fragments are changelog.d/muse-glimmer-launch-fixes.md (its developer-merge bullet now covers the local API too), changelog.d/cancelled-row-admission-wait.md and the new changelog.d/local-api-multiple-choices.md. scripts/changelog.py check passed with 7 valid fragments on the combined tree.

Notes for reviewers

Defaults, per fix:

Fix Default Switch
Tool reading by the reference reader, never a 500 on DARKBLOOM_MUSE_GLIMMER_REFERENCE_TOOL_CALLS=0 restores the strict parser. Its failures are 422 too.
Reference prompt: raw schemas, vLLM developer merge, appended instructions on DARKBLOOM_MUSE_GLIMMER_REFERENCE_PROMPT=0 renders the earlier prompt.
Loop guard and thought exit for muse_glimmer off Add muse_glimmer to DARKBLOOM_LOOP_GUARD and DARKBLOOM_LOOP_EXIT_THINKING.
M5 Ultra gate muse_glimmer_v1 always No switch, by design. It matches the coordinator's routing requirement and fails closed.
Cancelled-row admission wait (every model) on DARKBLOOM_CANCELLED_ROW_ADMISSION_WAIT=0 refuses at once, as before.
  • Other models. Only the cancelled-row wait changes behaviour for them, and only while a cancelled row is retiring. It never admits work before the actual release. Its evidence is the fake-engine tests. If the owner counts that as unproven under §0, flipping it to off is one line in CancelledRowAdmissionWait.enabled.
  • Loop guard. It ships off under owner §4. In a replay of Mac B's 594-draw GPQA run, both walled draws (q101-e0, q173-e0) were cut at their first check, token 4,099. That is about 212 s and 219 s into each draw, against the client's 3,600 s wall. None of the other 592 draws was cut. A Python port of the detector gives the same result.
  • Slot after a disconnect. This is a general provider path. The row keeps its slot, whole-Mac share and KV until the engine's next step and the pump's cleanup. A cancelled row never donates, so there is no checkpoint export on a cancel. The server allows input half-close, so a FIN is noticed only at a failed write; changing that is an owner decision and is not done here.
  • No reviewed muse_glimmer serving profile was added. A reviewed profile would not stop the fallback to width 4 under Low Power or thermal pressure. Width 8 is already the automatic paged width on M5 Ultra. The reviewed-profile evidence rules cannot be met from the Mac B speed runs.
  • A wrong statement in a commit message. The gap 1 commit, a8bd41e9d, lists the integral float 6.0 among the strict parser's refusals. That is wrong: both readers read it as the integer. d369dd937 and 981e3d565 say so; the history was not rewritten.
  • Cost and limits. No Muse request runs under a token constraint today. A request with penalties, stop strings, logprobs or logit_bias stops drafting for its whole decode step, because the cohort drafts all or nothing.

From the go/no-go (2026-11-15):

  • Local API developer merge (gate 4c).

    • Cause. The go/no-go's reading is confirmed. LocalChatUploadResponder decodes a developer body a second time, from InboundChatNormalization.normalize's output. ChatTemplateControls came from those bytes.
    • Which models. On dev, no family reads the developer role, so the rendered symptom is Muse-only.
    • What else used the repaired bytes. Every raw capture on the local API did, whenever a body needed repair: MiMo, GLM and Flint. Those now also read the body as sent. No rendered difference was measured for them.
  • Streamed forced or required call off the schema (gate 4). This is not changed here. The established behaviour is the same for every family on dev: 200, then an SSE server_error frame once the call fails validation. That is because the local API commits the stream at admission, and the SDK frames a tool failure as tool_noncompliance only for multiple calls. Through the coordinator, the same refusal is a 422 tool_noncompliance only if nothing has reached the client. The coordinator commits at the first content chunk, reasoning included. Muse streams its reasoning before a forced call, as GLM does, so a 422 there would need the reasoning held back. Two options are open for the owner:

    • (A) hold a forced request's head until the call validates;
    • (B) name the SSE frame tool_noncompliance for a forced-choice violation in the SDK, which applies to every family.
  • n above 1 (gate 4). The coordinator already refuses n > 1 for every model, so OpenRouter traffic never asks a provider for it. This fix makes the local API say the same. Two other answers exist:

    • the Super owner's 400 "Invalid inference request.";
    • the qualification probe's alternative, two choices.

    If the owner prefers that the local API stay as it was, dropping 50cdaaa10 and 1cf20bb01 undoes it.

Before And After

Muse tool calls:

flowchart TB
  subgraph TOOLB["Before"]
    direction LR
    tb1["ATEM tool frame"] --> tb2["strict SDK parser"] --> tb3["off-schema call<br/>or empty frame"] --> tb4["HTTP 500"]
  end
  subgraph TOOLA["After"]
    direction LR
    ta1["ATEM tool frame"] --> ta2["reference reader,<br/>typed by declarations"] --> ta3["request validation"] --> ta4["auto: call as generated<br/>strict, forced or empty: 422"]
  end
  TOOLB ~~~ TOOLA
Loading

Muse prompt, with a developer message or a JSON response_format:

flowchart TB
  subgraph PB0["Before"]
    direction LR
    pb1["system + developer<br/>+ format instruction"] --> pb2["inserted system block<br/>replaces the default"] --> pb3["repaired schema types<br/>and marker key"] --> pb4["prompt differs<br/>from reference"]
  end
  subgraph PA0["After"]
    direction LR
    pa1["system + developer<br/>+ format instruction"] --> pa2["merged as vLLM merges,<br/>instruction appended"] --> pa3["caller's schemas<br/>as sent"] --> pa4["reference render"]
  end
  PB0 ~~~ PA0
Loading

A request that arrives while a cancelled row retires (every model):

flowchart TB
  subgraph CB0["Before"]
    direction LR
    cb1["client closes stream"] --> cb2["row holds slot<br/>until next step"] --> cb3["new request,<br/>full Mac"] --> cb4["503 capacity"]
  end
  subgraph CA0["After"]
    direction LR
    ca1["client closes stream"] --> ca2["row noted<br/>as cancelled"] --> ca3["new request waits<br/>up to 2 s for release"] --> ca4["admitted at release,<br/>or 503 at the bound"]
  end
  CB0 ~~~ CA0
Loading

The local API, a body with a developer message or n above 1:

flowchart TB
  subgraph LB0["Before"]
    direction LR
    lb1["body with developer<br/>or n = 2"] --> lb2["strict decode fails,<br/>repaired body decoded"] --> lb3["extensions from<br/>repaired bytes"] --> lb4["no developer merge;<br/>n ignored, one choice"]
  end
  subgraph LA0["After"]
    direction LR
    la1["body with developer<br/>or n = 2"] --> la2["repaired body decoded"] --> la3["extensions from<br/>the body as sent"] --> la4["developer merged;<br/>n > 1: 400, param n"]
  end
  LB0 ~~~ LA0
Loading

Refactor Pass

A dedicated refactor pass and a fresh-context independent review (owner §0) have not been done yet; both are owed before review.

The author's own pass over the final diff found three cleanups. None was applied: each would need another full build on the shared scratch disk, and none changes behaviour.

  • waitForCancelledRowRelease waits on one cancelled row. With several retiring at once, racing all of them would admit at the first release.
  • The revalidation after that wait repeats the one after the idle-calibration wait. One helper could serve both.
  • MuseGlimmerLoopGuardTests.swift is 776 lines. The Mac B replay could move to its own file.

Final focused validation: green-focused-02 at 981e3d565, with the red files restored and the corrected SDK test. Swift Testing: 800 in 109 suites; 691 passed, 13 failed, 96 skipped. The focused filters select no XCTest cases. 13 of the failures are the SSD-tier tests named under red-focused-01, which again could not write: the temp volume had 11.9 GiB free, under the SSD tier's 20 GiB floor. That is this Mac's disk, not this branch; they passed in green-all-01.

🤖 Generated with Claude Code

jonathan308 and others added 8 commits November 14, 2026 02:08
The loop guard and its exit from a repeating thought had no markers for
Muse Glimmer's Onyx framing, so neither could be turned on for it.

- Guard: the ATEM wrapper and a bare invoke are its call markers, with or
  without declared tools, since the channel splitter reads calls on any tool
  channel. A request whose parser is not ATEM gets no guard.
- Exit with tools (`museOnyx`): end the reasoning message (`<|eom|>`) and
  start the next assistant message, so the model picks the recipient.
- Exit without tools (`museOnyxToAnswer`): also write ` to=user<|message|>`,
  as GPT-OSS's final exit does; its output starts inside the answer, so the
  request's stops apply from the first token (`insideAnswerStopScope`).
  `DARKBLOOM_GPTOSS_FINAL_EXIT` stays GPT-OSS's switch only.

Both stay out of the default lists until an A/B on the model shows the guard
firing; `DARKBLOOM_LOOP_GUARD=muse_glimmer` and
`DARKBLOOM_LOOP_EXIT_THINKING=muse_glimmer` turn them on. The scheduler takes
the guard setting as a field so tests can set it, as it already does for the
exit. Every other family's lists and markers are unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
… a 500

The SDK's strict ATEM parser refused calls the reference servers return
(an undeclared name, arguments off the schema, an integral `6.0` for an
integer), and a tool frame with no parseable call on an `auto` request was a
generation failure, HTTP 500.

Muse Glimmer's tool channels are now read by the SDK's `ATEMReferenceReader`
(mlx-swift-lm bumped to the commit that adds it), with values typed by the
caller's declarations as sent. The request's own validation then decides:
`auto` without `strict` returns the call as generated, as vLLM does; a strict
tool or a forced choice refuses a noncompliant call as the model's
noncompliance, HTTP 422. A frame that holds no call is 422 on every request.

`DARKBLOOM_MUSE_GLIMMER_REFERENCE_TOOL_CALLS=0` (passed through by the launch
agent) restores the strict parser; its failures are 422 too. Other models
are unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Muse Glimmer's template writes a full system block for every system message
and its default block only when there is none. Three provider steps changed
the prompt the reference servers render:

- The ingress repair's render types reached the template, which writes each
  schema as JSON: a `$ref` parameter was shown as a string, with the repair's
  marker key. The caller's own declarations now render, unless they carry
  the reserved metadata, in which case admission decides as before.
- A request with a `developer` message now has its system messages merged
  into one leading block, as vLLM merges them. Without one nothing merges.
- The JSON `response_format`, `tool_choice: none` and forced-choice
  instructions were inserted as a new system message, which replaced the
  default block or added a second one. They are now appended to the caller's
  leading system message, else to the last user turn.

Every path that renders a request goes through the same restore step
(`restoringOriginalRequest`): serving, the prompt-token floor, body
tokenization and the benchmark prompt. The golden corpus gains 14 reference
cases (developer/system, tool schemas with `$ref`, tool choice none/named,
response formats); the 36 earlier cases are unchanged.

`DARKBLOOM_MUSE_GLIMMER_REFERENCE_PROMPT=0` renders the earlier prompt. Every
other model renders byte for byte as before.

Co-Authored-By: Claude <noreply@anthropic.com>
The provider now reports `muse_glimmer_v1` only when the hardware report
names an M5 Ultra and the system Metal device is named "Apple M5 Ultra".
Both Muse identities require `apple_m5`, `mlx_nax` and `muse_glimmer_v1`,
the same shape as GLM-5.3-Flash and the coordinator's set, so a Mac the
coordinator would not route Muse to also neither advertises nor loads it.

Without them the model is left out of advertisement, by the loop and the
standalone server, and a load is refused with the typed, permanent
ineligibility before any disk or loader work. The refusal names the
requirement. Other models' requirements are unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
- `scripts/muse-glimmer-qualification/live_probe.py` checks a live
  endpoint's penalties, stop strings, seed, `n`, streaming usage, finish
  reasons, logprobs and error shapes. It uses the standard library only,
  prints no key, and has not been run against a live endpoint.
- The qualification README lists the request fields that turn drafting off
  for Muse Glimmer, and why the cohort drafts all or nothing.
- Architecture, hardware, configuration, CLI and protocol docs describe the
  M5 Ultra gate, the reference prompt and tool reading with their switches,
  and the loop guard's default.
- A changelog fragment for the launch fixes.

Co-Authored-By: Claude <noreply@anthropic.com>
Mac B's full GPQA run (594 draws, effort medium, 8 rows, the defaults)
had two draws, q101-e0 and q173-e0, repeat a reasoning phrase with no
answer until the client's 3,600 s wall. Each held a row for an hour.

The replay spells each draw's received text back into the raw Onyx
output and retokenizes it with the pinned tokenizer. It then feeds it
through the production guard policy with the guard and the exit listed.
It is gated on MUSE_GLIMMER_NVFP4_DIR and MUSE_GLIMMER_LOOP_RECEIPTS.

It asserts:
- the defaults give no guard;
- both walled draws are cut inside the reasoning message, with the thought
  ended and the answer asked for, within the first quarter of their tokens
  and before 900 s;
- no other draw is cut.

A Python port of the detector gives the same result on the same
receipts: both are cut at token 4,099 (about 212 s and 219 s), and none
of the other 592 is.

Two earlier expectations are corrected:
- The strict ATEM parser also reads an integral float as the integer, so
  that case is not a strict refusal.
- The loop test engine does not apply stop strings. The test now checks
  that the continuation carries the request's stops and the inside-answer
  scope, which the engine applies.

docs/developer/test.md lists the new Muse suites and the replay's
variables.

Co-Authored-By: Claude <noreply@anthropic.com>
…using it

A row whose client went away keeps its serving slot, its whole-Mac
share and its KV until the engine drops it at its next step and its
pump releases them. A request that arrived on a full Mac in that window
was refused with a capacity 503, for a slot already being freed. Mac B's
GPQA run saw this twice, each right after a client closed a stream, and
each was served on retry.

The bridge now records the rows a cancel reached while they still hold
a slot. A capacity refusal while one of them retires waits for its
release, at most 2 s, using the existing waitForRowRelease. It then
revalidates ownership and the deadline, and asks once more:
- nothing is admitted before the actual release;
- with no such row the refusal is immediate;
- DARKBLOOM_CANCELLED_ROW_ADMISSION_WAIT=0 refuses at once, and the key
  reaches the LaunchAgent.

Not covered: a normal close (a FIN) is noticed only when a chunk can't
be written, because the server allows input half-close. A request that
reaches admission before then is still refused.

Tests use a fake engine that drops a cancelled row one step (100 ms)
later. They cover:
- admission at the release;
- an immediate refusal with no cancel, and with the switch off;
- a refusal at the bound for a row that never retires.

The architecture, configuration and CLI references describe the wait and
its switch, with a changelog fragment.

Co-Authored-By: Claude <noreply@anthropic.com>
…ctation

The SDK's ATEMReferenceReaderTests expected the strict ATEM parser to refuse
an integral float (`6.0`) for an integer parameter. The strict parser reads it
as the integer, as the provider's own tool-stream test already records, so
that case failed in the provider's run of the suite. The SDK commit corrects
the expectation; it changes no source.

The earlier gap 1 commit's message lists the integral float among the strict
parser's refusals. That part is wrong: the strict parser and the reference
reader read it alike.

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference-landing Ready Ready Preview Nov 18, 2026 5:12am UTC
darkbloom-status Ready Ready Preview Nov 18, 2026 5:12am UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 18, 2026 5:12am UTC

Request Review

jonathan308 and others added 7 commits November 15, 2026 02:07
…SDK base

Only the libs/mlx-swift-lm gitlink conflicted. It now pins c7dbf1a0, mlx-swift-lm
#429 (ATEM reference reader) with the refreshed feat/muse-glimmer-native (#423 + #434) merged in.
This branch started at 7b75e0d and did not contain feat/muse-glimmer-30b's
earlier dev merge; this merge brings the whole base in.
libs/mlx and libs/mlx-swift stay at 72dffa2d and b1c94d29.

Co-Authored-By: Claude <noreply@anthropic.com>
The serving-path test builds its controls as the coordinator path does. This
one sends the same body through `LocalChatUploadResponder`, streamed and not,
where a `developer` message is decoded again from the repaired body.

Co-Authored-By: Claude <noreply@anthropic.com>
Chat, its alias and batch, streamed or not, and a body that needs the ingress
repair: 400 invalid_request_error "n > 1 is not supported", param n, before the
engine sees the request. n absent, null, 0, 1, 1.5, a string or a Boolean is
served as before (the coordinator's integer reading).

Co-Authored-By: Claude <noreply@anthropic.com>
…abilities

Co-Authored-By: Claude <noreply@anthropic.com>
A body the strict decode refuses (a `developer` message, a scalar `stop`,
content-less messages, hosted tools) is decoded again from
`InboundChatNormalization`'s output. Its `ChatTemplateControls` were decoded
from those repaired bytes, where `developer` is already `system`, so
`hasDeveloperMessage` was false and Muse Glimmer's reference prompt never
merged the system messages on the local API (gate 4c, 4 of 50 prompts). The
coordinator path reads the extensions from the original bytes
(`ProviderLoop.decodeInboundChatRequest`); the local API now does the same, for
every raw capture (`hasDeveloperMessage`, MiMo, GLM and Flint controls). Only
repaired bodies change; a body the strict decode accepts is decoded as before.

Co-Authored-By: Claude <noreply@anthropic.com>
The request type has no `n`, so the generic local engine answered one choice
whatever `n` asked (go/no-go gate 4). The coordinator refuses `n > 1` for every
model with 400 invalid_request_error "n > 1 is not supported", param n
(`refuseMultipleChoices`), and Nemotron Super's owner refuses it as an invalid
request. The local chat routes now give the coordinator's answer before any
engine work: chat, its alias, and any item of a batch, with `n` read as the
coordinator reads it (an integer, or a number truncated toward zero). The
Super owner keeps its own documented answer.

Co-Authored-By: Claude <noreply@anthropic.com>
…SDK base

Only the libs/mlx-swift-lm gitlink conflicted. It now pins 1d2ba618, mlx-swift-lm
#429 (ATEM reference reader) with the refreshed feat/muse-glimmer-native (#423 + main fe9b5282) merged in.
libs/mlx and libs/mlx-swift stay at 72dffa2d and b1c94d29.

Co-Authored-By: Claude <noreply@anthropic.com>
jonathan308 and others added 2 commits November 15, 2026 05:24
…sting bounds

#2149 now reads the tool channel in linear time (e2c60ca) and pins #423 with the nesting
bounds. Only the libs/mlx-swift-lm gitlink conflicted. It now pins b7672434, mlx-swift-lm
#429 (ATEM reference reader) with that #423 (cc2be070) merged in.
libs/mlx and libs/mlx-swift stay at 72dffa2d and b1c94d29.

Co-Authored-By: Claude <noreply@anthropic.com>
The suite feeds seeded random and hostile model output, at every
chunking, through:

- the channel splitter;
- the tool frame;
- the SDK's ATEM reference reader and its strict parser;
- the scheduler's forwarding body, under every tool choice.

Each must hold up the way the inbound-depth (#2130), queue-budget
(#2135) and TOML (#2138) fixes were tested. It must not crash, stall,
buffer without bound, leak framing, raise invalidToolPayload or return
a 500. A frame the model gets wrong is the model's error, a 422.

deepNesting and the deep hostile frames need the nesting bounds of
mlx-swift-lm #423 (824db4cf and 31a7ccb2, from d266d4e6 and 7f958c64)
in the pin; this branch pins b7672434, which has them. Without them, a value
nested a few hundred levels deep stops the test process with SIGBUS,
as it would stop a provider.

repeatedStrayCloses took about two minutes in a debug build while the
splitter rescanned the tool body on every stray closing tag; with the
linear splitter of #2149 (e2c60ca) it takes about a second.

Test-only.

Co-Authored-By: Claude <noreply@anthropic.com>
GumbiiDigital added a commit to GumbiiDigital/d-inference that referenced this pull request Dec 3, 2026
…er fuzzing, local n>1 (replay Layr-Labs#2152)

Replays Layr-Labs#2152 onto dev: MuseGlimmerReferencePrompt
(caller tool schemas, vLLM developer/system merge, raw-bytes
LocalChatTemplateControls), ATEMReferenceReader default with HTTP 422 on
malformed frames, Apple M5 Ultra hardware gate (muse_glimmer_v1), Onyx
loop guard and exit-thinking (off by default), parser fuzz tests, local
n > 1 HTTP 400 refusal, and scripts/muse-glimmer-qualification/live_probe.py.

Drops Layr-Labs#2152's all-model 2s CancelledRowAdmissionWait (conflicts with
dev's OwnerMemoryWait, grantBelowMinimumKV(), and retainedFaultFence)
and updates MuseGlimmerHardwareRequirementTests for dev's .cachePolicy
capability.
GumbiiDigital added a commit to GumbiiDigital/d-inference that referenced this pull request Dec 3, 2026
…ecks (replay Layr-Labs#2151)

Replays Layr-Labs#2151 onto dev against the multimodal
libs/mlx-swift-lm pin (d625d5bde2bd6f181227e858422f1d072d84c6cc):
adds MuseGlimmerVisionArtifact, MuseGlimmerVisionPolicy,
MuseGlimmerVisionBudget, MuseGlimmerImagePrefill, discovery is_vision
advertisement, vision test suites, and consolidated
changelog.d/muse-glimmer-30b.md.

Guards both exitThinking assignment sites with museImages == nil in
MultiModelBatchSchedulerEngine.swift so Layr-Labs#2152's Onyx exit-thinking and
thought-budget rebuild never apply to image prompts.

This branch was successfully deployed

3 active deployments
Preview – d-inference-landing — 6ab9b243 Deployed Nov 18, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 6ab9b243 Deployed Nov 18, 2026 by vercel[bot]
Preview – darkbloom-status — 6ab9b243 Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant