pub fn messages_to_api_params(messages: &[Message]) -> Vec<Value>
Convert messages to the API wire format (for sending to the LLM).