Four local-model client/configuration repairs

Qualified October 27, 2026 Pacific. One fresh CPU-only server process on one Mac; same agent. Not independent human testing, real-user recovery or an upstream software fix.

Each case: 0/3 baseline, 3/3 corrected, 0/1 reverted full-task passes. 28 unique attempts. Offline raw-response audit recomputed all 28 and rejected 44 damaged/negative controls.

A JSON closing brace in stop cuts off the structured answer

The JSON client fails to parse an HTTP 200 answer with finish_reason=stop because closing braces are missing.

Correction

Remove the client stop sequence that collides with JSON syntax. Here only stop=["}"] was removed; the unchanged schema, prompt, output cap and original exact-answer checker were retained.

Verify the unchanged task

  1. Inspect the actual serialized stop setting and raw message.content; finish_reason=stop alone does not prove a complete JSON document.
  2. For this fixture remove stop=["}"]. Keep the exact original response schema, source facts, model, prompt and 128-token cap.
  3. Parse the complete content with duplicate-key rejection and validate the unchanged record contract: kingy_record contains integer id 17 and text ALPHA, with no extra keys.
  4. Retain the original truncated output. The package includes the same stop setting restored as a negative control.

Scope and limits

Qualified October 27, 2026 by the same agent in one fresh server process on one Apple M4 Pro Mac with 24 GiB unified memory; no independent operator, second machine or human usability outcome.

Three baseline failures, three corrected full-task passes and one reverted failure per repair. These are fixed synthetic integration tasks chosen after exploration, not a general reliability estimate or evidence of user demand.

llama.cpp 0.6.0 build 11429 commit d81235049, Qwen3-4B Q4_K_M, Python 3.14.0; CPU-only four threads, one slot, 2048-token context, reasoning off, temperature 0, seed 42 and cache_prompt=false.

The failing clients/settings are owned reference integrations. These tests do not establish an installed application defect or an upstream runtime fix. Runtime binaries and model weights are excluded from the package.

Only this brace collision was tested. Do not delete intentional application stop markers without reviewing the original task. A different incomplete answer may instead require output-budget or transport diagnosis.

A whole-body JSON client receives an SSE stream

json.loads on the HTTP body raises JSONDecodeError at data: even though the local server returned HTTP 200.

Correction

For a client that expects one complete Chat Completion JSON body, set stream=false. Keep the endpoint, task, response schema and other generation settings unchanged.

Verify the unchanged task

  1. Check the request stream flag and response Content-Type before interpreting a JSONDecodeError as a model failure.
  2. If the application needs one complete JSON response, change only stream=true to stream=false. A streaming interface instead needs a maintained SSE decoder and delta aggregation.
  3. Parse the outer completion envelope, require one completed choice, then parse message.content and validate every original field and type.
  4. The retained baseline contains the actual SSE wire body; the corrected response contains the exact expected wrapped record.

Scope and limits

Qualified October 27, 2026 by the same agent in one fresh server process on one Apple M4 Pro Mac with 24 GiB unified memory; no independent operator, second machine or human usability outcome.

Three baseline failures, three corrected full-task passes and one reverted failure per repair. These are fixed synthetic integration tasks chosen after exploration, not a general reliability estimate or evidence of user demand.

llama.cpp 0.6.0 build 11429 commit d81235049, Qwen3-4B Q4_K_M, Python 3.14.0; CPU-only four threads, one slot, 2048-token context, reasoning off, temperature 0, seed 42 and cache_prompt=false.

The failing clients/settings are owned reference integrations. These tests do not establish an installed application defect or an upstream runtime fix. Runtime binaries and model weights are excluded from the package.

This correction changes the transport mode for an owned whole-body client. It does not repair an SSE parser or measure streaming latency, and is separate from the existing Unicode SSE framing case.

JSON mode parses successfully but returns the wrong object shape

The response is valid JSON with id and text at the root, but the application requires those fields inside kingy_record.

Correction

Replace plain response_format={"type":"json_object"} with the tested nested json_schema response format carrying the unchanged original schema. Keep the prompt and expected source facts unchanged.

