Files
open-webui/backend/open_webui/utils
Classic298andGitHub 302b8cfd50 fix: tool calls make chats compact too early and inflate prompt token counts (#33218)
Since a recent refactor on dev, the prompt and completion token counts of a reply that used tools added up every model call in the loop, even though each later call already re-sends the whole conversation. A reply whose context was 50k tokens showed 90k, the context gauge read over 100% and the next message triggered compaction long before the chat reached the threshold. Prompt and completion tokens show the latest call again, while total tokens and cost still add up across all calls.
2026-10-26 19:17:34 +09:00
..
2026-10-25 14:20:56 +09:00
2026-10-14 17:10:08 +04:00
2026-10-26 07:24:36 +09:00
…
2026-10-14 23:58:58 +04:00
2026-10-12 17:29:04 +04:00
…
2026-10-21 09:26:26 +09:00
…
…
…
2026-10-25 08:24:14 +09:00
…
2026-10-26 07:24:36 +09:00
2026-10-14 23:21:22 +04:00
2026-10-22 07:40:01 +09:00
…
2026-10-26 07:24:36 +09:00
2026-10-16 14:31:39 +04:00
…
2026-10-11 00:55:58 +04:00
2026-10-16 14:31:39 +04:00
2026-10-10 23:18:09 +04:00
2026-10-14 23:21:22 +04:00
…
2026-10-11 15:55:57 +04:00