aboutsummaryrefslogtreecommitdiff
path: root/modules/core/module-ollama.js
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-23 21:43:45 +0200
committerAgando <roduccomm@gmail.com>2026-10-23 21:43:45 +0200
commit5b05af91fa3fcc9ae7aff00feedc26d062babbc2 (patch)
tree7060f31c71275ad64a22a8ccdab3260ea42d3208 /modules/core/module-ollama.js
parentd5b6e6f12c8c3c4551050f8fc7d19fb78d6b581b (diff)
feat(newos4): context window warns at 80% and says what trimming dropped (v4.6.91)
P0-5 asked what to do about a 422k-token session against a 400k threshold. There is no 400k threshold in this tree — the budgets are maxContextTokens (12000) and maxContext*2 messages — so rather than chase a number that does not exist, this applies the decision that is defensible either way: warn before the cliff, never lose history without saying so. - 80% of the token budget prints one warning per crossing (no per-turn nagging) - the message-count trim unshifts a marker naming how many messages left the window and quoting the earliest one, instead of splicing them away silently - 'max-context-tokens (default: 2000)' now reports the real code default, 12000 Verified: 900/1000 tokens -> warns once, second call silent; 1500/1000 -> compresses to 17 messages with the summary head intact; 9-message window with maxContext=2 -> 4 messages, marker '[context trim: 6 earlier message(s) ... earliest was: "turn 0 ..."]'.
Diffstat (limited to 'modules/core/module-ollama.js')
0 files changed, 0 insertions, 0 deletions