[PR #21367] [CLOSED] feat: Add admin-configurable citation format (plain text vs markdown) #129705

Closed
opened 2026-05-21 13:19:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/21367
Author: @YannickPezeu
Created: 2/13/2026
Status: Closed

Base: mainHead: markdown_citations_PR


📝 Commits (1)

  • 7330af9 feat: add admin setting for citation content format (plain text or markdown)

📊 Changes

5 files changed (+35 additions, -1 deletions)

View changed files

📝 backend/open_webui/config.py (+6 -0)
📝 backend/open_webui/main.py (+3 -0)
📝 backend/open_webui/routers/auths.py (+4 -0)
📝 src/lib/components/admin/Settings/General.svelte (+13 -0)
📝 src/lib/components/chat/Messages/Citations/CitationModal.svelte (+9 -1)

📄 Description

Summary

  • Adds a Citation Content Format setting in Admin > Settings > General
  • Admins can toggle between plain_text (default) and markdown rendering in citation modals
  • When markdown is selected, citation content is rendered using the existing Markdown component with full formatting support

Changes

  • Backend: Added CITATION_FORMAT PersistentConfig in config.py, exposed via /api/config and admin settings endpoints in auths.py
  • Frontend: Added dropdown in admin/Settings/General.svelte, updated CitationModal.svelte to conditionally render markdown

Test plan

  • Set citation format to "markdown" in Admin > Settings > General
  • Open a chat with RAG citations and verify they render with markdown formatting
  • Switch back to "plain_text" and verify citations render as before
  • Verify setting persists across server restarts

🤖 Generated with Claude Code


🔄 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/21367 **Author:** [@YannickPezeu](https://github.com/YannickPezeu) **Created:** 2/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `markdown_citations_PR` --- ### 📝 Commits (1) - [`7330af9`](https://github.com/open-webui/open-webui/commit/7330af9f48f2204a76cf37a27acc4ff9e05e6ecf) feat: add admin setting for citation content format (plain text or markdown) ### 📊 Changes **5 files changed** (+35 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+6 -0) 📝 `backend/open_webui/main.py` (+3 -0) 📝 `backend/open_webui/routers/auths.py` (+4 -0) 📝 `src/lib/components/admin/Settings/General.svelte` (+13 -0) 📝 `src/lib/components/chat/Messages/Citations/CitationModal.svelte` (+9 -1) </details> ### 📄 Description ## Summary - Adds a **Citation Content Format** setting in Admin > Settings > General - Admins can toggle between `plain_text` (default) and `markdown` rendering in citation modals - When markdown is selected, citation content is rendered using the existing Markdown component with full formatting support ## Changes - **Backend**: Added `CITATION_FORMAT` PersistentConfig in `config.py`, exposed via `/api/config` and admin settings endpoints in `auths.py` - **Frontend**: Added dropdown in `admin/Settings/General.svelte`, updated `CitationModal.svelte` to conditionally render markdown ## Test plan - [ ] Set citation format to "markdown" in Admin > Settings > General - [ ] Open a chat with RAG citations and verify they render with markdown formatting - [ ] Switch back to "plain_text" and verify citations render as before - [ ] Verify setting persists across server restarts 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-21 13:19:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#129705