[GH-ISSUE #20286] issue: Responses are duplicated for thinking models when streaming is enabled. #57807

Closed
opened 2026-05-05 21:39:48 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @JadenJSJ on GitHub (Dec 31, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20286

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.43 (latest)

Ollama Version (if applicable)

No response

Operating System

24.04.1-Ubuntu

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Chat responses not duplicated for thinking models when streaming is enabled

Actual Behavior

Chat responses duplicated for thinking models when streaming is enabled

Steps to Reproduce

  1. Set up gcli2api with Docker Compose
  2. Setup open-webui with Docker Compose
  3. Use openapi endpoint pointed to gcli2api http://arm.local:7861/antigravity/v1
  4. Make sure to use a thinking model
  5. Make sure streaming is enabled.

Logs & Screenshots

Browser console logs: checked it, not relevant

Screenshots

Image Image

Response from https://arm.local/api/v1/chats/7746fab5-3acf-4f76-b21f-cc3ee7e5f010
Request Method: POST

{
    "id": "7746fab5-3acf-4f76-b21f-cc3ee7e5f010",
    "user_id": "7ff6d817-d271-4ad0-91f3-ab38cdf8c632",
    "title": "Perception of Silence 🤔",
    "chat": {
        "id": "",
        "title": "Perception of Silence 🤔",
        "models": [
            "gemini-2.5-flash-thinking"
        ],
        "params": {},
        "history": {
            "messages": {
                "0b463136-033b-4fbe-81c8-1c58d1f4dc30": {
                    "id": "0b463136-033b-4fbe-81c8-1c58d1f4dc30",
                    "parentId": null,
                    "childrenIds": [
                        "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7"
                    ],
                    "role": "user",
                    "content": "pls say something one paragraph long but use thinking, its to test smthn",
                    "timestamp": 1767143210,
                    "models": [
                        "gemini-2.5-flash-thinking"
                    ]
                },
                "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7": {
                    "parentId": "0b463136-033b-4fbe-81c8-1c58d1f4dc30",
                    "id": "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7",
                    "childrenIds": [],
                    "role": "assistant",
                    "content": "<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating\n<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating how our brains constantly filter and prioritize sensory input, constructing a coherent reality from a chaotic symphony of data, and how a simple shift in focus can completely reframe what constitutes \"quiet\" or \"loud\" at any given moment, revealing the deeply subjective nature of our lived experience.\n<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating how our brains constantly filter and prioritize sensory input, constructing a coherent reality from a chaotic symphony of data, and how a simple shift in focus can completely reframe what constitutes \"quiet\" or \"loud\" at any given moment, revealing the deeply subjective nature of our lived experience.",
                    "model": "gemini-2.5-flash-thinking",
                    "modelName": "gemini-2.5-flash-thinking",
                    "modelIdx": 0,
                    "timestamp": 1767143210,
                    "lastSentence": "The quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information.",
                    "usage": {
                        "prompt_tokens": 16,
                        "completion_tokens": 121,
                        "total_tokens": 721
                    },
                    "done": true,
                    "followUps": [
                        "What exactly were you testing when you asked me to 'use thinking'?",
                        "Can you give another example of how our perception of something is relative rather than absolute?",
                        "How does an AI like you 'ponder' or find things 'fascinating'?",
                        "Are there ways we can consciously improve our brain's filtering of sensory input?"
                    ]
                }
            },
            "currentId": "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7"
        },
        "messages": [
            {
                "id": "0b463136-033b-4fbe-81c8-1c58d1f4dc30",
                "parentId": null,
                "childrenIds": [
                    "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7"
                ],
                "role": "user",
                "content": "pls say something one paragraph long but use thinking, its to test smthn",
                "timestamp": 1767143210,
                "models": [
                    "gemini-2.5-flash-thinking"
                ]
            },
            {
                "parentId": "0b463136-033b-4fbe-81c8-1c58d1f4dc30",
                "id": "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7",
                "childrenIds": [],
                "role": "assistant",
                "content": "<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating\n<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating how our brains constantly filter and prioritize sensory input, constructing a coherent reality from a chaotic symphony of data, and how a simple shift in focus can completely reframe what constitutes \"quiet\" or \"loud\" at any given moment, revealing the deeply subjective nature of our lived experience.\n<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating how our brains constantly filter and prioritize sensory input, constructing a coherent reality from a chaotic symphony of data, and how a simple shift in focus can completely reframe what constitutes \"quiet\" or \"loud\" at any given moment, revealing the deeply subjective nature of our lived experience.",
                "model": "gemini-2.5-flash-thinking",
                "modelName": "gemini-2.5-flash-thinking",
                "modelIdx": 0,
                "timestamp": 1767143210,
                "lastSentence": "The quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information.",
                "usage": {
                    "prompt_tokens": 16,
                    "completion_tokens": 121,
                    "total_tokens": 721
                },
                "done": true
            }
        ],
        "tags": [],
        "timestamp": 1767143210400,
        "files": []
    },
    "updated_at": 1767143229,
    "created_at": 1767143210,
    "share_id": null,
    "archived": false,
    "pinned": false,
    "meta": {
        "tags": [
            "psychology",
            "philosophy",
            "perception"
        ]
    },
    "folder_id": null
}

Note that responses from the api seem to be normal

    ~  curl -X POST "http://arm.local:7861/antigravity/v1/chat/completions" \                                                                                         ✔  system  
  -H "Authorization: Bearer pwd" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3-flash",
    "messages": [
      {
        "role": "user",
        "content": "Why is the sky blue? Use thinking"                                                                                                                                     
      }
    ],
    "stream": true
  }'
data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": "To understand why the sky is blue, we need to break the problem down into three parts: **The nature of light**, **the Earth\u2019s atmosphere**, and **how"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " our eyes perceive color**.\n\nHere is the step-by-step thinking process behind the phenomenon:\n\n### 1. Sunlight"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " is a Spectrum\nFirst, we must recognize that while sunlight looks white, it is actually made up of all the colors of the rainbow"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " (red, orange, yellow, green, blue, indigo, and violet). \n*   Light travels as **waves**.\n"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": "*   Each color has a different wavelength. Red light has long, lazy waves; blue and violet light have much shorter, cho"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": "ppier waves.\n\n### 2. The Atmosphere is an Obstacle Course\nThe Earth is surrounded by an atmosphere"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " filled with gas molecules (mostly nitrogen and oxygen). When sunlight enters the atmosphere, it strikes these molecules. \n*"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": "   Because gas molecules are very small, they affect different wavelengths of light differently.\n*   The longer waves (reds"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " and yellows) pass through the atmosphere relatively undisturbed. They travel in a mostly straight line from the sun to your eyes.\n\n###"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " 3. Rayleigh Scattering\nThis is the core scientific principle. When light hits gas molecules, it is redirected in different"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " directions. This is called **scattering**.\n*   **The Rule:** Shorter wavelengths scatter much more efficiently than longer"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " wavelengths.\n*   Because blue light travels in shorter, smaller waves, it strikes the molecules and gets scattered in every possible direction."}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " \n*   When you look up at any part of the sky away from the sun, you are seeing this \""}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": "scattered\" blue light coming at you from every angle.\n\n### 4. Why isn't the sky violet?\nIf"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " shorter wavelengths scatter most, and violet light is even shorter than blue light, you might wonder why the sky isn't purple"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": ". There are two reasons:\n*   **The Sun\u2019s Output:** The Sun emits significantly more blue light than violet"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " light.\n*   **Human Biology:** The human eye is much more sensitive to blue than it is to violet. Our eyes"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " interpret the mix of scattered violet and blue light simply as pale blue.\n\n### 5. What about sunsets?\nThinking"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " about sunsets helps prove the \"scattering\" theory. \n*   When the sun is low on the horizon, the light has to"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " travel through much more of the Earth's atmosphere to reach your eyes.\n*   By the time the light gets"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " to you, the blue light has been scattered away completely. \n*   Only the long-wavelength reds and oranges"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " survive the long trip through the thick air, which is why the sun and the horizon look red.\n\n### Summary\nThe sky"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " is blue because the atmosphere acts like a filter that catches the **short, blue waves** of sunlight and bounces them around"}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " the sky, while letting the **long, red waves** pass straight through."}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": ""}, "finish_reason": null}]}

data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 9, "completion_tokens": 608, "total_tokens": 1033}}

