#1689·llm

OpenAI-compatible endpoints discard llama.cpp reasoning_content from Chat Completions responses

Author: jrg72Created Sep 18, 2026Updated Sep 18, 2026

Hello folks, I'm using llm against a local llama.cpp endpoint serving Qwen3.8.

The server returns model reasoning successfully via the DeepSeek-style field:

json
choices.message.reasoning_content

and in streamed responses as:

json
choices.delta.reasoning_content

Unfortunately, llm displays/logs the prompt and final response but does not display reasoning on STDERR or store it in llm logs.

Expected behavior

For OpenAI-compatible Chat Completions endpoints, preserve:

  • non-streaming choices[].message.reasoning_content
  • streaming choices[].delta.reasoning_content

as LLM reasoning content / ReasoningPart, such that it is:

  • printed to STDERR during llm prompt / llm chat
  • available in llm logs
  • represented in llm logs --json

Actual behavior

Only the normal assistant content is displayed and logged. No reasoning is shown on STDERR, included in log output, or visible in JSON logs.

Verification

Direct request to llama-server:

bash
curl -sS http://127.0.0.1:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "Qwen3.8-27B-UD-Q4_K_XL.gguf",
    "stream": false,
    "messages": [
      {
        "role": "user",
        "content": "Explain the result briefly."
      }
    ]
  }' | jq '.choices.message'

Returns both fields:

json
{
  "content": "…final answer…",
  "reasoning_content": "…reasoning trace…"
}

The streamed curl test also returns delta.reasoning_content.

Server configuration

Relevant llama-server flags:

--jinja
--reasoning on
--reasoning-effort medium
--reasoning-format deepseek

Environment

  • llm version: llm, version 0.33

  • llama.cpp commit: b10470

  • Model: Qwen3.8-27B-UD-Q4_K_XL.gguf

  • Endpoint: http://127.0.0.1:8000/v1

  • Operating system: 7.0.0-1019-nvidia #19~24.04.2-Ubuntu aarch64

  • Invocation/configuration:

    - model_id: qwen38
      model_name: /opt/models/Qwen3.8-27B-UD-Q4_K_XL.gguf
      api_base: "http://localhost:8000"
      supports_tools: true

I have verified that no --hide-reasoning / -R option is in use.

PS: Thank you for this tool, it really is fantastic, and thank you for all the pelicans, they make reading Hacker News a bit more fun.