Commit Graph
39 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek 0e59b66afc refac 2026-11-16 19:43:06 +09:00
Timothy Jaeryang Baek 6afb1681c9 refac 2026-11-16 19:38:00 +09:00
Timothy Jaeryang Baek 4720ff19e7 refac 2026-11-13 17:36:00 +09:00
Timothy Jaeryang Baek ebdead036e refac 2026-11-12 22:20:10 +09:00
Classic298 64471947ab fix: a compaction during a tool run drops the earlier conversation summary (#34151)
When a turn started from an existing summary and its reply then compacted again between tool calls, the new summary was written without the earlier one whenever the plain summary prompt was used (a model with a filter, a separate Context Compaction Model, or a provider that refuses the cached replay). From the next turn on, everything the earlier summary held was gone. That compaction now gets the turn's summary as its previous summary, as a compaction at the start of a turn already does.

Fixes #34141
2026-11-12 21:52:18 +09:00
Classic298 87d148e9cb fix: /compact makes the next message larger after a long tool-calling reply (#33912)
Context compaction can already run partway through a long reply that calls many tools. If /compact was used after such a reply, the next message sent the model every tool call and result from that reply again, so the request grew instead of shrinking and could go past the model's context limit. Now the model gets the same shortened history it got before /compact, plus the new summary. Nothing changes in the saved chat or in what the chat shows.

Fixes #33911
2026-11-08 18:38:14 +09:00
Classic298 275e0f40e5 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.
2026-11-05 06:43:07 +09:00
Timothy Jaeryang Baek a8b478ed7b refac 2026-11-03 17:17:59 +09:00
Timothy Jaeryang Baek d5cd7f4907 refac 2026-10-21 09:26:26 +09:00
Classic298 56eca192ab feat: context compaction now runs on chats with few messages that are over the threshold (#32794)
Context compaction summarizes older messages and keeps the most recent ones verbatim, splitting the chat at a user message. It skipped the chat whenever the first follow-up message sat too close to the end to keep the share set in the Retained Messages admin setting. So a fresh chat with one question and one reply carrying a lot of tool output never compacted: the follow-up failed with a context length error, and regenerating or editing that follow-up failed the same way. Now compaction splits at the first follow-up message in that case, keeping fewer messages than Retained Messages asks for, so the chat keeps working. Chats where a split already met that share compact as before, and compaction between tool calls is unchanged.

Fixes #32781
2026-10-21 08:35:13 +09:00
Timothy Jaeryang Baek bcf540a989 refac 2026-10-14 18:35:56 +04:00
Timothy Jaeryang Baek 67cfa917c1 refac 2026-10-10 23:02:39 +04:00
Classic298 95dd3321af fix: images stored inside a chat trigger needless context compaction (#31915)
Images stored inside the chat record itself (chats from older versions, images that could not be saved as files, temporary chats) had their encoded data counted as text when estimating how full the context is, so a single 3 MB image counted as about a million tokens. That pushed the chat over the compaction threshold, summarizing older messages while the chat was well under the limit, and made the context usage indicator jump. The encoded image data is now left out of the token estimate, both for compaction and for the indicator.

Fixes #31913
2026-10-05 06:41:50 +04:00
Timothy Jaeryang Baek 5093a99389 refac 2026-08-23 13:36:53 -04:00
Timothy Jaeryang Baek 0b27fa5e87 refac 2026-08-17 00:57:57 -07:00
Timothy Jaeryang Baek f0bfcd4097 refac 2026-08-11 01:15:05 -06:00
Timothy Jaeryang Baek bb0f898b43 refac 2026-07-31 17:41:14 -04:00
Timothy Jaeryang Baek 69e449e318 refac 2026-07-27 03:05:26 -04:00
Timothy Jaeryang Baek 44f4f9dce4 refac 2026-07-27 03:00:37 -04:00
Timothy Jaeryang Baek 15688686af refac 2026-07-27 03:00:04 -04:00
Timothy Jaeryang Baek e8f2c123e6 refac 2026-07-27 01:13:09 -04:00
Timothy Jaeryang Baek 20647bd2d5 chore: format 2026-07-27 00:12:47 -04:00
Timothy Jaeryang Baek 71c4da8c06 refac 2026-07-26 21:12:14 -04:00
Timothy Jaeryang Baek df94268e89 refac 2026-07-26 18:54:07 -04:00
Timothy Jaeryang Baek 1f5b0d816f refac 2026-07-24 01:19:28 -04:00
Timothy Jaeryang Baek cf887b68ea refac 2026-07-23 02:54:56 -04:00
Timothy Jaeryang Baek 49e57f4e7e chore: format 2026-07-20 22:11:42 -04:00
Timothy Jaeryang Baek 75894161e4 refac 2026-07-16 02:35:44 -04:00
Timothy Jaeryang Baek 7a9928ef17 refac 2026-07-14 23:08:41 -04:00
Timothy Jaeryang Baek a9617ca218 refac 2026-07-14 01:15:29 -04:00
Timothy Jaeryang Baek 0c23466a3e refac 2026-07-13 23:46:28 -04:00
Timothy Jaeryang Baek 17e6496538 refac 2026-07-13 23:28:43 -04:00
Timothy Jaeryang Baek 959558fd82 refac 2026-07-13 23:27:54 -04:00
Timothy Jaeryang Baek 5c389ad93f refac 2026-07-09 17:33:30 -05:00
Timothy Jaeryang Baek 44c2a27ce0 refac 2026-07-09 16:20:19 -05:00
Timothy Jaeryang Baek 517cd8d102 refac 2026-06-29 13:03:14 -05:00
Timothy Jaeryang Baek 8934bfb04b refac 2026-06-24 14:13:58 +02:00
Timothy Jaeryang Baek 7f08376f0c refac 2026-06-23 23:18:05 +02:00
Timothy Jaeryang Baek 3f0c0e0a0d refac 2026-06-19 00:16:06 +02:00