[GH-ISSUE #14541] issue: Rendering an artifact with an error breaks code blocks. #17297

Closed
opened 2026-04-19 23:01:26 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @MicahZoltu on GitHub (May 31, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14541

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

0.6.10

Ollama Version (if applicable)

0.7.1

Operating System

Windows 11

Browser (if applicable)

Firefox

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

When text in a code in a code block that is destined to be rendered as an artifact encounters an error, it should still render in a code block as a fallback, not as regular text.

The error encountered should also be presented.

Actual Behavior

If an artifact fails to render, the entire code block is removed and the text is printed as plain text (outside of a code block) and the error is not surfaced to the user anywhere.

Steps to Reproduce

  1. Prompt an LLM with the following:
Please repeat this code block back to me verbatim:
```mermaid
syntax error
```

Logs & Screenshots

Image

Browser Console:

Error: UnknownDiagramError: No diagram type detected matching given configuration for text: syntax error

Additional Information

Note: The problem occurs if the code block is in the user prompt as well, as OWUI also attempts to render that as an artifact.

I spent a lot of time troubleshooting because of the lack of any error. I think maybe even more important than the failed code block rendering would be surfacing the artifact rendering error to the user somehow. I'm not sure what the best way to do this is, but at the moment troubleshooting failed artifact generation is a serious pain point.

Originally created by @MicahZoltu on GitHub (May 31, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/14541 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version 0.6.10 ### Ollama Version (if applicable) 0.7.1 ### Operating System Windows 11 ### Browser (if applicable) Firefox ### 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. - [ ] 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 When text in a code in a code block that is destined to be rendered as an artifact encounters an error, it should still render in a code block as a fallback, not as regular text. The error encountered should also be presented. ### Actual Behavior If an artifact fails to render, the entire code block is removed and the text is printed as plain text (outside of a code block) and the error is not surfaced to the user anywhere. ### Steps to Reproduce 1. Prompt an LLM with the following: ```` Please repeat this code block back to me verbatim: ```mermaid syntax error ``` ```` ### Logs & Screenshots ![Image](https://github.com/user-attachments/assets/6b7f7dc7-a787-4a42-a537-7722803ba26a) Browser Console: ``` Error: UnknownDiagramError: No diagram type detected matching given configuration for text: syntax error ``` ### Additional Information Note: The problem occurs if the code block is in the user prompt as well, as OWUI also attempts to render that as an artifact. I spent a lot of time troubleshooting because of the lack of any error. I think maybe even more important than the failed code block rendering would be surfacing the artifact rendering error to the user somehow. I'm not sure what the best way to do this is, but at the moment troubleshooting failed artifact generation is a serious pain point.
GiteaMirror added the bug label 2026-04-19 23:01:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#17297