Qwen3 schema request fails with an old assistant prefill
On the tested build, an old empty-thinking assistant prefill caused HTTP 400. Removing that appended message restored the exact JSON task.
Qualified 2026-10-16 Pacific · Same-agent local repeatabilityQualified 2026-10-16 Pacific on llama.cpp 0.6.0 build 11429 (d81235049), Qwen3-4B Q4_K_M; exact artifact SHA-256 in the package.
Apple M4 Pro, 24 GiB unified memory, macOS 26.3; CPU only, two threads, one slot, 2048-token context; loopback/offline.
For each repair, the same agent completed two seven-trial sequences in fresh server processes on the same Mac. Unchanged passing case runs were reused; the evidence index identifies them.
Same-agent repeatability checks on one Mac; no independent operator, second machine or human acceptance test.
Download full evidence cohort
412,621 bytes
SHA-256: 8a3e0d0b0f217f30e583450c7073dd1558ce75b9bb8f0e3e8f348e6260a28b93
Observed symptom
A schema-constrained chat request returns HTTP 400: Failed to initialize samplers: std::exception after appending an assistant message containing <think>\n\n</think>\n\n.
Correction
Remove the manually appended empty-thinking assistant message. Keep the original user message, schema, output budget and model template unchanged; let the template create the generation prompt.
- Compare the frozen request and prefill in fixtures/005-prefill.json before changing your client.
- Remove only the final manually added assistant prefill. Preserve real conversation history and the original JSON schema.
- Repeat the same extraction request. Require the exact array containing id 17 and text ALPHA, plus finish_reason=stop.
- Retain the raw HTTP error and corrected response. The package includes a restored-prefill negative control.
Results
In each of two fresh-process runs: 0/3 baseline task passes, 3/3 corrected passes and 0/1 reverted passes. All original task checks and scoped completion checks passed. The offline audit recomputed acceptance from raw responses and rejected six damaged corrected-response controls.
Failed attempts and controls
The historical assistant-prefill workaround failed with HTTP 400 in the exploratory run; the original no-prefill request and a supported thinking-off control worked.
Limits
Same-agent repeatability checks on one Mac; no independent operator, second machine or human acceptance test.
Fixed synthetic tasks selected after exploration. The repeat counts do not establish a general reliability rate or support for other models and builds.
Runtime binaries and model weights are excluded. Exploratory failures, the failed first qualification fixture and all final trial responses are retained.
Client demonstrations identify owned reference integrations and injected inputs explicitly; they are not claims of a repaired Open WebUI release or a general llama.cpp bug fix.
The 2025 upstream empty-response defect was not reproduced: the request without prefill already worked. This repair addresses the obsolete workaround failing on the pinned 2026 build.
Do not remove genuine assistant history or assume every kind of assistant prefill is invalid.
Evidence
The ZIP includes exact requests, raw responses, the indexed complete case runs, failed initial attempts, frozen runner/client code, the offline audit, all file checksums and the selection record. It contains no model weights or runtime binary.
Primary protocol or upstream reference. The current result above is limited to the identified artifacts and fixture.
Read this repair in Fix Finder →