open-webui/backend/open_webui
Classic298 4eda1f00df fix: context compaction never fires during a long tool run
During a long run of tool calls, context compaction between tool calls judged the conversation's size from a rough character count and ignored the token count the provider reports after every model call. That count leaves out the model's reasoning and undercounts code and command output, so on a code-heavy run it read about half the real size, compaction never started, and the reply ended with the provider's context size error. Compaction now starts from the token count the provider reported for the last model call and only estimates the new tool results on top of it. Providers that report no token counts still get the estimate.

Fixes #32306
2026-10-12 23:24:21 +02:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal fix: non-English text is missed by searches and counted six times against size limits (#31615) 2026-09-30 19:19:29 +04:00
migrations refac 2026-10-12 17:29:04 +04:00
models refac 2026-10-13 00:43:00 +04:00
retrieval fix: external knowledge citation links lead to a not found error (#32233) 2026-10-12 11:57:07 +04:00
routers refac 2026-10-13 00:43:00 +04:00
socket refac 2026-10-13 00:43:00 +04:00
static refac 2026-09-06 17:27:30 -04:00
storage refac 2026-10-05 12:03:19 +04:00
tools fix: external knowledge citation links lead to a not found error (#32233) 2026-10-12 11:57:07 +04:00
utils fix: context compaction never fires during a long tool run 2026-10-12 23:24:21 +02:00
__init__.py refac 2026-10-05 12:17:25 +04:00
alembic.ini fix: Alembic CLI commands from failing 2025-08-15 04:17:47 -04:00
config.py refac 2026-10-13 00:29:26 +04:00
constants.py fix: SSO login failures show the email/password error (#31629) 2026-09-30 19:07:49 +04:00
env.py refac 2026-10-01 03:31:20 +04:00
events.py refac 2026-10-08 14:30:07 +04:00
functions.py refac 2026-10-08 20:33:47 +04:00
main.py refac 2026-10-13 00:43:00 +04:00
tasks.py refac 2026-09-21 08:59:39 -04:00