pub fn parse_sse_usage(bytes: &[u8]) -> Option<Usage>Expand description
Extract the terminal usage from an SSE stream’s bytes. OpenAI emits a final
data: {…, "usage": {…}} frame when the client sets stream_options.include_usage; earlier
frames carry "usage": null. Returns the last non-empty usage seen (the authoritative
totals), or None if the stream never reported usage.