Commit graph

3 commits

Author SHA1 Message Date
David Brailovsky
27075fe075 fix(ai): estimate request context at 3.5 characters per token
Increase estimated input size to leave more room when calculating
output limits. Verified against OpenRouter DeepSeek V4 Flash: the
same large input now succeeds with an explicit output limit.

Fixes #10497
2026-10-06 17:37:24 +02:00
Armin Ronacher
9e05370b29
Mid conversation system messages (#9548)
This change makes system prompt text and tool changes part of the transcript rather than silently rewriting its starting conditions. This lets Pi record when instructions changed or tools became available, restore that state after resuming or navigating branches, and preserve cached prompt prefixes where the upstream supports it.
2026-09-16 15:54:07 +02:00
Mario Zechner
8973ae28ab fix(ai): ignore stale usage after compaction
closes #6464
2026-07-09 21:44:53 +02:00