pub fn classify_completion_failure(body: Option<&str>) -> FailureClassExpand description
Classify a non-streaming completion body that failed acceptance: empty
content → EmptyCompletion, truncated (finish_reason “length”) →
TruncatedCompletion, invalid JSON → InvalidJson, wrong shape →
InvalidChatCompletionShape, missing/null finish reason →
MissingFinishReason, else Unknown.