[GH-ISSUE #12068] Qwen2.5:7b outputting wrappers in content when it should not #33776

Open
opened 2026-04-22 16:46:44 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @DevTakao on GitHub (Aug 25, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12068

What is the issue?

After a chat session with Qwen2.5 and testing its function call abilities, I said "Thanks" to it and in the response it generated, content is preceded by an unnecessary data structure, which looks like the wrapper object of responses.

I noticed that the first few questions and answers, including tool calls were correct and then it randomly starts adding these wrappers in the content. There is no specific count of questions and answers that triggers it as far as I tested. Maybe it falls under hallucinations category?

[Role]: user  
[Content]:  
thanks
---
[Role]: assistant  
[Content]:  
{
  "id": "chatcmpl-997",
  "object": "chat.completion",
  "created": 1756112873,
  "model": "qwen2.5:7b",
  "system_fingerprint": "fp_ollama",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        // ---------- see the content value ----------
        "content": "{\n  \"id\": \"chatcmpl-186\",\n  \"object\": \"chat.completion\",\n  \"created\": 1756112897,\n  \"model\": \"qwen2.5:7b\",\n  \"system_fingerprint\": \"fp_ollama\",\n  \"choices\": [\n    {\n      \"index\": 0,\n      \"message\": {\n        \"role\": \"assistant\",\n        \"content\": \"You're welcome! If you need any more shifts created or have any other questions, feel free to ask.\"\n      },\n      \"finish_reason\": \"stop\"\n    }\n  ],\n  \"usage\": {\n    \"prompt_tokens\": 1743,\n    \"completion_tokens\": 29,\n    \"total_tokens\": 1772\n  }\n}"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 1906,
    "completion_tokens": 172,
    "total_tokens": 2078
  }
}

Relevant log output


OS

Windows, macOS

GPU

Apple

CPU

Apple

Ollama version

0.11.6

Originally created by @DevTakao on GitHub (Aug 25, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12068 ### What is the issue? After a chat session with Qwen2.5 and testing its function call abilities, I said "Thanks" to it and in the response it generated, `content` is preceded by an unnecessary data structure, which looks like the wrapper object of responses. I noticed that the first few questions and answers, including tool calls were correct and then it randomly starts adding these wrappers in the content. There is no specific count of questions and answers that triggers it as far as I tested. Maybe it falls under **hallucinations** category? ```text [Role]: user [Content]: thanks --- [Role]: assistant [Content]: { "id": "chatcmpl-997", "object": "chat.completion", "created": 1756112873, "model": "qwen2.5:7b", "system_fingerprint": "fp_ollama", "choices": [ { "index": 0, "message": { "role": "assistant", // ---------- see the content value ---------- "content": "{\n \"id\": \"chatcmpl-186\",\n \"object\": \"chat.completion\",\n \"created\": 1756112897,\n \"model\": \"qwen2.5:7b\",\n \"system_fingerprint\": \"fp_ollama\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"You're welcome! If you need any more shifts created or have any other questions, feel free to ask.\"\n },\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 1743,\n \"completion_tokens\": 29,\n \"total_tokens\": 1772\n }\n}" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 1906, "completion_tokens": 172, "total_tokens": 2078 } } ``` ### Relevant log output ```shell ``` ### OS Windows, macOS ### GPU Apple ### CPU Apple ### Ollama version 0.11.6
GiteaMirror added the bug label 2026-04-22 16:46:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#33776