data: [DONE]

Additional Information

Docker Compose straight from the site

services:
    open-webui:
        image: ghcr.io/open-webui/open-webui:main
        container_name: open-webui
        ports:
            - "10000:8080"
        volumes:
            - ./data:/app/backend/data
        # environment:
        #     - "QDRANT_API_KEY=API_KEY_HERE"
        #     - "QDRANT_URI=https://example.com"
        restart: unless-stopped
Image

Is there something that I have set up wrongly?
If there are any other logs or additional information required please feel free to ask! :D

Originally created by @JadenJSJ on GitHub (Dec 31, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20286 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.43 (latest) ### Ollama Version (if applicable) _No response_ ### Operating System 24.04.1-Ubuntu ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Chat responses not duplicated for thinking models when streaming is enabled ### Actual Behavior Chat responses duplicated for thinking models when streaming is enabled ### Steps to Reproduce 1. Set up [gcli2api](https://github.com/su-kaka/gcli2api/) with Docker Compose 2. Setup open-webui with Docker Compose 3. Use openapi endpoint pointed to gcli2api http://arm.local:7861/antigravity/v1 4. Make sure to use a thinking model 5. Make sure streaming is enabled. ### Logs & Screenshots Browser console logs: checked it, not relevant Screenshots <img width="1920" height="1200" alt="Image" src="https://github.com/user-attachments/assets/977cade5-4046-4efa-baf8-38add8f7462f" /> <img width="1510" height="870" alt="Image" src="https://github.com/user-attachments/assets/0e4f6e60-6460-4c7c-b0df-c8ec23c4546e" /> Response from https://arm.local/api/v1/chats/7746fab5-3acf-4f76-b21f-cc3ee7e5f010 Request Method: POST ``` { "id": "7746fab5-3acf-4f76-b21f-cc3ee7e5f010", "user_id": "7ff6d817-d271-4ad0-91f3-ab38cdf8c632", "title": "Perception of Silence 🤔", "chat": { "id": "", "title": "Perception of Silence 🤔", "models": [ "gemini-2.5-flash-thinking" ], "params": {}, "history": { "messages": { "0b463136-033b-4fbe-81c8-1c58d1f4dc30": { "id": "0b463136-033b-4fbe-81c8-1c58d1f4dc30", "parentId": null, "childrenIds": [ "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7" ], "role": "user", "content": "pls say something one paragraph long but use thinking, its to test smthn", "timestamp": 1767143210, "models": [ "gemini-2.5-flash-thinking" ] }, "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7": { "parentId": "0b463136-033b-4fbe-81c8-1c58d1f4dc30", "id": "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7", "childrenIds": [], "role": "assistant", "content": "<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating\n<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating how our brains constantly filter and prioritize sensory input, constructing a coherent reality from a chaotic symphony of data, and how a simple shift in focus can completely reframe what constitutes \"quiet\" or \"loud\" at any given moment, revealing the deeply subjective nature of our lived experience.\n<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating how our brains constantly filter and prioritize sensory input, constructing a coherent reality from a chaotic symphony of data, and how a simple shift in focus can completely reframe what constitutes \"quiet\" or \"loud\" at any given moment, revealing the deeply subjective nature of our lived experience.", "model": "gemini-2.5-flash-thinking", "modelName": "gemini-2.5-flash-thinking", "modelIdx": 0, "timestamp": 1767143210, "lastSentence": "The quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information.", "usage": { "prompt_tokens": 16, "completion_tokens": 121, "total_tokens": 721 }, "done": true, "followUps": [ "What exactly were you testing when you asked me to 'use thinking'?", "Can you give another example of how our perception of something is relative rather than absolute?", "How does an AI like you 'ponder' or find things 'fascinating'?", "Are there ways we can consciously improve our brain's filtering of sensory input?" ] } }, "currentId": "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7" }, "messages": [ { "id": "0b463136-033b-4fbe-81c8-1c58d1f4dc30", "parentId": null, "childrenIds": [ "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7" ], "role": "user", "content": "pls say something one paragraph long but use thinking, its to test smthn", "timestamp": 1767143210, "models": [ "gemini-2.5-flash-thinking" ] }, { "parentId": "0b463136-033b-4fbe-81c8-1c58d1f4dc30", "id": "c1b60a9e-c167-4f33-b9b5-761a2e6f27f7", "childrenIds": [], "role": "assistant", "content": "<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating\n<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating how our brains constantly filter and prioritize sensory input, constructing a coherent reality from a chaotic symphony of data, and how a simple shift in focus can completely reframe what constitutes \"quiet\" or \"loud\" at any given moment, revealing the deeply subjective nature of our lived experience.\n<details type=\"reasoning\" done=\"true\" duration=\"0\">\n<summary>Thought for 0 seconds</summary>\n&gt; **Contemplating Abstraction**\n&gt; \n&gt; I&#x27;m grappling with the user&#x27;s request, specifically the nebulous nature of &quot;thinking&quot; within the text. It seems the core is simulating internal processing. I&#x27;m considering using an abstract prompt to then focus on the internal response to that prompt, allowing the &quot;thinking&quot; to organically emerge through the response. I&#x27;m exploring how to construct a suitable prompt that sets the stage.\n&gt; \n&gt; \n&gt; **Structuring the Paragraph**\n&gt; \n&gt; I&#x27;m now building the paragraph around the concept of &quot;quiet,&quot; using my prior points. I&#x27;m focusing on the contrast between an initial perception of silence and the subsequent awareness of subtle sounds, to demonstrate the internal processing, and the changing definition of &quot;quiet.&quot; I&#x27;m aiming for smooth transitions between sentences to simulate a natural flow of thought.\n&gt; \n&gt; \n&gt; **Crafting the Observation**\n&gt; \n&gt; I&#x27;m presently building the paragraph, starting with the quiet room observation. To begin, I&#x27;ll establish a simple setting to then introduce a thought that questions the initial perception. I&#x27;ve chosen the example of &quot;sudden silence&quot; to kick off the internal analysis. The aim is to make the reader quickly engage with the idea of what &quot;quiet&quot; implies, and thus what &quot;thinking&quot; may look like.\n</details>\nThe quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information. It's fascinating how our brains constantly filter and prioritize sensory input, constructing a coherent reality from a chaotic symphony of data, and how a simple shift in focus can completely reframe what constitutes \"quiet\" or \"loud\" at any given moment, revealing the deeply subjective nature of our lived experience.", "model": "gemini-2.5-flash-thinking", "modelName": "gemini-2.5-flash-thinking", "modelIdx": 0, "timestamp": 1767143210, "lastSentence": "The quiet hum of the air conditioner, a barely perceptible sound just moments ago, suddenly gained prominence in my awareness as the street noise outside receded, making me ponder how our perception of \"silence\" is rarely an absolute absence of sound, but rather a dynamic interplay of foreground and background auditory information.", "usage": { "prompt_tokens": 16, "completion_tokens": 121, "total_tokens": 721 }, "done": true } ], "tags": [], "timestamp": 1767143210400, "files": [] }, "updated_at": 1767143229, "created_at": 1767143210, "share_id": null, "archived": false, "pinned": false, "meta": { "tags": [ "psychology", "philosophy", "perception" ] }, "folder_id": null } ``` Note that responses from the api seem to be normal ```    ~  curl -X POST "http://arm.local:7861/antigravity/v1/chat/completions" \  ✔  system  -H "Authorization: Bearer pwd" \ -H "Content-Type: application/json" \ -d '{ "model": "gemini-3-flash", "messages": [ { "role": "user", "content": "Why is the sky blue? Use thinking" } ], "stream": true }' data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": "To understand why the sky is blue, we need to break the problem down into three parts: **The nature of light**, **the Earth\u2019s atmosphere**, and **how"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " our eyes perceive color**.\n\nHere is the step-by-step thinking process behind the phenomenon:\n\n### 1. Sunlight"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " is a Spectrum\nFirst, we must recognize that while sunlight looks white, it is actually made up of all the colors of the rainbow"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " (red, orange, yellow, green, blue, indigo, and violet). \n* Light travels as **waves**.\n"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": "* Each color has a different wavelength. Red light has long, lazy waves; blue and violet light have much shorter, cho"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": "ppier waves.\n\n### 2. The Atmosphere is an Obstacle Course\nThe Earth is surrounded by an atmosphere"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " filled with gas molecules (mostly nitrogen and oxygen). When sunlight enters the atmosphere, it strikes these molecules. \n*"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " Because gas molecules are very small, they affect different wavelengths of light differently.\n* The longer waves (reds"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " and yellows) pass through the atmosphere relatively undisturbed. They travel in a mostly straight line from the sun to your eyes.\n\n###"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " 3. Rayleigh Scattering\nThis is the core scientific principle. When light hits gas molecules, it is redirected in different"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " directions. This is called **scattering**.\n* **The Rule:** Shorter wavelengths scatter much more efficiently than longer"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " wavelengths.\n* Because blue light travels in shorter, smaller waves, it strikes the molecules and gets scattered in every possible direction."}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " \n* When you look up at any part of the sky away from the sun, you are seeing this \""}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": "scattered\" blue light coming at you from every angle.\n\n### 4. Why isn't the sky violet?\nIf"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " shorter wavelengths scatter most, and violet light is even shorter than blue light, you might wonder why the sky isn't purple"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": ". There are two reasons:\n* **The Sun\u2019s Output:** The Sun emits significantly more blue light than violet"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " light.\n* **Human Biology:** The human eye is much more sensitive to blue than it is to violet. Our eyes"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " interpret the mix of scattered violet and blue light simply as pale blue.\n\n### 5. What about sunsets?\nThinking"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " about sunsets helps prove the \"scattering\" theory. \n* When the sun is low on the horizon, the light has to"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " travel through much more of the Earth's atmosphere to reach your eyes.\n* By the time the light gets"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " to you, the blue light has been scattered away completely. \n* Only the long-wavelength reds and oranges"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " survive the long trip through the thick air, which is why the sun and the horizon look red.\n\n### Summary\nThe sky"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " is blue because the atmosphere acts like a filter that catches the **short, blue waves** of sunlight and bounces them around"}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": " the sky, while letting the **long, red waves** pass straight through."}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {"content": ""}, "finish_reason": null}]} data: {"id": "chatcmpl-1767143720531", "object": "chat.completion.chunk", "created": 1767143724, "model": "gemini-3-flash", "choices": [{"index": 0, "delta": {}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 9, "completion_tokens": 608, "total_tokens": 1033}} data: [DONE] ``` ### Additional Information Docker Compose straight from the site ``` services: open-webui: image: ghcr.io/open-webui/open-webui:main container_name: open-webui ports: - "10000:8080" volumes: - ./data:/app/backend/data # environment: # - "QDRANT_API_KEY=API_KEY_HERE" # - "QDRANT_URI=https://example.com" restart: unless-stopped ``` <img width="681" height="743" alt="Image" src="https://github.com/user-attachments/assets/d50c8dd6-c38f-42b3-9733-6e6be2d837f5" /> Is there something that I have set up wrongly? \ If there are any other logs or additional information required please feel free to ask! :D
GiteaMirror added the bug label 2026-05-05 21:39:49 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (Dec 31, 2025):

🔍 Similar Issues Found

I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:

  1. #20231 issue: Non-streaming responses with thinking enabled are not parsed correctly (thinking content merged into final answer)
    by hamid370 • Dec 29, 2025 • bug

  2. #19738 issue: Thinking models render responses inside thinking UI when using native tools
    by qq3829596922 • Dec 04, 2025 • bug

  3. #19925 issue: Model responses stop after web searches
    by tm-coder-484 • Dec 13, 2025 • bug

  4. #20019 issue:
    by j63440490 • Dec 17, 2025 • bug

  5. #19777 issue:
    by Yaute7 • Dec 05, 2025 • bug

Show 5 more related issues
  1. #20092 issue:
    by VideoRyan • Dec 22, 2025 • bug

  2. #20059 issue: Chat response is not working
    by navilg • Dec 20, 2025 • bug

  3. #19103 issue: no response from the model when ask in "channels"
    by silenceroom • Nov 11, 2025 • bug

  4. #19154 issue: model streaming parameter set to True, even though the setting is set to False
    by DirkRemmers • Nov 13, 2025 • bug

  5. #16788 issue: Rendering bug when the response from the model contains <think>
    by alanxmay • Aug 21, 2025 • bug


💡 Tips:

  • If this is a duplicate, please consider closing this issue and adding any additional details to the existing one
  • If you found a solution in any of these issues, please share it here to help others

This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.

<!-- gh-comment-id:3701033621 --> @owui-terminator[bot] commented on GitHub (Dec 31, 2025): 🔍 **Similar Issues Found** I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions: 1. [#20231](https://github.com/open-webui/open-webui/issues/20231) **issue: Non-streaming responses with thinking enabled are not parsed correctly (thinking content merged into final answer)** *by hamid370 • Dec 29, 2025 • `bug`* 2. [#19738](https://github.com/open-webui/open-webui/issues/19738) **issue: Thinking models render responses inside thinking UI when using native tools** *by qq3829596922 • Dec 04, 2025 • `bug`* 3. [#19925](https://github.com/open-webui/open-webui/issues/19925) **issue: Model responses stop after web searches** *by tm-coder-484 • Dec 13, 2025 • `bug`* 4. [#20019](https://github.com/open-webui/open-webui/issues/20019) **issue:** *by j63440490 • Dec 17, 2025 • `bug`* 5. [#19777](https://github.com/open-webui/open-webui/issues/19777) **issue:** *by Yaute7 • Dec 05, 2025 • `bug`* <details> <summary>Show 5 more related issues</summary> 6. [#20092](https://github.com/open-webui/open-webui/issues/20092) **issue:** *by VideoRyan • Dec 22, 2025 • `bug`* 7. [#20059](https://github.com/open-webui/open-webui/issues/20059) **issue: Chat response is not working** *by navilg • Dec 20, 2025 • `bug`* 8. [#19103](https://github.com/open-webui/open-webui/issues/19103) **issue: no response from the model when ask in "channels"** *by silenceroom • Nov 11, 2025 • `bug`* 9. [#19154](https://github.com/open-webui/open-webui/issues/19154) **issue: model streaming parameter set to True, even though the setting is set to False** *by DirkRemmers • Nov 13, 2025 • `bug`* 10. [#16788](https://github.com/open-webui/open-webui/issues/16788) **issue: Rendering bug when the response from the model contains `<think>`** *by alanxmay • Aug 21, 2025 • `bug`* </details> --- 💡 **Tips:** - If this is a duplicate, please consider closing this issue and adding any additional details to the existing one - If you found a solution in any of these issues, please share it here to help others *This comment was generated automatically by a bot.* Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
Author
Owner

@rgaricano commented on GitHub (Dec 31, 2025):

The issue is in the streaming response handler in backend/open_webui/utils/middleware.py. When processing thinking models that include reasoning_content, the current implementation doesn't properly separate the reasoning blocks from the streaming content chunks.
The code processes each delta chunk and emits it via event_emitter().
For thinking models, both the reasoning content and regular content are being included in each emitted chunk, causing the duplication.

Fix, for reference:
(This fix prevents reasoning blocks from being duplicated by tracking whether they've already been emitted and only including them in the first chunk.)
Changes:

# Add this flag at the beginning of stream_body_handler()
async def stream_body_handler(response, form_data):
    nonlocal content
    nonlocal content_blocks

    # Track if reasoning has been emitted
    reasoning_emitted = False

    response_tool_calls = []
    # ... rest of existing code ...

# Then modify the reasoning content handling section (around lines 2631-2661):
reasoning_content = (
    delta.get("reasoning_content")
    or delta.get("reasoning")
    or delta.get("thinking")
)
if reasoning_content:
    if (
        not content_blocks
        or content_blocks[-1]["type"] != "reasoning"
    ):
        reasoning_block = {
            "type": "reasoning",
            "start_tag": "<details>",
            "end_tag": "</details>",
            "attributes": {
                "type": "reasoning_content"
            },
            "content": "",
            "started_at": time.time(),
        }
        content_blocks.append(reasoning_block)
    else:
        reasoning_block = content_blocks[-1]

    reasoning_block["content"] += reasoning_content

    # Only emit reasoning if it hasn't been emitted yet
    if not reasoning_emitted:
        data = {
            "content": serialize_content_blocks(
                content_blocks
            )
        }
        reasoning_emitted = True
    else:
        # Don't emit data for reasoning-only deltas after first emission
        data = None

if value:
    # ... existing value handling code ...

    # Only emit if we have new content or haven't emitted reasoning yet
    if data is None or not reasoning_emitted:
        data = {
            "content": serialize_content_blocks(
                content_blocks
            )
        }

# Update the emission logic at the end of the delta processing:
if delta:
    delta_count += 1
    if data:  # Only emit if we have data to send
        last_delta_data = data
        if delta_count >= delta_chunk_size:
            await flush_pending_delta_data(delta_chunk_size)
else:
    if data:  # Only emit if we have data to send
        await event_emitter(
            {
                "type": "chat:completion",
                "data": data,
            }
        )

in c2c389f722/backend/open_webui/utils/middleware.py (L2497-L2869)

<!-- gh-comment-id:3701159429 --> @rgaricano commented on GitHub (Dec 31, 2025): The issue is in the streaming response handler in backend/open_webui/utils/middleware.py. When processing thinking models that include reasoning_content, the current implementation doesn't properly separate the reasoning blocks from the streaming content chunks. The code processes each delta chunk and emits it via event_emitter(). For thinking models, both the reasoning content and regular content are being included in each emitted chunk, causing the duplication. Fix, for reference: (This fix prevents reasoning blocks from being duplicated by tracking whether they've already been emitted and only including them in the first chunk.) Changes: ``` # Add this flag at the beginning of stream_body_handler() async def stream_body_handler(response, form_data): nonlocal content nonlocal content_blocks # Track if reasoning has been emitted reasoning_emitted = False response_tool_calls = [] # ... rest of existing code ... # Then modify the reasoning content handling section (around lines 2631-2661): reasoning_content = ( delta.get("reasoning_content") or delta.get("reasoning") or delta.get("thinking") ) if reasoning_content: if ( not content_blocks or content_blocks[-1]["type"] != "reasoning" ): reasoning_block = { "type": "reasoning", "start_tag": "<details>", "end_tag": "</details>", "attributes": { "type": "reasoning_content" }, "content": "", "started_at": time.time(), } content_blocks.append(reasoning_block) else: reasoning_block = content_blocks[-1] reasoning_block["content"] += reasoning_content # Only emit reasoning if it hasn't been emitted yet if not reasoning_emitted: data = { "content": serialize_content_blocks( content_blocks ) } reasoning_emitted = True else: # Don't emit data for reasoning-only deltas after first emission data = None if value: # ... existing value handling code ... # Only emit if we have new content or haven't emitted reasoning yet if data is None or not reasoning_emitted: data = { "content": serialize_content_blocks( content_blocks ) } # Update the emission logic at the end of the delta processing: if delta: delta_count += 1 if data: # Only emit if we have data to send last_delta_data = data if delta_count >= delta_chunk_size: await flush_pending_delta_data(delta_chunk_size) else: if data: # Only emit if we have data to send await event_emitter( { "type": "chat:completion", "data": data, } ) ``` in https://github.com/open-webui/open-webui/blob/c2c389f72268033cc793810eadfca851af5a6abf/backend/open_webui/utils/middleware.py#L2497-L2869
Author
Owner

@tjbck commented on GitHub (Dec 31, 2025):

We never had any issues rendering reasoning content with other inference providers, this seem like its likely to be a gcli2api issue.

<!-- gh-comment-id:3701614785 --> @tjbck commented on GitHub (Dec 31, 2025): We never had any issues rendering reasoning content with other inference providers, this seem like its likely to be a gcli2api issue.
Author
Owner

@Salamastik commented on GitHub (Dec 31, 2025):

+1 for this issue. I'm experiencing the same behavior.

<!-- gh-comment-id:3701878798 --> @Salamastik commented on GitHub (Dec 31, 2025): +1 for this issue. I'm experiencing the same behavior.
Author
Owner

@Classic298 commented on GitHub (Dec 31, 2025):

Yeah i have also never seen this before. This is likely an issue of your gcli application

<!-- gh-comment-id:3701881038 --> @Classic298 commented on GitHub (Dec 31, 2025): Yeah i have also never seen this before. This is likely an issue of your gcli application
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#57807