Differences between `.parse()` and `.create()`
mainThe chat.completions.parse() method imposes stricter constraints than the standard chat.completions.create() method:
- Error Handling: If the completion finishes due to
lengthorcontent_filter, the SDK will raiseLengthFinishReasonErrororContentFilterFinishReasonErrorinstead of returning a standard completion object. - Tool Strictness: Only strict function tools are supported (e.g., tools where
"strict": Trueis explicitly set).