mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-16 09:41:23 +00:00
fix: context compaction summary cut off at 1000 tokens (#33726)
Without Task Model Params set, the compaction summary was capped at 1000 tokens. Reasoning models could spend all of that on thinking and return an empty or cut-off summary, which then replaced the chat's context. The summary request now carries no token limit of its own unless Task Model Params sets one, so the provider's normal limits apply.
This commit is contained in:
parent
d780d386e6
commit
275e0f40e5
1 changed files with 0 additions and 3 deletions
|
|
@ -458,9 +458,6 @@ async def _generate_summary(
|
|||
if not isinstance(task_model_params, dict):
|
||||
task_model_params = {}
|
||||
task_model_params = {key: value for key, value in task_model_params.items() if value is not None and value != ''}
|
||||
task_model_params = task_model_params or {
|
||||
'max_tokens': models[task_model_id].get('info', {}).get('params', {}).get('max_tokens', 1000)
|
||||
}
|
||||
|
||||
metadata = {
|
||||
**(request.state.metadata if hasattr(request.state, 'metadata') else {}),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue