Skip to content

Kingy / AI Fix Finder

← All fixes

Schema-constrained JSON omits a required action field

Check this fix ↓

For a tested mixed properties/oneOf schema, complete disjoint alternatives restored required action fields without weakening the original application validator.

kingy tested

Tested repair · llama.cpp + Qwen3-4B · llama.cpp 0.6.0 b11429; Qwen3-4B Q4_K_M; exact hashes in evidence

Check this fix

Applies when
A completed JSON response contains {"actions":[{"location":"mall"}]} even though each action requires an action field.
Change to inspect
Use the packaged normalized-schema.json as the decoder schema and keep original-schema.json as the application validator. The rewrite puts common requirements inside each complete disjoint oneOf alternative.
Expected result
Each executor recorded six baseline failures, six exact corrected successes and two reverted failures across two fixed prompts. The semantic check matched 7,934 cases plus 1,005 separately authored cases.
If it still fails
Keep the original failed output and check the conditions and verification steps below. Retained failed attempt: Both the neutral trip prompt and an incomplete-example stress prompt omitted action under the original decoder schema. A separate three-action control already worked with both schemas; that prompt dependence is retained.

Tested or reviewed 2026-10-15. Verify the original task on your own version and settings; this case does not prove a universal fix.

Read the verification steps ↓ · Report your outcome ↓

Check this failure on your own input

Start with the original example, then replace it with a non-sensitive request and response. Compare the observed condition with the correction below.

Download this case’s input and verification checklist

Run this case’s local diagnostic

Free browser-local debugger

Why did my AI response fail?

Check an empty answer, context overflow, missing fields, incomplete tool history, cache evidence, Unicode stream framing, or a schema sent to the wrong endpoint. Inspect a proposed change, then verify it against your original task.

Pasted data stays in this tab. This debugger makes no API calls, executes no tools, and saves no inputs. Diagnosis does not prove a correction works on your setup.

Try a retained example or paste your own JSON below.

What to verify after the correction

Up to 40,000 characters per box. Use the final assembled Chat Completions JSON body, not an individual streaming fragment, cURL command, or HTTP headers. Complete text-only SSE with a stop event and [DONE] is also supported; imported text is already decoded by your browser. Native /completion requests are supported for schema-envelope checks. Leave keys and account details out.

Context counts and local file import

Use measured runtime counts, including template, history and tools. This tool does not estimate tokens from character count or predict memory fit.

Loading local debugger…

Enter the full runtime and build to compare its exact text with the documented case. A match does not verify your model, configuration or repair; check the other case conditions too. The comparison status and documented version, but not your input, are included in the diagnosis download. For JSON or CSV, check the output in Output Preflight after a change; this does not establish factual accuracy.

Evidence and supported scope

Rules reuse the ten completed pilot repairs listed below. Model tests used pinned llama.cpp 0.6.0 b11429 and Qwen3-4B Q4_K_M on one Mac. The first four have separate-agent reruns on that Mac; the remaining six have same-agent repeats. No second-machine, human reproduction, or universal compatibility is claimed. Example previews replay retained data; they run no new model inference.

Malformed JSON, conflicting schemas and unsupported response shapes remain unresolved. A parseable response can still contain wrong facts. Schema-envelope proposals preserve the supplied schema; they do not establish general schema support.

What happened

Symptom

A completed JSON response contains {"actions":[{"location":"mall"}]} even though each action requires an action field.

Exact environment and tested conditions

Qualified October 15, 2026 on llama.cpp 0.6.0 build 11429 (d81235049384534c167caea52b85a694f6103d14), Qwen3-4B Q4_K_M.

macOS 26.3 build 25D125, Apple M4 Pro / Mac16,7, 24 GiB unified memory; CPU-only inference.

Separate-agent rerun from a fresh extraction and fresh server processes on the same physical Mac.

Correction

Use the packaged normalized-schema.json as the decoder schema and keep original-schema.json as the application validator. The rewrite puts common requirements inside each complete disjoint oneOf alternative.

Result

Each executor recorded six baseline failures, six exact corrected successes and two reverted failures across two fixed prompts. The semantic check matched 7,934 cases plus 1,005 separately authored cases.

What did not work

Both the neutral trip prompt and an incomplete-example stress prompt omitted action under the original decoder schema.

A separate three-action control already worked with both schemas; that prompt dependence is retained.

  1. Keep the original Draft 7 schema and validation rules. Do not add action values or narrow the original permission for empty arrays and extra fields.
  2. Inspect SEMANTICS.md and the exact original-schema.json and normalized-schema.json in the package before using this contract-specific rewrite.
  3. Submit the same frozen prompt and settings with normalized-schema.json to the native /completion json_schema route.
  4. Validate the returned JSON against original-schema.json and the exact task answer. For the neutral trip, action must be go_to and location must be mall.
  5. Inspect the retained author and separate-agent runs, generated grammars and semantic checks. This is not a general-purpose schema normalizer.
Sources & limits

Repair 004: full qualification report and limits

Download repair 004 evidence ZIP (321,818 bytes; SHA-256 3f06c7949d2fe45dcccefb55629a9c0e81a1d86a69bdc120c68e8750247f9dfe)

Record checked 2026-10-15.

Same-host separate-agent reproduction, not independent human testing or a second-machine result.

These fixed synthetic tasks and repeated settings do not establish a general reliability rate, other-model behavior or minimum hardware requirements.

Original failures, failed correction proposals, prompts, outputs, settings and checksums remain in the evidence package. Model weights and runtime executables are not included.

Qualification ran October 15, 2026. Publication does not make this a test of later software or model revisions.

This is a contract-specific decoder workaround, not a runtime patch, proof of complete Draft 7 support, or an exact recreation of the historical upstream Windows/Llama3 report.

This still happens?

Send the smallest example that reproduces it. Use a public, non-sensitive example; leave out account details, keys and private files.

Help improve this tool

Did this repair work for you?

About AI Fix Finder. Your self-reported outcome goes to Kingy’s private review queue; it is not an independently verified reproduction.

Your experience with AI Fix Finder
What happened?