pub fn estimate_context_tokens(messages: &[Message]) -> u64Expand description
Estimate total context tokens for a message history.
Uses a hybrid approach: actual API usage counts for the most recent assistant response, plus rough estimation for any messages added after that point.