pub fn ensure_tool_result_pairing(messages: &mut Vec<Message>)
Ensure every tool_use block has a matching tool_result in the subsequent user message. Orphaned tool_use blocks cause API errors.