Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests to validate the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
feat: Introduces a new feature or enhancement to the codebase
Adds a new setting in Interface.svelte underneath task model selector, to allow set a max amount of characters to be used per retrieved message for each task model prompt.
This can save on excessive task model costs.
A value like 10000 could be more than enough for 99% of cases while still saving on excess costs for very long messages.
Note: setting a value for the character truncation applies to all task model prompts that make use of the message fetching functionality of the current conversation i.e. for generating a title or a tag or the follow up queries, but also the web search queries.
So it is advisable to not use values too short, otherwise important context might be going missing to generate useful web search queries or follow up prompts.
The default value is -1, to reflect current behaviour and have no unintended new effects to users upgrading to a new Open WebUI version where this feature would potentially be introduced - to ensure current behaviour remains unchanged.
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/15087
**Author:** [@Classic298](https://github.com/Classic298)
**Created:** 6/17/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `task-model-message-truncation`
---
### 📝 Commits (8)
- [`ed1cc54`](https://github.com/open-webui/open-webui/commit/ed1cc5497b9be345b2e2c5d3a5031bce76b3f947) Update config.py
- [`5504af8`](https://github.com/open-webui/open-webui/commit/5504af8c6a4390004e557a4a6f60b6e433617359) Update env.py
- [`f0f8a2a`](https://github.com/open-webui/open-webui/commit/f0f8a2a775eda9919401c4ff41a36f1436b1cda6) Update main.py
- [`8872182`](https://github.com/open-webui/open-webui/commit/88721827bb676c99368fcf209465fea2b8cdc152) Update tasks.py
- [`47ff3f9`](https://github.com/open-webui/open-webui/commit/47ff3f90f2f6cc53fdecdc49ae9139f4319d265f) Update task.py
- [`09447f2`](https://github.com/open-webui/open-webui/commit/09447f2c550cd44a90a1c6ca016f073c2fd485ff) Update Interface.svelte
- [`e4763b2`](https://github.com/open-webui/open-webui/commit/e4763b258e9f1f015df45393b4a447b3cfa75dea) Update env.py
- [`bd0d4af`](https://github.com/open-webui/open-webui/commit/bd0d4afc6510bc47dc5037a64d69e5319b197438) Update Interface.svelte
### 📊 Changes
**5 files changed** (+84 additions, -30 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/tasks.py` (+4 -0)
📝 `backend/open_webui/utils/task.py` (+50 -29)
📝 `src/lib/components/admin/Settings/Interface.svelte` (+21 -1)
</details>
### 📄 Description
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
**Before submitting, make sure you've checked the following:**
- [X] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [X] **Description:** Provide a concise description of the changes made in this pull request.
- [X] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? https://github.com/open-webui/docs/pull/585
- [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [X] **Testing:** Have you written and run sufficient tests to validate the changes?
- [X] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [X] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following:
- **feat**: Introduces a new feature or enhancement to the codebase
# Changelog Entry
### Description
- Fixes: https://github.com/open-webui/open-webui/issues/15081#issuecomment-2981157634
Adds a new setting in Interface.svelte underneath task model selector, to allow set a max amount of characters to be used per retrieved message for each task model prompt.
This can save on excessive task model costs.
A value like 10000 could be more than enough for 99% of cases while still saving on excess costs for very long messages.
Note: setting a value for the character truncation applies to all task model prompts that make use of the message fetching functionality of the current conversation i.e. for generating a title or a tag or the follow up queries, but also the web search queries.
So it is advisable to not use values too short, otherwise important context might be going missing to generate useful web search queries or follow up prompts.
The default value is -1, to reflect current behaviour and have no unintended new effects to users upgrading to a new Open WebUI version where this feature would potentially be introduced - to ensure current behaviour remains unchanged.
Docs: https://github.com/open-webui/docs/pull/585
---
### Screenshots or Videos




Admin Panel:

Description when hovering over input field

Placeholder

### Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/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>
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/15087
Author: @Classic298
Created: 6/17/2025
Status: ❌ Closed
Base:
dev← Head:task-model-message-truncation📝 Commits (8)
ed1cc54Update config.py5504af8Update env.pyf0f8a2aUpdate main.py8872182Update tasks.py47ff3f9Update task.py09447f2Update Interface.sveltee4763b2Update env.pybd0d4afUpdate Interface.svelte📊 Changes
5 files changed (+84 additions, -30 deletions)
View changed files
📝
backend/open_webui/config.py(+6 -0)📝
backend/open_webui/main.py(+3 -0)📝
backend/open_webui/routers/tasks.py(+4 -0)📝
backend/open_webui/utils/task.py(+50 -29)📝
src/lib/components/admin/Settings/Interface.svelte(+21 -1)📄 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
Description
Adds a new setting in Interface.svelte underneath task model selector, to allow set a max amount of characters to be used per retrieved message for each task model prompt.
This can save on excessive task model costs.
A value like 10000 could be more than enough for 99% of cases while still saving on excess costs for very long messages.
Note: setting a value for the character truncation applies to all task model prompts that make use of the message fetching functionality of the current conversation i.e. for generating a title or a tag or the follow up queries, but also the web search queries.
So it is advisable to not use values too short, otherwise important context might be going missing to generate useful web search queries or follow up prompts.
The default value is -1, to reflect current behaviour and have no unintended new effects to users upgrading to a new Open WebUI version where this feature would potentially be introduced - to ensure current behaviour remains unchanged.
Docs: https://github.com/open-webui/docs/pull/585
Screenshots or Videos
Admin Panel:
Description when hovering over input field
Placeholder
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.