pub async fn compact_history_with_budget(
provider: &dyn LLMProvider,
model: &str,
history: &[Message],
config: &CompactionConfig,
context_budget: Option<usize>,
) -> Result<Vec<Message>>Expand description
Compact conversation history using a caller-resolved context budget for input bounding and locally rebuilt output. Standalone native responses are returned as the provider’s canonical next context window.