Fixed folder prompts not being applied to temporary chats. When a user creates a temporary chat in a folder with a system prompt, the prompt is now correctly applied.
Fixed
Folder system prompts are now applied to temporary chats by passing folder_id explicitly from the frontend when the chat is temporary, and using it in the backend middleware when the chat record lookup returns nothing.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/22850
**Author:** [@themavik](https://github.com/themavik)
**Created:** 3/19/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `fix/22772-temp-chat-folder-prompt`
---
### 📝 Commits (1)
- [`2139e79`](https://github.com/open-webui/open-webui/commit/2139e79bdbd4b1361eae59bb2492c928a6638bff) fix: apply folder prompt to temporary chats (#22772)
### 📊 Changes
**3 files changed** (+4 additions, -0 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/main.py` (+1 -0)
📝 `backend/open_webui/utils/middleware.py` (+2 -0)
📝 `src/lib/components/chat/Chat.svelte` (+1 -0)
</details>
### 📄 Description
# Changelog Entry
### Description
- Fixed folder prompts not being applied to temporary chats. When a user creates a temporary chat in a folder with a system prompt, the prompt is now correctly applied.
### Fixed
- Folder system prompts are now applied to temporary chats by passing `folder_id` explicitly from the frontend when the chat is temporary, and using it in the backend middleware when the chat record lookup returns nothing.
### Contributor License Agreement
- [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
Made with [Cursor](https://cursor.com)
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22850
Author: @themavik
Created: 3/19/2026
Status: ❌ Closed
Base:
dev← Head:fix/22772-temp-chat-folder-prompt📝 Commits (1)
2139e79fix: apply folder prompt to temporary chats (#22772)📊 Changes
3 files changed (+4 additions, -0 deletions)
View changed files
📝
backend/open_webui/main.py(+1 -0)📝
backend/open_webui/utils/middleware.py(+2 -0)📝
src/lib/components/chat/Chat.svelte(+1 -0)📄 Description
Changelog Entry
Description
Fixed
folder_idexplicitly from the frontend when the chat is temporary, and using it in the backend middleware when the chat record lookup returns nothing.Contributor License Agreement
Made with Cursor
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.