Verify the unchanged task

  1. Retain the original application schema separately from the prompt. Parsing JSON is only the first check.
  2. For the tested Chat endpoint use response_format type json_schema with json_schema.name, json_schema.strict and json_schema.schema; put the original schema in that schema field.
  3. Validate the exact original object shape, required fields, types and source facts after generation. The fixture requires kingy_record containing integer id 17 and text ALPHA.
  4. Do not widen the checker to accept an unwrapped baseline. An unchanged checker rejects all four baseline/reverted outputs in the packet.

Scope and limits

Qualified October 27, 2026 by the same agent in one fresh server process on one Apple M4 Pro Mac with 24 GiB unified memory; no independent operator, second machine or human usability outcome.

Three baseline failures, three corrected full-task passes and one reverted failure per repair. These are fixed synthetic integration tasks chosen after exploration, not a general reliability estimate or evidence of user demand.

llama.cpp 0.6.0 build 11429 commit d81235049, Qwen3-4B Q4_K_M, Python 3.14.0; CPU-only four threads, one slot, 2048-token context, reasoning off, temperature 0, seed 42 and cache_prompt=false.

The failing clients/settings are owned reference integrations. These tests do not establish an installed application defect or an upstream runtime fix. Runtime binaries and model weights are excluded from the package.

This tests absent schema enforcement in plain JSON mode. It does not claim full JSON Schema dialect support. The fixture explicitly asks for unwrapped source facts while the original application schema requires a wrapper; these deliberately different contracts make the boundary observable. Existing schema-envelope and unsupported-composition cases remain separate.

Parsing each streamed tool-argument fragment as JSON fails

The reference streaming client raises JSONDecodeError on an arguments delta such as an opening brace; the complete tool arguments arrive over multiple events.

Correction

Accumulate tool-call argument fragments by call index and validate only after a complete tool_calls finish and DONE. Then validate the allowed function and exact arguments before supplying the harmless fixture result and requesting the final answer.

Verify the unchanged task

  1. Keep argument deltas provisional. For this single-choice/single-call fixture, collect the call identity/name and append argument fragments for index 0.
  2. Require finish_reason=tool_calls, DONE and a complete allowed lookup_stock call with exactly sku KINGY-017. Reject missing completion, changed identity or malformed arguments before any operation.
  3. Supply only the owned synthetic result stock 37 with the actual tool_call_id; append the assembled assistant call and make the final request with tool_choice=none.
  4. Require the exact final answer Stock for KINGY-017: 37. with finish_reason=stop. No generated code, external inventory lookup or other tool is executed.

Scope and limits

Qualified October 27, 2026 by the same agent in one fresh server process on one Apple M4 Pro Mac with 24 GiB unified memory; no independent operator, second machine or human usability outcome.

Three baseline failures, three corrected full-task passes and one reverted failure per repair. These are fixed synthetic integration tasks chosen after exploration, not a general reliability estimate or evidence of user demand.

llama.cpp 0.6.0 build 11429 commit d81235049, Qwen3-4B Q4_K_M, Python 3.14.0; CPU-only four threads, one slot, 2048-token context, reasoning off, temperature 0, seed 42 and cache_prompt=false.

The failing clients/settings are owned reference integrations. These tests do not establish an installed application defect or an upstream runtime fix. Runtime binaries and model weights are excluded from the package.

The reference decoder supports the retained complete LF-delimited, UTF-8 SSE bodies for one choice and one call only. It is not a general network client. Real multi-call clients need index separation and appropriate execution permissions/idempotency. This repairs assembly before history commitment, rather than the existing rejection/retry of an already malformed history turn.

Download raw responses, requests, reproduction, checker and exact hashes (105390 bytes; SHA-256 3896413bb91395bd1634be0491ba3fc7a0f4cbba8d5c55416a2d52e246bb6ed1). Model weights and runtime executables excluded.

Run python3 audit.py after extraction to replay the evidence offline. No inference is performed by that audit. Read README.md before fresh reproduction.