Originally created by @bgeneto on GitHub (Sep 30, 2024).
Bug Report
Installation Method
Docker compose linux
Environment
Open WebUI Version: v0.3.30
Ollama (if applicable): 0.3.12
Operating System: Debian 12
Browser (if applicable): Chrome 120.0
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:
The user should be able to delete a chat successfully, and the system should handle the deletion request without errors.
Actual Behavior:
When attempting to delete a user chat, the system raises a KeyError exception due to a missing configuration key. The error occurs in the delete_chat_by_id function in the chats.py file.
Description
Bug Summary:
The delete_chat_by_id function in the chats.py file attempts to access a configuration key that does not exist, resulting in a KeyError exception. This prevents the user from deleting a chat successfully.
Reproduction Details
Steps to Reproduce:
Start the Open WebUI application.
0. Create a new user (non-admin)
Log in as the just created user (ensure chat deletion permissions: USER_PERMISSIONS_CHAT_DELETION=true).
Navigate to the chat interface and select a chat to delete (...).
Click the "Delete" button to initiate the deletion process.
The system will raise a KeyError exception in the delete_chat_by_id function, located in the chats.py file, due to the missing configuration key.
Logs and Screenshots
Browser Console Logs:
Docker Container Logs:
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/webui/routers/chats.py", line 295, in delete_chat_by_id
if not request.app.state.config.USER_PERMISSIONS["chat"]["deletion"]:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'chat'
Screenshots/Screen Recordings (if applicable):
Additional Information
I'm using de dev branch pulled today (2024-09-30)
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Originally created by @bgeneto on GitHub (Sep 30, 2024).
# Bug Report
## Installation Method
Docker compose linux
## Environment
- **Open WebUI Version:** v0.3.30
- **Ollama (if applicable):** 0.3.12
- **Operating System:** Debian 12
- **Browser (if applicable):** Chrome 120.0
**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.
- [x] I have included the browser console logs.
- [x] 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:
The user should be able to delete a chat successfully, and the system should handle the deletion request without errors.
## Actual Behavior:
When attempting to delete a user chat, the system raises a KeyError exception due to a missing configuration key. The error occurs in the delete_chat_by_id function in the chats.py file.
## Description
**Bug Summary:**
The delete_chat_by_id function in the chats.py file attempts to access a configuration key that does not exist, resulting in a KeyError exception. This prevents the user from deleting a chat successfully.
## Reproduction Details
**Steps to Reproduce:**
Start the Open WebUI application.
0. Create a new user (non-admin)
1. Log in as the just created user (ensure chat deletion permissions: USER_PERMISSIONS_CHAT_DELETION=true).
2. Navigate to the chat interface and select a chat to delete (...).
3. Click the "Delete" button to initiate the deletion process.
4. The system will raise a KeyError exception in the delete_chat_by_id function, located in the chats.py file, due to the missing configuration key.
## Logs and Screenshots
**Browser Console Logs:**
**Docker Container Logs:**
```text
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/webui/routers/chats.py", line 295, in delete_chat_by_id
if not request.app.state.config.USER_PERMISSIONS["chat"]["deletion"]:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'chat'
```
**Screenshots/Screen Recordings (if applicable):**

## Additional Information
I'm using de dev branch pulled today (2024-09-30)
## Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
I'm personally unable to replicate the error with the reproduction steps provided. I am also on the dev branch using the latest commit.
@silentoplayz commented on GitHub (Oct 1, 2024):
I'm personally unable to replicate the error with the reproduction steps provided. I am also on the dev branch using the latest commit.
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 @bgeneto on GitHub (Sep 30, 2024).
Bug Report
Installation Method
Docker compose linux
Environment
Open WebUI Version: v0.3.30
Ollama (if applicable): 0.3.12
Operating System: Debian 12
Browser (if applicable): Chrome 120.0
Confirmation:
Expected Behavior:
The user should be able to delete a chat successfully, and the system should handle the deletion request without errors.
Actual Behavior:
When attempting to delete a user chat, the system raises a KeyError exception due to a missing configuration key. The error occurs in the delete_chat_by_id function in the chats.py file.
Description
Bug Summary:
The delete_chat_by_id function in the chats.py file attempts to access a configuration key that does not exist, resulting in a KeyError exception. This prevents the user from deleting a chat successfully.
Reproduction Details
Steps to Reproduce:
Start the Open WebUI application.
0. Create a new user (non-admin)
Logs and Screenshots
Browser Console Logs:
Docker Container Logs:
Screenshots/Screen Recordings (if applicable):
Additional Information
I'm using de dev branch pulled today (2024-09-30)
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
@silentoplayz commented on GitHub (Oct 1, 2024):
I'm personally unable to replicate the error with the reproduction steps provided. I am also on the dev branch using the latest commit.