I have searched the existing issues and discussions.
I am using the latest version of Open WebUI.
Installation Method
Pip Install
Open WebUI Version
v0.6.26
Ollama Version (if applicable)
0.11.7
Operating System
Fedora 42
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
"Analyze" block should appear, showing only relevant code when unfolded, with a clean LLM reply afterwards. If relevant, it is using pydiode for execution.
Actual Behavior
Steps to Reproduce
Launch any task where LLM would write and execute code and examine the result, such as in the screenshot above.
Logs & Screenshots
Screenshot above.
Additional Information
After tinkering a bit with Claude Code I could get it to work with:
- content_stripped, original_whitespace = (
- split_content_and_whitespace(content)
- )
- if is_opening_code_block(content_stripped):
- # Remove trailing backticks that would open a new block
- content = (
- content_stripped.rstrip("`").rstrip()
- + original_whitespace
- )
- else:
- # Keep content as is - either closing backticks or no backticks
- content = content_stripped + original_whitespace
+ # Remove any trailing code block markers
+ content_stripped = content.rstrip()
+
+ # Remove trailing ```python or ``` markers that would conflict with our details block
+ if content_stripped.endswith("```python"):
+ content_stripped = content_stripped[:-9].rstrip()
+ elif content_stripped.endswith("```"):
+ content_stripped = content_stripped[:-3].rstrip()
+
+ content = content_stripped
Originally created by @rbx on GitHub (Sep 3, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17181
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
- [x] I am using the latest version of Open WebUI.
### Installation Method
Pip Install
### Open WebUI Version
v0.6.26
### Ollama Version (if applicable)
0.11.7
### Operating System
Fedora 42
### 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.
- [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
"Analyze" block should appear, showing only relevant code when unfolded, with a clean LLM reply afterwards. If relevant, it is using pydiode for execution.
### Actual Behavior
<img width="1015" height="433" alt="Image" src="https://github.com/user-attachments/assets/07036667-dd6d-499a-bb4b-c0f89bad4042" />
### Steps to Reproduce
Launch any task where LLM would write and execute code and examine the result, such as in the screenshot above.
### Logs & Screenshots
Screenshot above.
### Additional Information
After tinkering a bit with Claude Code I could get it to work with:
```diff
- content_stripped, original_whitespace = (
- split_content_and_whitespace(content)
- )
- if is_opening_code_block(content_stripped):
- # Remove trailing backticks that would open a new block
- content = (
- content_stripped.rstrip("`").rstrip()
- + original_whitespace
- )
- else:
- # Keep content as is - either closing backticks or no backticks
- content = content_stripped + original_whitespace
+ # Remove any trailing code block markers
+ content_stripped = content.rstrip()
+
+ # Remove trailing ```python or ``` markers that would conflict with our details block
+ if content_stripped.endswith("```python"):
+ content_stripped = content_stripped[:-9].rstrip()
+ elif content_stripped.endswith("```"):
+ content_stripped = content_stripped[:-3].rstrip()
+
+ content = content_stripped
```
in https://github.com/open-webui/open-webui/blob/dev/backend/open_webui/utils/middleware.py#L1562
Then the output becomes:
<img width="1013" height="427" alt="Image" src="https://github.com/user-attachments/assets/940e7f5c-6e95-44df-8a24-b59e51e9314e" />
But not sure if this is a good solution.
GiteaMirror
added the bug label 2026-04-20 00:24:37 -05:00
This is caused by the model not following the prompt instructions, if you use a higher end model like gpt-4o, you won't be encountering this issue.
<!-- gh-comment-id:3263177365 -->
@tjbck commented on GitHub (Sep 6, 2025):
This is caused by the model not following the prompt instructions, if you use a higher end model like gpt-4o, you won't be encountering 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 @rbx on GitHub (Sep 3, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17181
Check Existing Issues
Installation Method
Pip Install
Open WebUI Version
v0.6.26
Ollama Version (if applicable)
0.11.7
Operating System
Fedora 42
Browser (if applicable)
Firefox
Confirmation
README.md.Expected Behavior
"Analyze" block should appear, showing only relevant code when unfolded, with a clean LLM reply afterwards. If relevant, it is using pydiode for execution.
Actual Behavior
Steps to Reproduce
Launch any task where LLM would write and execute code and examine the result, such as in the screenshot above.
Logs & Screenshots
Screenshot above.
Additional Information
After tinkering a bit with Claude Code I could get it to work with:
in https://github.com/open-webui/open-webui/blob/dev/backend/open_webui/utils/middleware.py#L1562
Then the output becomes:
But not sure if this is a good solution.
@tjbck commented on GitHub (Sep 6, 2025):
This is caused by the model not following the prompt instructions, if you use a higher end model like gpt-4o, you won't be encountering this issue.