Skip to content

Fix Finder / Troubleshooting

Empty response in Qwen or llama.cpp: how to fix it

Fix

  1. Inspect finish_reason, reasoning_content and tool_calls in the complete response.
  2. For finish_reason: length with reasoning but no answer, allow more output within the context budget. The retained task needed 1024 tokens; 512 failed.
  3. For a complete tool call, validate the call, supply its result with the returned ID and request the final answer.
  4. Repeat the original task and check its expected result. Empty content with finish_reason: stop remains unresolved.

An empty message.content needs the rest of the response to explain it. Check finish_reason, reasoning_content and tool_calls before changing the model or prompt.

Kingy reproduced two different causes on a pinned llama.cpp and Qwen3-4B setup: the output cap ran out during reasoning, and a client stopped after receiving a tool call. The debugger below separates those conditions using your supplied response.

Check an empty response locally

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.

LM Studio: empty content when Qwen3 runs out of output room

Kingy-tested setup observation, November 15, 2026: empty reply reproduced; a later check produced a visible answer. LM Studio 0.4.28 with Qwen3-4B returned an OpenAI-compatible Chat Completions response containing empty visible content, nonempty reasoning and a length finish reason at a five-token output cap:

content: ""
reasoning_content: "Okay, the"
finish_reason: "length"
completion_tokens: 5
reasoning_tokens: 3

The response contained three reported reasoning tokens within five completion tokens. With a later max_tokens: 400 check, the server returned a visible greeting, using 119 completion tokens including 83 reasoning tokens. This supports checking the output allowance when the full response has this pattern.

  1. Inspect the complete /v1/chat/completions response, including content, reasoning_content, finish_reason and token usage. Empty content alone does not identify the cause.
  2. For nonempty reasoning with finish_reason: length, allow more output within the loaded context budget. The 400-token check is an observed setting for this greeting, not a universal repair threshold.
  3. Keep the same intended model, request and loaded settings for your own verification. Confirm a visible answer, inspect the finish reason, and check the original task's expected result. Retain failures instead of counting HTTP success as task completion.

Test limits: the original request bodies were not retained, a model-identifier fallback occurred, and a model unload/reload took place between these checks. We cannot claim that only max_tokens changed, that the model honored the requested identifier, or that this was an otherwise controlled before/after test. It was one M4 Pro Mac with 24 GB unified memory and macOS 26.3. The separate October llama.cpp repair evidence and dates below remain unchanged.

See the official LM Studio Chat Completions parameters and our tested LM Studio setup walkthrough. The private setup logs are summarized without exposing local paths.

Read the completion state first

Checks for one final Chat Completions response
What you seeWhat to check next
Empty content, nonempty reasoning, finish_reason: lengthInspect the output allowance and available context. The generation ended before a visible answer.
Empty content, complete tool_calls, finish_reason: tool_callsThe client needs to validate the call, supply its result, and request the final answer.
Empty content with finish_reason: stopThe cause remains unresolved. Keep the complete response and inspect stop settings, template and runtime logs.
A streaming delta or several choicesSupply one assembled final response. The debugger does not assemble streams or select a choice for you.

The output-cap repair that passed

For the fixed task 19 + 23, an 8-token cap returned reasoning and an empty visible answer. A proposed 512-token cap also failed in all three author checks. At 1,024, the same task returned exactly 42, finished normally, and used 698 total completion tokens. Thinking stayed enabled.

These measurements apply to this task and configuration. A 1,024-token cap is not a universal minimum. The precise reasoning-versus-answer token split was not recorded. Check the full context budget before raising the output allowance.

Inspect repair 003, including the failed 512-token proposal.

A tool call can have no final answer yet

In repair 009, the server returned a valid inventory lookup. The reference client displayed only message.content, so it showed an empty answer. Supplying the synthetic stock result with the returned call ID and making the next request completed the task.

For a real integration, validate the tool identity and arguments against your own contract, check permissions, and prevent duplicate execution. This debugger executes no tools. Incomplete arguments need a separate check before they enter conversation history.

Inspect the complete tool-result loop repair · Check incomplete tool history.

Verify the original task after a change

Keep the failed response and unchanged task. Repeat with one deliberate correction, require complete termination, and check the original expected values. A nonempty answer alone does not establish that the task succeeded.

An HTTP error belongs to a different path. An explicit --no-jinja setting rejected tool requests in repair 001. An obsolete manually appended assistant prefill caused a sampler error in repair 005. Neither case establishes the cause of an unrelated blank reply.

What this evidence covers

These model tests were qualified October 15–16, 2026, using llama.cpp 0.6.0 build 11429 and Qwen3-4B Q4_K_M on one M4 Pro Mac with 24 GiB unified memory. Repairs 001–004 have separate-agent reruns on that Mac. Repairs 005–010 have same-agent repeats in fresh server processes. No second-machine or human reproduction is claimed.

This guide reuses those retained results. Loading an example runs no model. The debugger performs local static checks and cannot verify a proposed correction on your setup. Each linked repair retains its exact artifacts, failed attempts and applicability limits.

Open the full Fix Finder debugger · Browse all tested repairs

Guide published October 16, 2026. Repair measurements remain dated October 15–16, 2026.