[GH-ISSUE #20019] issue: #34593

Closed
opened 2026-04-25 08:38:48 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @j63440490 on GitHub (Dec 17, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20019

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

0.6.41

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

The response should render a mermaid diagram.

Actual Behavior

The response says
"Failed to render diagram: Parse error on line 4:
...Array Sorted
0s | 1s | 2s])
-----------------------^
Expecting 'STADIUMEND', 'TAGEND', 'UNICODE_TEXT', 'TEXT', 'TAGSTART', got 'PIPE'

Steps to Reproduce

  1. Launch OpenWebUI workspace.
  2. Send request: "Create a mermaid diagram that shows the Dutch National Flag algorithm."
  3. Look at response.

Logs & Screenshots

Image

logs:
[{'role': 'user', 'content': '### Task:\nGenerate 1-3 broad tags categorizing the main themes of the chat history, along with 1-3 more specific subtopic tags.\n\n### Guidelines:\n- Start with high-level domains (e.g. Science, Technology, Philosophy, Arts, Politics, Business, Health, Sports, Entertainment, Education)\n- Consider including relevant subfields/subdomains if they are strongly represented throughout the conversation\n- If content is too short (less than 3 messages) or too diverse, use only ["General"]\n- Use the chat's primary language; default to English if multilingual\n- Prioritize accuracy over specificity\n\n### Output:\nJSON format: { "tags": ["tag1", "tag2", "tag3"] }\n\n### Chat History:\n<chat_history>\nUSER: create a mermaid diagram that shows the Dutch National Flag algorithm.\nASSISTANT: mermaid\nflowchart TD\n Start([Start: Unsorted Array]) --> Init[Initialize three pointers:<br/>low = 0, mid = 0, high = n-1]\n Init --> Check{mid <= high?}\n \n Check -->|No| End([End: Array Sorted<br/>0s | 1s | 2s])\n \n Check -->|Yes| Examine{Examine<br/>arr[mid]}\n \n Examine -->|0| Case0[Swap arr[low] with arr[mid]<br/>low++<br/>mid++]\n Examine -->|1| Case1[mid++]\n Examine -->|2| Case2[Swap arr[mid] with arr[high]<br/>high--]\n \n Case0 --> Check\n Case1 --> Check\n Case2 --> Check\n \n style Start fill:#e1f5ff\n style End fill:#d4edda\n style Examine fill:#fff3cd\n style Case0 fill:#f8d7da\n style Case1 fill:#d1ecf1\n style Case2 fill:#f8d7da\n\n\nThis diagram illustrates the Dutch National Flag algorithm (created by Edsger Dijkstra) which sorts an array containing three distinct values (typically 0, 1, and 2) in a single pass.\n\nKey concepts:\n- low pointer: marks the boundary of 0s (everything before low is 0)\n- mid pointer: current element being examined\n- high pointer: marks the boundary of 2s (everything after high is 2)\n\nThe algorithm partitions the array into three sections:\n1. [0...low-1] → all 0s\n2. [low...mid-1] → all 1s\n3. [mid...high] → unknown/unprocessed\n4. [high+1...n-1] → all 2s\n</chat_history>'}]

Additional Information

This was not occurring in 0.6.40. With the update to the underlying data model, we cannot revert back to previous versions.

I am using Claude. This occurs in multipe Claude models: Claude 4.5 Sonnet, Claude 4 Sonnet, Claude 3.7 Sonnet, and Claude 3.5 Sonnet v2

Originally created by @j63440490 on GitHub (Dec 17, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20019 ### 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 0.6.41 ### 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 The response should render a mermaid diagram. ### Actual Behavior The response says "Failed to render diagram: Parse error on line 4: ...Array Sorted<br/>0s | 1s | 2s]) -----------------------^ Expecting 'STADIUMEND', 'TAGEND', 'UNICODE_TEXT', 'TEXT', 'TAGSTART', got 'PIPE' ### Steps to Reproduce 1. Launch OpenWebUI workspace. 2. Send request: "Create a mermaid diagram that shows the Dutch National Flag algorithm." 3. Look at response. ### Logs & Screenshots <img width="1279" height="805" alt="Image" src="https://github.com/user-attachments/assets/e8548b1a-8e41-492a-ae27-305eba186c70" /> logs: [{'role': 'user', 'content': '### Task:\nGenerate 1-3 broad tags categorizing the main themes of the chat history, along with 1-3 more specific subtopic tags.\n\n### Guidelines:\n- Start with high-level domains (e.g. Science, Technology, Philosophy, Arts, Politics, Business, Health, Sports, Entertainment, Education)\n- Consider including relevant subfields/subdomains if they are strongly represented throughout the conversation\n- If content is too short (less than 3 messages) or too diverse, use only ["General"]\n- Use the chat\'s primary language; default to English if multilingual\n- Prioritize accuracy over specificity\n\n### Output:\nJSON format: { "tags": ["tag1", "tag2", "tag3"] }\n\n### Chat History:\n<chat_history>\nUSER: create a mermaid diagram that shows the Dutch National Flag algorithm.\nASSISTANT: ```mermaid\nflowchart TD\n Start([Start: Unsorted Array]) --> Init[Initialize three pointers:<br/>low = 0, mid = 0, high = n-1]\n Init --> Check{mid <= high?}\n \n Check -->|No| End([End: Array Sorted<br/>0s | 1s | 2s])\n \n Check -->|Yes| Examine{Examine<br/>arr[mid]}\n \n Examine -->|0| Case0[Swap arr[low] with arr[mid]<br/>low++<br/>mid++]\n Examine -->|1| Case1[mid++]\n Examine -->|2| Case2[Swap arr[mid] with arr[high]<br/>high--]\n \n Case0 --> Check\n Case1 --> Check\n Case2 --> Check\n \n style Start fill:#e1f5ff\n style End fill:#d4edda\n style Examine fill:#fff3cd\n style Case0 fill:#f8d7da\n style Case1 fill:#d1ecf1\n style Case2 fill:#f8d7da\n```\n\nThis diagram illustrates the **Dutch National Flag algorithm** (created by Edsger Dijkstra) which sorts an array containing three distinct values (typically 0, 1, and 2) in a single pass.\n\n**Key concepts:**\n- **low pointer**: marks the boundary of 0s (everything before low is 0)\n- **mid pointer**: current element being examined\n- **high pointer**: marks the boundary of 2s (everything after high is 2)\n\n**The algorithm partitions the array into three sections:**\n1. `[0...low-1]` → all 0s\n2. `[low...mid-1]` → all 1s\n3. `[mid...high]` → unknown/unprocessed\n4. `[high+1...n-1]` → all 2s\n</chat_history>'}] ### Additional Information This was not occurring in 0.6.40. With the update to the underlying data model, we cannot revert back to previous versions. I am using Claude. This occurs in multipe Claude models: Claude 4.5 Sonnet, Claude 4 Sonnet, Claude 3.7 Sonnet, and Claude 3.5 Sonnet v2
GiteaMirror added the bug label 2026-04-25 08:38:48 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (Dec 17, 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. #19777 issue:
    by Yaute7 • Dec 05, 2025 • bug

  2. #19864 issue:
    by Haervwe • Dec 10, 2025 • bug

  3. #19877 issue:
    by dotmobo • Dec 11, 2025 • bug

  4. #19861 issue:
    by QuitHub • Dec 10, 2025 • bug

  5. #19563 issue:
    by naruto7g • Nov 28, 2025 • bug

Show 5 more related issues
  1. #19211 issue:
    by Byrnes9 • Nov 16, 2025 • bug

  2. #16959 issue:
    by Te-eMster • Aug 27, 2025 • bug

  3. #15638 issue:
    by PaulX1029 • Jul 11, 2025 • bug

  4. #17391 issue:
    by abxis • Sep 12, 2025 • bug

  5. #17388 issue:
    by abxis • Sep 12, 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:3666997694 --> @owui-terminator[bot] commented on GitHub (Dec 17, 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. [#19777](https://github.com/open-webui/open-webui/issues/19777) **issue:** *by Yaute7 • Dec 05, 2025 • `bug`* 2. [#19864](https://github.com/open-webui/open-webui/issues/19864) **issue:** *by Haervwe • Dec 10, 2025 • `bug`* 3. [#19877](https://github.com/open-webui/open-webui/issues/19877) **issue:** *by dotmobo • Dec 11, 2025 • `bug`* 4. [#19861](https://github.com/open-webui/open-webui/issues/19861) **issue:** *by QuitHub • Dec 10, 2025 • `bug`* 5. [#19563](https://github.com/open-webui/open-webui/issues/19563) **issue:** *by naruto7g • Nov 28, 2025 • `bug`* <details> <summary>Show 5 more related issues</summary> 6. [#19211](https://github.com/open-webui/open-webui/issues/19211) **issue:** *by Byrnes9 • Nov 16, 2025 • `bug`* 7. [#16959](https://github.com/open-webui/open-webui/issues/16959) **issue:** *by Te-eMster • Aug 27, 2025 • `bug`* 8. [#15638](https://github.com/open-webui/open-webui/issues/15638) **issue:** *by PaulX1029 • Jul 11, 2025 • `bug`* 9. [#17391](https://github.com/open-webui/open-webui/issues/17391) **issue:** *by abxis • Sep 12, 2025 • `bug`* 10. [#17388](https://github.com/open-webui/open-webui/issues/17388) **issue:** *by abxis • Sep 12, 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

@pr-validator-bot commented on GitHub (Dec 17, 2025):

⚠️ Invalid Issue Title

Please provide a descriptive title for your issue. Titles that are empty, very short (under 10 characters), or generic (like "issue:") make it difficult for volunteer contributors to understand and triage issues.

Please update the title to reflect the content of your issue.

<!-- gh-comment-id:3667024464 --> @pr-validator-bot commented on GitHub (Dec 17, 2025): # ⚠️ Invalid Issue Title Please provide a descriptive title for your issue. Titles that are empty, very short (under 10 characters), or generic (like "issue:") make it difficult for volunteer contributors to understand and triage issues. Please update the title to reflect the content of your issue.
Author
Owner

@silentoplayz commented on GitHub (Dec 17, 2025):

Can you prove that the same chat was rendered differently in v0.6.41 compared to v0.6.40? I recommend cloning the chat on v0.6.40 so that you have a "backup" chat to test this with. Simply put, this looks like an error with the model failing to provide valid Mermaid Diagram code to be rendered.

<!-- gh-comment-id:3667433386 --> @silentoplayz commented on GitHub (Dec 17, 2025): Can you prove that the same chat was rendered differently in v0.6.41 compared to v0.6.40? I recommend cloning the chat on v0.6.40 so that you have a "backup" chat to test this with. Simply put, this looks like an error with the model failing to provide valid Mermaid Diagram code to be rendered.
Author
Owner

@rozatoo commented on GitHub (Dec 18, 2025):

I tested this on v0.6.41 and v0.6.40, in both versions the Models always fail to generate a mermaid from the prompt "Create a mermaid diagram that shows the Dutch National Flag algorithm". The error seems to always be unquoted node/decision text.

Outputted Mermaid:

flowchart TD
    A[Start] --> B[Initialize<br/>low = 0<br/>mid = 0<br/>high = n - 1]
    B --> C{mid <= high}
    C -- "No" --> Z[End\nArray is sorted]
    C -- "Yes" --> D{arr[mid]}
    D -- "0" --> E[Swap arr[low] & arr[mid]]
    E --> F[low++\nmid++]
    F --> C
    D -- "1" --> G[mid++]
    G --> C
    D -- "2" --> H[Swap arr[mid] & arr[high]]
    H --> I[high--]
    I --> C

Github mermaid render shows the same error:

flowchart TD
    A[Start] --> B[Initialize<br/>low = 0<br/>mid = 0<br/>high = n - 1]
    B --> C{mid <= high}
    C -- "No" --> Z[End\nArray is sorted]
    C -- "Yes" --> D{arr[mid]}
    D -- "0" --> E[Swap arr[low] & arr[mid]]
    E --> F[low++\nmid++]
    F --> C
    D -- "1" --> G[mid++]
    G --> C
    D -- "2" --> H[Swap arr[mid] & arr[high]]
    H --> I[high--]
    I --> C

Asking the model to "wrap all labels in quotes" gets it to consistently output a mermaid diagram without errors.
Fixed Mermaid:

flowchart TD
    A["Start"] --> B["Initialize<br/>low = 0<br/>mid = 0<br/>high = n - 1"]

    B --> C{"mid <= high"}

    C -- "No" --> Z["End<br/>Array is sorted"]
    C -- "Yes" --> D{"arr[mid]"}

    D -- "0" --> E["Swap arr[low] and arr[mid]"]
    E --> F["low++<br/>mid++"]
    F --> C

    D -- "1" --> G["mid++"]
    G --> C

    D -- "2" --> H["Swap arr[mid] and arr[high]"]
    H --> I["high--"]
    I --> C

Seems to be a issue on the models side, as silentoplayz said. :)

<!-- gh-comment-id:3668706678 --> @rozatoo commented on GitHub (Dec 18, 2025): I tested this on v0.6.41 and v0.6.40, in both versions the Models always fail to generate a mermaid from the prompt "Create a mermaid diagram that shows the Dutch National Flag algorithm". The error seems to always be unquoted node/decision text. Outputted Mermaid: ```text flowchart TD A[Start] --> B[Initialize<br/>low = 0<br/>mid = 0<br/>high = n - 1] B --> C{mid <= high} C -- "No" --> Z[End\nArray is sorted] C -- "Yes" --> D{arr[mid]} D -- "0" --> E[Swap arr[low] & arr[mid]] E --> F[low++\nmid++] F --> C D -- "1" --> G[mid++] G --> C D -- "2" --> H[Swap arr[mid] & arr[high]] H --> I[high--] I --> C ``` Github mermaid render shows the same error: ```mermaid flowchart TD A[Start] --> B[Initialize<br/>low = 0<br/>mid = 0<br/>high = n - 1] B --> C{mid <= high} C -- "No" --> Z[End\nArray is sorted] C -- "Yes" --> D{arr[mid]} D -- "0" --> E[Swap arr[low] & arr[mid]] E --> F[low++\nmid++] F --> C D -- "1" --> G[mid++] G --> C D -- "2" --> H[Swap arr[mid] & arr[high]] H --> I[high--] I --> C ``` Asking the model to "wrap all labels in quotes" gets it to consistently output a mermaid diagram without errors. Fixed Mermaid: ```text flowchart TD A["Start"] --> B["Initialize<br/>low = 0<br/>mid = 0<br/>high = n - 1"] B --> C{"mid <= high"} C -- "No" --> Z["End<br/>Array is sorted"] C -- "Yes" --> D{"arr[mid]"} D -- "0" --> E["Swap arr[low] and arr[mid]"] E --> F["low++<br/>mid++"] F --> C D -- "1" --> G["mid++"] G --> C D -- "2" --> H["Swap arr[mid] and arr[high]"] H --> I["high--"] I --> C ``` Seems to be a issue on the models side, as silentoplayz said. :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#34593