Skip to content

New: diagnose formatting failures versus wrong answers

Kingy / AI Fix Finder

Find a tested fix for your AI error.

Search tested fixesDiagnose a response

Search real failures and their corrections. Every entry tells you what was tested, what changed and where the evidence stops.

Documented repairs cover llama.cpp, Ollama, LM Studio, Blender, Three.js, and JSON parsing. Check each repair’s exact version and conditions before trying it.

kingy tested

JSON is correct, but a Markdown fence breaks parsing

Six retained Qwen3 outputs pass exact-answer validation after removing one enclosing Markdown fence. Seven other fenced answers still fail.

Symptom: Python json.loads rejects a response beginning with ```json with JSONDecodeError: Expecting value: line 1 column 1 (char 0).

Change to inspect: Remove one enclosing Markdown fence only when it wraps the entire response, then parse and validate the answer again. Keep both the raw response and its original failed score.

Qwen3 + JSON parser · llama.cpp build10809; exact GGUF revisions in evidence ZIP; retained-output replay in Python 3.14.0

kingy tested

A valve stem drifts sideways as the engine turns

The initial V8 review found lateral valve movement; the retained correction fixes each valve axis.

Symptom: Valve stems move sideways while the crank angle changes.

Change to inspect: Use fixed valve axes with sliding rocker pads; keep the mechanism driven by the shared crank angle.

Three.js procedural geometry · Three.js 0.180.0; retained V8 source

kingy tested

Gemma 4 fails to allocate a 64K context on a 24 GB RTX 4090

The retained run passed after changing KV cache precision from FP16 to Q8_0.

Symptom: cudaMalloc cannot allocate a 1,200 MiB KV-cache buffer.

Change to inspect: Change both KV caches to Q8_0 for the same 64K workload, or reduce context to the retained passing 32K FP16 configuration.

llama.cpp · b10453 commit3cb7ffb1a1f612d5e4a46244ae5a3c77ad934a70

kingy tested

Blender GLB export includes an extra default Cube

Selected Objects alone retained a second scene in the starter spacecraft GLB. Adding Active Scene exported only the 14 spacecraft meshes.

Symptom: The exported GLB contains a second scene named Scene and an unwanted object named Cube, although the intended spacecraft is in Kingy_spacecraft.

Change to inspect: Keep Selected Objects enabled and enable Active Scene under the glTF exporter Include settings. In Python, use use_selection=True together with use_active_scene=True.

Blender glTF exporter · Blender 5.2.1 LTS, build 9e2066aef7ef; original starter script SHA-256 11fee75acf5b9 (full hash in evidence ZIP)

kingy tested

Blender starter stops with FileExistsError on a rerun

The starter protects an existing product_v001.blend. A new root folder lets a second build complete while preserving the first file.

Symptom: FileExistsError: Preserving existing file: ROOT_DIR/scenes/product_v001.blend. Choose a new root folder.

Change to inspect: Keep the existing file and choose a new, empty project root for a new build. To continue the same scene, open the saved .blend instead of running the scene-building script again.

Kingy Blender starter script · Blender 5.2.1 LTS, build 9e2066aef7ef; bundled Python 3.13.13; script SHA-256 11fee75acf5b9 (full hash in evidence ZIP)

kingy tested

llama.cpp rejects tool calls: tools param requires --jinja flag

Changing an explicit --no-jinja to --jinja restored the complete tested tool-call task; a separate agent repeated the result on the same Mac.

Symptom: The server returns HTTP 500: tools param requires --jinja flag.

Change to inspect: In the tested llama-server command, replace the explicit --no-jinja flag with --jinja. Restart that local server with the same model and settings, then validate the complete tool-call task.

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

kingy tested

llama.cpp rejects a prompt that exceeds its allocated context

A 518-token prompt failed in a 512-token allocation. A 2,048-token allocation preserved the entire source and restored the three tested facts.

Symptom: HTTP 400: request (518 tokens) exceeds the available context size (512 tokens), try increasing it.

Change to inspect: For this frozen task, change --ctx-size 512 to --ctx-size 2048. Preserve the entire prompt and allow for its output-token reserve; do not silently truncate or summarize the source.

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

kingy tested

Qwen3 returns reasoning but no visible answer when its output cap runs out

For one fixed arithmetic task, raising max_tokens from 8 to 1,024 restored the visible answer while keeping thinking enabled. A 512-token proposal still failed.

Symptom: HTTP 200 with nonempty reasoning_content, empty visible content and finish_reason length after eight completion tokens.

Change to inspect: For the retained task, increase max_tokens from 8 to 1024 while preserving thinking, prompt and other settings. Check that the visible answer completes and the stop reason is stop.

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

kingy tested

Schema-constrained JSON omits a required action field

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

Symptom: 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.

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

kingy tested

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.

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.

Change to inspect: 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.

llama.cpp + Qwen3-4B · llama.cpp 0.6.0 b11429; Qwen3-4B Q4_K_M; pinned SHA-256 in evidence

kingy tested

Warm llama.cpp prompt cache leaves tool arguments incomplete at a fixed output cap

At a fixed 64-token cap, this Qwen3-4B request produced incomplete tool arguments with a warm prompt cache. cache_prompt=false restored the complete tested call.

Symptom: Repeated required-tool requests reuse the prompt prefix, end with finish_reason=length and return argument strings that cannot be parsed as JSON.

Change to inspect: For this reproduced request, set cache_prompt=false while keeping the prompt, tool definition, temperature, seed and 64-token cap unchanged. Validate the complete tool call before using it.

llama.cpp + Qwen3-4B · llama.cpp 0.6.0 b11429; Qwen3-4B Q4_K_M; pinned SHA-256 in evidence

kingy tested

Incomplete tool-call JSON makes the next llama.cpp turn fail

An injected incomplete-call fixture caused HTTP 500 when replayed in history. Validating the whole tool turn before committing it kept the original task recoverable.

Symptom: The following request returns HTTP 500: Failed to parse tool call arguments as JSON after incomplete function arguments such as { enter conversation history.

Change to inspect: Stage the whole tool turn outside committed history. Require a complete tool_calls finish, the expected tool identity and valid original arguments before committing or executing it. Discard the failed staged turn and retry the unchanged original request.

llama.cpp + Qwen3-4B · llama.cpp 0.6.0 b11429; Qwen3-4B Q4_K_M; pinned SHA-256 in evidence

kingy tested

Python splitlines breaks streamed AI answers containing Unicode separators

A reference client split real model SSE data at U+0085, U+2028 and U+2029. Framing only ASCII CR/LF preserved the complete Unicode answer.

Symptom: A Python streaming client loses text or raises JSON/framing errors when str.splitlines treats Unicode characters inside a data payload as protocol line boundaries.

Change to inspect: Decode UTF-8 incrementally and frame SSE lines only on CRLF, CR or LF. Preserve Unicode separators inside JSON data. Require a complete stop event and DONE before accepting the answer.

llama.cpp + Qwen3-4B · llama.cpp 0.6.0 b11429; Qwen3-4B Q4_K_M; pinned SHA-256 in evidence

kingy tested

llama.cpp returns a tool call but the client shows an empty answer

A single-request reference client displayed empty message.content after a valid tool call. Supplying the validated tool result and making the next request completed the answer.

Symptom: The response succeeds with finish_reason=tool_calls and valid function arguments, but a client that displays only message.content shows no final answer.

Change to inspect: Handle the returned tool call in the client: validate it, perform the explicitly allowed operation, append its result with the actual tool_call_id and request the final assistant response.

llama.cpp + Qwen3-4B · llama.cpp 0.6.0 b11429; Qwen3-4B Q4_K_M; pinned SHA-256 in evidence

kingy tested

Native llama.cpp completion ignores a Chat API schema envelope

On native /completion, putting this schema in response_format left the required wrapper unenforced. The same schema in native json_schema restored the exact contract.

Symptom: A completed JSON response contains id and text but omits the required kingy_record wrapper when Chat API response_format is sent to the native /completion route.

Change to inspect: For native POST /completion, pass the unchanged schema in top-level json_schema. Use the documented Chat API response_format shape only with its corresponding chat endpoint.

llama.cpp + Qwen3-4B · llama.cpp 0.6.0 b11429; Qwen3-4B Q4_K_M; pinned SHA-256 in evidence

kingy tested

LM Studio model_not_found: use the loaded model identifier

The runtime returned its specific model-lookup error for the supplied identifier. This does not diagnose a missing GGUF, an allocation failure or an HTTP route mismatch.

Symptom: The runtime returned its specific model-lookup error for the supplied identifier. This does not diagnose a missing GGUF, an allocation failure or an HTTP route mismatch.

Change to inspect: Inspect GET /api/v1/models or lms ps and select the exact loaded instance identifier. In this retained case, kingy-memory-lms was already loaded; changing only the request model field restored the task.

LM Studio · LM Studio 0.4.26+4; llama.cpp Metal engine 2.60.0

kingy tested

LM Studio HTTP 500 hides a context-size error

The native LM Studio API wrapped a typed inner context-size rejection in an outer HTTP 500. The retained request contained 518 rendered input tokens while the loaded model had a 512-token context.

Symptom: The native LM Studio API wrapped a typed inner context-size rejection in an outer HTTP 500. The retained request contained 518 rendered input tokens while the loaded model had a 512-token context.

Change to inspect: Reload the same model instance with a larger supported context. The retained correction used lms load qwen3-4b --context-length 2048 --gpu max --parallel 1 --identifier kingy-memory-lms. The load setting must take effect before repeating POST /api/v1/chat.

LM Studio · LM Studio 0.4.26+4; llama.cpp Metal engine 2.60.0

kingy tested

Ollama model not found: select an existing local tag

The runtime returned its specific model-lookup error for the supplied identifier. This does not diagnose a missing GGUF, an allocation failure or an HTTP route mismatch.

Symptom: The runtime returned its specific model-lookup error for the supplied identifier. This does not diagnose a missing GGUF, an allocation failure or an HTTP route mismatch.

Change to inspect: Inspect ollama list or GET /api/tags on the same local server. Select the exact existing name:tag. In this retained case, kingy-memory-qwen3:pilot already existed; changing only model restored the task. Do not download a model merely to correct a typo.

Ollama · Ollama 0.40.5; CPU runner

kingy tested

Ollama request exceeds the available context size

Ollama returned HTTP 400 because the 518-token rendered request exceeded its 512-token allocation. This retained build rejected the input; it did not silently truncate it.

Symptom: Ollama returned HTTP 400 because the 518-token rendered request exceeded its 512-token allocation. This retained build rejected the input; it did not silently truncate it.

Change to inspect: Increase the effective options.num_ctx for the same local model and request, within its supported context and available memory. This retained correction changed 512 to 2048; loaded-state readback confirmed 2048.

Ollama · Ollama 0.40.5; CPU runner

kingy tested

A JSON closing brace in stop cuts off the structured answer

A request stop sequence matched the JSON closing brace before the schema-constrained answer finished. Removing that stop sequence restored the exact complete record.

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

Change to inspect: 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.

llama.cpp + Python client · llama.cpp 0.6.0 b11429; Qwen3-4B Q4_K_M; Python 3.14.0

kingy tested

A whole-body JSON client receives an SSE stream

The reference client tried to parse text/event-stream as a single JSON document. Requesting a non-streamed response restored its complete original structured task.

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

Change to inspect: 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.

llama.cpp + Python client · llama.cpp 0.6.0 b11429; Qwen3-4B Q4_K_M; Python 3.14.0

kingy tested

JSON mode parses successfully but returns the wrong object shape

Plain JSON mode did not enforce the application schema. Supplying that schema constrained the response to the required wrapper and exact field types.

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

Change to inspect: 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.

llama.cpp + Python client · llama.cpp 0.6.0 b11429; Qwen3-4B Q4_K_M; Python 3.14.0

kingy tested

Parsing each streamed tool-argument fragment as JSON fails

The owned client treated an incomplete argument delta as a whole JSON document. Assembling the complete call restored its original inventory task without changing the model request.

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

Change to inspect: 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.

llama.cpp + Python client · llama.cpp 0.6.0 b11429; Qwen3-4B Q4_K_M; Python 3.14.0

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…

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.

Model will not load? Check memory and KV-cache errors locally.

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 help you finish?

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?

All Apps & Labs · Local Lab evidence · Check tool changes

Saved settings stay on this device. Shared links omit private text and actual spending. Reports enter a private review queue. No generated claims or automatic publication.

Contribute a reproducible result

Include the outcome, exact versions, prompts and settings, every attempt, failures, charges if recorded and active repair time. Supply files you own or have permission to share, an attribution and a public evidence link. Remove personal data, tokens and private prompts. Reports are reviewed before any public use; submitting does not publish your work.

Prepare a reproducibility report

Valid JSON can still contain the wrong answer

Retrospective diagnostic, September 19, 2026. We rechecked 18 retained September 7 outputs for two synthetic rules. No new model inference was run, and the original strict scores are unchanged.

Three attempts per model file, per task. Scroll horizontally on small screens.
Exact fileL03: deadline before Sep 10L04: at most $100 and consent true
Qwen3-0.6B-Q8_00/3 strict passes; 3 content/schema failures0/3 strict passes; 3 content/schema failures
Qwen3-1.7B-Q8_00/3 strict passes; 3 content/schema failures0/3 strict passes; 3 formatting-only failures
Qwen3-4B-Q4_K_M2/3 strict passes; 1 content failure0/3 strict passes; 3 content failures

Choose the next check from the symptom

Download the offline boundary checker and evidence notes. Extract the unchanged original evidence ZIP into qwen-evidence, then run python3 check-boundaries.py ../qwen-evidence from the companion folder. Python 3.10+; standard library only; no provider requests.

The checker independently expresses these two known synthetic predicates. It is not a general prompt repair and must not authorize real spending or consent decisions. A revised prompt remains untested until a separate run verifies it.

Exact environment and limits

Apple M4 Pro, 24 GiB unified memory; llama.cpp 0.4.0-dev build10809 commit5266f24da; 4,096-token context, temperature 0.6, top-p 0.95, output cap 256, seeds 4101–4103. Exact GGUF revisions are retained in the original ZIP. Quantizations differ, and three repeats are not a reliability estimate. Requested GPU offload was not independently confirmed. Provider charges were $0; hardware, electricity and active repair time are unknown.

Original benchmark and scoring · All retained L04 attempts