pub struct FailedCompaction {
pub error: Error,
pub llm_usage: TokenUsage,
}Expand description
A failed compaction attempt, carrying the provider-billed usage of any summarization LLM calls that were already made before the failure.
Surfaced by ContextCompactor::compact_history_with_usage so the agent
loop can fold billed-but-wasted summarization spend into the run’s
cumulative usage even when the history is left uncompacted (guardrail
block, truncation-retry error, replace_history failure).
Fields§
§error: ErrorWhy the compaction attempt failed.
llm_usage: TokenUsageUsage billed by summarization calls made before the failure (zero when the failure preceded any LLM call).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FailedCompaction
impl RefUnwindSafe for FailedCompaction
impl Send for FailedCompaction
impl Sync for FailedCompaction
impl Unpin for FailedCompaction
impl UnsafeUnpin for FailedCompaction
impl UnwindSafe for FailedCompaction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more