Sanjays2402
570f8bab8f
fix(compression): exclude completion tokens from compression trigger ( #12026 )
...
Cherry-picked from PR #12481 by @Sanjays2402.
Reasoning models (GLM-5.1, QwQ, DeepSeek R1) inflate completion_tokens
with internal thinking tokens. The compression trigger summed
prompt_tokens + completion_tokens, causing premature compression at ~42%
actual context usage instead of the configured 50% threshold.
Now uses only prompt_tokens — completion tokens don't consume context
window space for the next API call.
- 3 new regression tests
- Added AUTHOR_MAP entry for @Sanjays2402
Closes #12026
2026-04-20 05:12:10 -07:00
..
2026-04-07 17:19:07 -07:00
2026-04-17 14:21:22 -07:00
2026-04-17 14:21:22 -07:00
2026-04-17 12:32:03 -07:00
2026-04-17 12:32:03 -07:00
2026-04-10 13:38:14 -07:00
2026-04-07 17:19:07 -07:00
2026-04-07 17:19:07 -07:00
2026-04-07 17:19:07 -07:00
2026-04-19 11:23:00 -07:00
2026-04-19 22:43:09 -07:00
2026-04-19 22:43:09 -07:00
2026-04-19 22:43:09 -07:00
2026-04-15 13:16:28 -07:00
2026-04-07 17:19:07 -07:00
2026-04-20 00:56:04 -07:00
2026-04-17 12:32:03 -07:00
2026-04-20 05:12:10 -07:00
2026-04-07 17:19:07 -07:00
2026-04-19 12:39:58 -07:00
2026-04-19 11:23:00 -07:00
2026-04-17 12:32:03 -07:00
2026-04-19 11:44:43 -07:00
2026-04-17 12:32:03 -07:00
2026-04-13 10:50:24 -07:00
2026-04-17 14:21:22 -07:00
2026-04-17 14:21:22 -07:00
2026-04-08 18:55:33 -07:00
2026-04-07 17:19:07 -07:00
2026-04-15 13:29:57 -07:00
2026-04-15 22:05:21 -07:00
2026-04-07 17:19:07 -07:00
2026-04-18 22:50:55 -07:00
2026-04-07 17:19:07 -07:00
2026-04-10 03:44:43 -07:00
2026-04-17 12:32:03 -07:00
2026-04-10 03:21:24 -07:00
2026-04-17 12:32:03 -07:00
2026-04-17 18:47:01 -07:00
2026-04-13 10:50:24 -07:00
2026-04-07 17:19:07 -07:00
2026-04-17 14:21:22 -07:00
2026-04-20 04:16:13 -07:00
2026-04-20 00:32:06 -07:00
2026-04-16 16:36:33 -07:00
2026-04-07 17:19:07 -07:00
2026-04-07 17:19:07 -07:00
2026-04-18 04:17:18 -07:00
2026-04-19 19:18:19 -07:00
2026-04-07 17:19:07 -07:00
2026-04-10 05:52:45 -07:00
2026-04-17 12:32:03 -07:00
2026-04-07 17:19:07 -07:00
2026-04-15 15:03:28 -07:00