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

Closed
opened 2026-05-06 10:38:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

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

Base: devHead: markdown_citations_PR


📝 Commits (1)

  • b4b2af5 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

Pull Request Checklist

  • Target branch: Targets the dev branch.
  • Description: See below.
  • Testing: Manually tested locally and on staging deployment.
  • Code review: Self-reviewed.

Changelog Entry

Description

Adds an admin-configurable citation content format setting that allows switching between plain text and markdown rendering in citation modals. This enables richer formatting for RAG citation content when desired.

Added

  • CITATION_FORMAT PersistentConfig setting (plain_text or markdown) in backend config
  • Citation Content Format dropdown in Admin > Settings > General
  • Conditional markdown rendering in CitationModal.svelte using the existing Markdown component

Changed

  • CitationModal.svelte now reads $config?.ui?.citation_format to choose rendering mode
  • /api/config endpoint exposes citation_format in the UI config
  • Admin config GET/POST handlers in auths.py include the new setting

Screenshots or Videos

  • Tested locally and on Kubernetes staging deployment at EPFL

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/21369 **Author:** [@YannickPezeu](https://github.com/YannickPezeu) **Created:** 2/13/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `markdown_citations_PR` --- ### 📝 Commits (1) - [`b4b2af5`](https://github.com/open-webui/open-webui/commit/b4b2af5fcda3c3d2cdf7287aa88d5af20583dc03) 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 # Pull Request Checklist - [x] **Target branch:** Targets the `dev` branch. - [x] **Description:** See below. - [x] **Testing:** Manually tested locally and on staging deployment. - [x] **Code review:** Self-reviewed. # Changelog Entry ### Description Adds an admin-configurable citation content format setting that allows switching between plain text and markdown rendering in citation modals. This enables richer formatting for RAG citation content when desired. ### Added - `CITATION_FORMAT` PersistentConfig setting (`plain_text` or `markdown`) in backend config - Citation Content Format dropdown in Admin > Settings > General - Conditional markdown rendering in `CitationModal.svelte` using the existing `Markdown` component ### Changed - `CitationModal.svelte` now reads `$config?.ui?.citation_format` to choose rendering mode - `/api/config` endpoint exposes `citation_format` in the UI config - Admin config GET/POST handlers in `auths.py` include the new setting ### Screenshots or Videos - Tested locally and on Kubernetes staging deployment at EPFL --- ### Contributor License Agreement 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. --- <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-06 10:38:25 -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#64906