[GH-ISSUE #5223] Code formatting when using Claude 3.5 Sonnet #29428

Closed
opened 2026-04-25 03:50:41 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Joakim-T on GitHub (Sep 6, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5223

Bug Report

Installation Method

Docker

Environment

Open WebUI v0.3.19
Claude added using LiteLLM

Windows 10
Chrome 128.0.6613.120

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Formatted code output from LLM in a Run/Copy Code box

Actual Behavior:

Unformatted code as normal chat text

Description

After updating Open WebUI to the latest version code from Claude 3.5 is not formatted correctly.
Code from ChatGPT 4o looks fine.

Bug Summary:
[Provide a brief but clear summary of the bug]

Reproduction Details

Steps to Reproduce:
See screenshots.
Ask Claude to write any code

Logs and Screenshots

Screenshots/Screen Recordings (if applicable):

Claude 3.5

claude35s

ChatGPT 4o

gpt4o

Originally created by @Joakim-T on GitHub (Sep 6, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/5223 # Bug Report ## Installation Method Docker ## Environment Open WebUI v0.3.19 Claude added using LiteLLM Windows 10 Chrome 128.0.6613.120 **Confirmation:** - [X] I have read and followed all the instructions provided in the README.md. - [X] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [ ] I have included the Docker container logs. - [X] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Formatted code output from LLM in a Run/Copy Code box ## Actual Behavior: Unformatted code as normal chat text ## Description After updating Open WebUI to the latest version code from Claude 3.5 is not formatted correctly. Code from ChatGPT 4o looks fine. **Bug Summary:** [Provide a brief but clear summary of the bug] ## Reproduction Details **Steps to Reproduce:** See screenshots. Ask Claude to write any code ## Logs and Screenshots **Screenshots/Screen Recordings (if applicable):** Claude 3.5 ![claude35s](https://github.com/user-attachments/assets/817c01e5-81f1-4afb-94d7-5dfd422df8af) ChatGPT 4o ![gpt4o](https://github.com/user-attachments/assets/bf6dd44c-d3cd-4794-808f-6a045ed25277)
Author
Owner

@silentoplayz commented on GitHub (Sep 6, 2024):

How do we know that claude-3.5 even provided the code wrapped in a codeblock based on your screenshot? We don't.

<!-- gh-comment-id:2334386986 --> @silentoplayz commented on GitHub (Sep 6, 2024): How do we know that claude-3.5 even provided the code wrapped in a codeblock based on your screenshot? We don't.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#29428