pub fn extract_usage(root: &Value) -> AutomationUsageExpand description
Extract token usage from an OpenAI-compatible response.
The response format follows the OpenAI API structure:
{
"usage": {
"prompt_tokens": 123,
"completion_tokens": 456,
"total_tokens": 579
}
}Returns a default AutomationUsage if the usage field is missing or malformed.