pub fn is_overflow(
total_tokens: usize,
model_context: u32,
max_output: u32,
auto_enabled: bool,
) -> boolExpand description
Returns true when the conversation history exceeds the usable context window.
Compaction is skipped when:
auto_enabledisfalsemodel_contextis 0 (no context limit)
§Arguments
total_tokens- Estimated tokens in the full message history.model_context- The model’s maximum context window (0 = unlimited).max_output- The model’s maximum output tokens.auto_enabled- Whether automatic compaction is enabled.