mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #17550] feat: support per-model RAG template override #40098
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/17550
Author: @athoik
Created: 9/18/2025
Status: 🔄 Open
Base:
dev← Head:model_rag_template📝 Commits (1)
86f33defeat: support per-model RAG template override📊 Changes
2 files changed (+26 additions, -4 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+6 -1)📝
src/lib/components/workspace/Models/ModelEditor.svelte(+20 -3)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Add
rag_templateas a configurable parameter in model settings, allowing each model to define its own RAG template instead of always using the global default.rag_template.RAG_TEMPLATEremains when no override is set.Added
Breaking Changes
Screenshots or Videos
By default the model screen will have an empty template and global rag template will be used.
We can override the default by setting our customized rag template.
Here is an example rag template, based on default, without citations.
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.