[GH-ISSUE #23173] issue: After native tool calls, streaming reasoning_content is truncated to the first token in the UI #58572

Closed
opened 2026-05-05 23:27:21 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @ianustec on GitHub (Mar 28, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23173

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.8.10

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.04

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

All streamed reasoning_content after tool execution should stay in the reasoning UI block (or be consistently merged with the same rules as the first reasoning segment), matching what the API stream actually sends.

Actual Behavior

  • Internal / debug view shows a reasoning block with only the first fragment (e.g. text Okay, very short duration).

  • The remainder of the same reasoning stream is attached to a separate assistant message content block, so the UI reads like: short “Thought…” + Okay, then , let me process… as normal text.

Steps to Reproduce

Steps to reproduce

  1. Run Open WebUI with function calling set to native (e.g. request params / model advanced params: 'function_calling': 'native' — same as in server logs).
  2. Connect an OpenAI-compatible endpoint that streams delta.reasoning_content for a reasoning / thinking model.
  3. Start a new chat and send a prompt that forces multiple native tool rounds in one assistant turn, e.g.: “Search the web for X and Y, then use the code tool for a small calculation, then answer briefly.”
  4. Ensure web search and code interpreter (or any two native tools) are enabled so the model does think → tool(s) → think → answer in a single turn.
  5. Let the run finish. In the UI, open the second “thought” / reasoning block after tool results.
  6. Observe: the second reasoning collapsible shows only the first token (e.g. Okay) and/or “Thought for less than a second”; the rest of the chain-of-thought appears as normal message text (often starting with , let me…).
  7. Optional check: enable DEBUG logs and inspect the assistant message / output pipeline: a reasoning block with ~1 token and an empty message slice, then a second message whose content contains text that should still be reasoning_content from the stream.
  8. Note: reproducible with several different models that expose streamed reasoning_content; backend was verified with a minimal SSE client (only reasoning_content deltas, no spurious content), so the split matches client-side handling after tools.

Logs & Screenshots

Open WebUI server log (excerpt)

Raw single-line references (from generate_chat_completion / task_body)

Second reasoning block (truncated):
{'type': 'reasoning', 'content': [{'type': 'output_text', 'text': 'Okay'}], 'duration': 0, ...}

Next message block (spillover):
{'type': 'message', 'role': 'assistant', 'content': [{'type': 'output_text', 'text': ", let me process the user's query. ..."}]}

Image

Additional Information

  • Screenshot (attached): UI showing truncated second thought vs. spillover into main content.
  • Raw SSE from the upstream proxy shows many consecutive deltas with only reasoning_content and no content key after tools—so the split appears to be on the Open WebUI client side when reconciling streaming deltas in the native tool-call loop, not missing data from the server.
  • First reasoning segment in the same request often has correct length and timing; the issue is specifically after one or more native tool rounds.
  • Tested with multiple models; behavior is consistent (truncated post-tool reasoning in UI).
Originally created by @ianustec on GitHub (Mar 28, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23173 ### 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.8.10 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.04 ### 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 All streamed reasoning_content after tool execution should stay in the reasoning UI block (or be consistently merged with the same rules as the first reasoning segment), matching what the API stream actually sends. ### Actual Behavior - Internal / debug view shows a reasoning block with only the first fragment (e.g. text Okay, very short duration). - The remainder of the same reasoning stream is attached to a separate assistant message content block, so the UI reads like: short “Thought…” + Okay, then , let me process… as normal text. ### Steps to Reproduce Steps to reproduce 1. Run Open WebUI with function calling set to native (e.g. request params / model advanced params: 'function_calling': 'native' — same as in server logs). 2. Connect an OpenAI-compatible endpoint that streams delta.reasoning_content for a reasoning / thinking model. 3. Start a new chat and send a prompt that forces multiple native tool rounds in one assistant turn, e.g.: “Search the web for X and Y, then use the code tool for a small calculation, then answer briefly.” 4. Ensure web search and code interpreter (or any two native tools) are enabled so the model does think → tool(s) → think → answer in a single turn. 5. Let the run finish. In the UI, open the second “thought” / reasoning block after tool results. 6. Observe: the second reasoning collapsible shows only the first token (e.g. Okay) and/or “Thought for less than a second”; the rest of the chain-of-thought appears as normal message text (often starting with , let me…). 7. Optional check: enable DEBUG logs and inspect the assistant message / output pipeline: a reasoning block with ~1 token and an empty message slice, then a second message whose content contains text that should still be reasoning_content from the stream. 8. Note: reproducible with several different models that expose streamed reasoning_content; backend was verified with a minimal SSE client (only reasoning_content deltas, no spurious content), so the split matches client-side handling after tools. ### Logs & Screenshots Open WebUI server log (excerpt) Raw single-line references (from generate_chat_completion / task_body) Second reasoning block (truncated): `{'type': 'reasoning', 'content': [{'type': 'output_text', 'text': 'Okay'}], 'duration': 0, ...}` Next message block (spillover): `{'type': 'message', 'role': 'assistant', 'content': [{'type': 'output_text', 'text': ", let me process the user's query. ..."}]}` <img width="1783" height="1051" alt="Image" src="https://github.com/user-attachments/assets/313c04db-0f62-4e78-a29e-778916dba662" /> ### Additional Information - Screenshot (attached): UI showing truncated second thought vs. spillover into main content. - Raw SSE from the upstream proxy shows many consecutive deltas with only reasoning_content and no content key after tools—so the split appears to be on the Open WebUI client side when reconciling streaming deltas in the native tool-call loop, not missing data from the server. - First reasoning segment in the same request often has correct length and timing; the issue is specifically after one or more native tool rounds. - Tested with multiple models; behavior is consistent (truncated post-tool reasoning in UI).
GiteaMirror added the bug label 2026-05-05 23:27:21 -05:00
Author
Owner

@Classic298 commented on GitHub (Apr 3, 2026):

cannot reproduce this - i tried on 0.8.11 and 0.8.12. With the steps provided i cant reproduce any behaviour like this. Can you reproduce it on newer versions? are there any other details which are needed to reproduce?

Keep us updated!

<!-- gh-comment-id:4183655895 --> @Classic298 commented on GitHub (Apr 3, 2026): cannot reproduce this - i tried on 0.8.11 and 0.8.12. With the steps provided i cant reproduce any behaviour like this. Can you reproduce it on newer versions? are there any other details which are needed to reproduce? Keep us updated!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58572