fix: warn instead of failing on oversized compact results
This commit is contained in:
@@ -88,7 +88,7 @@ pub const COMPACT_SUMMARY_TARGET_TOKENS: u64 = 2_000;
|
||||
/// See [`crate::CompactionConfig::summary_max_tokens`].
|
||||
pub const COMPACT_SUMMARY_MAX_TOKENS: u64 = 4_000;
|
||||
|
||||
/// Dry-run cap for the compacted session's initial request context.
|
||||
/// Warning threshold for the assembled compacted history. Compaction continues.
|
||||
/// See [`crate::CompactionConfig::result_context_max_tokens`].
|
||||
pub const COMPACT_RESULT_CONTEXT_MAX_TOKENS: u64 = 60_000;
|
||||
|
||||
|
||||
@@ -965,7 +965,9 @@ pub struct CompactionConfig {
|
||||
)]
|
||||
pub auto_read_budget_tokens: u64,
|
||||
|
||||
/// Dry-run cap for the compacted session's initial request context.
|
||||
/// Warning threshold for the assembled compacted history estimate, including
|
||||
/// retained items and auto-read files. Exceeding it does not abort compaction;
|
||||
/// request-time context safety checks still apply. `0` disables this warning.
|
||||
#[serde(default = "default_result_context_max_tokens")]
|
||||
pub result_context_max_tokens: u64,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user