Originally created by @DSP-AID on GitHub (Sep 28, 2025).
Check Existing Issues
I have searched for any existing and/or related issues.
I have searched for any existing and/or related discussions.
I am using the latest version of Open WebUI.
Installation Method
Git Clone
Open WebUI Version
v0.6.31
Ollama Version (if applicable)
Not applicable — using LM Studio v 03.27 instead of Ollama
Operating System
Ubuntu Server 24.04 (Docker container)
Browser (if applicable)
Firefox 118.0, Chrome 117.0, Edge
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 XML code block should render cleanly with proper syntax highlighting and no injected HTML tags. Specifically, the <details type="code_interpreter"> and <summary> elements should not appear unless explicitly requested by the user or model. The entire code block should remain intact, without any DOM-breaking elements or misplaced closing tags. Rendering should be consistent with other code types like python or json, where no visual or structural issues occur.
Actual Behavior
When the model generates a response with a code block marked as xml, Open WebUI automatically injects the following HTML tags into the block:
<detailstype="code_interpreter"done="false"><summary>Analyzing...</summary>
### Steps to Reproduce
1. Start with a clean Ubuntu Server 24.04 installation.
2. Install Docker and Docker Compose (e.g., Docker v24.0.5).
3. Clone the Open WebUI repository and launch it using `docker-compose` with default settings.
4. Open the WebUI in a browser (tested in Firefox 118.0 and Chrome 117.0).
5. Use LM Studio as the model backend instead of Ollama.
6. In the chat interface, prompt the model to generate XML code (e.g., `<config><item>value</item></config>`).
7. Observe the response: the code block is marked as `xml`.
8. Notice that the following HTML tags are injected into the block:
```html
<detailstype="code_interpreter"done="false"><summary>Analyzing...</summary>
9. Observe that the closing </details> tag is placed outside the code block, breaking the DOM structure.
10. Repeat the same prompt but request the code block to be marked as python — no issue occurs.
### Logs & Screenshots
### 📎 Screenshot
This image shows the injected `<detailstype="code_interpreter">` and `<summary>` tags inside an `xml` code block, with the closing `</details>` tag placed outside the block:
<imgwidth="1043"height="465"alt="Image"src="https://github.com/user-attachments/assets/d99e3ac8-64ea-454b-824c-bf5ce51ce37d"/>
### Additional Information
**Model Used:**
Gemma 3 12B — served locally via LM Studio (Google model)
The issue occurs consistently with this model when generating XML code blocks. The bug appears to be related to how Open WebUI renders responses from any model when the code block type is set to `xml`, regardless of the backend.
Originally created by @DSP-AID on GitHub (Sep 28, 2025).
### 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 am using the latest version of Open WebUI.
### Installation Method
Git Clone
### Open WebUI Version
v0.6.31
### Ollama Version (if applicable)
Not applicable — using LM Studio v 03.27 instead of Ollama
### Operating System
Ubuntu Server 24.04 (Docker container)
### Browser (if applicable)
Firefox 118.0, Chrome 117.0, Edge
### 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 XML code block should render cleanly with proper syntax highlighting and no injected HTML tags. Specifically, the `<details type="code_interpreter">` and `<summary>` elements should not appear unless explicitly requested by the user or model. The entire code block should remain intact, without any DOM-breaking elements or misplaced closing tags. Rendering should be consistent with other code types like `python` or `json`, where no visual or structural issues occur.
### Actual Behavior
When the model generates a response with a code block marked as `xml`, Open WebUI automatically injects the following HTML tags into the block:
```html
<details type="code_interpreter" done="false">
<summary>Analyzing...</summary>
### Steps to Reproduce
1. Start with a clean Ubuntu Server 24.04 installation.
2. Install Docker and Docker Compose (e.g., Docker v24.0.5).
3. Clone the Open WebUI repository and launch it using `docker-compose` with default settings.
4. Open the WebUI in a browser (tested in Firefox 118.0 and Chrome 117.0).
5. Use LM Studio as the model backend instead of Ollama.
6. In the chat interface, prompt the model to generate XML code (e.g., `<config><item>value</item></config>`).
7. Observe the response: the code block is marked as `xml`.
8. Notice that the following HTML tags are injected into the block:
```html
<details type="code_interpreter" done="false">
<summary>Analyzing...</summary>
9. Observe that the closing </details> tag is placed outside the code block, breaking the DOM structure.
10. Repeat the same prompt but request the code block to be marked as python — no issue occurs.
### Logs & Screenshots
### 📎 Screenshot
This image shows the injected `<details type="code_interpreter">` and `<summary>` tags inside an `xml` code block, with the closing `</details>` tag placed outside the block:
<img width="1043" height="465" alt="Image" src="https://github.com/user-attachments/assets/d99e3ac8-64ea-454b-824c-bf5ce51ce37d" />
### Additional Information
**Model Used:**
Gemma 3 12B — served locally via LM Studio (Google model)
The issue occurs consistently with this model when generating XML code blocks. The bug appears to be related to how Open WebUI renders responses from any model when the code block type is set to `xml`, regardless of the backend.
GiteaMirror
added the bug label 2025-11-11 16:58:32 -06:00
Model dependent behaviour, if you use a higher end models like gpt-4.1, you're less likely to encounter this issue.
@tjbck commented on GitHub (Sep 28, 2025):
Model dependent behaviour, if you use a higher end models like gpt-4.1, you're less likely to encounter this issue.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @DSP-AID on GitHub (Sep 28, 2025).
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.6.31
Ollama Version (if applicable)
Not applicable — using LM Studio v 03.27 instead of Ollama
Operating System
Ubuntu Server 24.04 (Docker container)
Browser (if applicable)
Firefox 118.0, Chrome 117.0, Edge
Confirmation
README.md.Expected Behavior
The XML code block should render cleanly with proper syntax highlighting and no injected HTML tags. Specifically, the
<details type="code_interpreter">and<summary>elements should not appear unless explicitly requested by the user or model. The entire code block should remain intact, without any DOM-breaking elements or misplaced closing tags. Rendering should be consistent with other code types likepythonorjson, where no visual or structural issues occur.Actual Behavior
When the model generates a response with a code block marked as
xml, Open WebUI automatically injects the following HTML tags into the block:@tjbck commented on GitHub (Sep 28, 2025):
Model dependent behaviour, if you use a higher end models like gpt-4.1, you're less likely to encounter this issue.