Migrating to OpenAI Python SDK v2.0.0
Version v2.0.0 introduces 1 breaking change. This guide details how to update your code.
Released: 9/30/2025
1
Breaking Changes
1
Migration Steps
3
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
ResponseFunctionToolCallOutputItem.outputResponseCustomToolCallOutput.outputBatchUsageBreaking Changes
●Issue #1
ResponseFunctionToolCallOutputItem.output and ResponseCustomToolCallOutput.output now return a union type (string | Array<ResponseInputText | ResponseInputImage | ResponseInputFile>) instead of a plain string. Code assuming a string return type will fail.
Migration Steps
- 1Update logic handling ResponseFunctionToolCallOutputItem.output and ResponseCustomToolCallOutput.output to check if the value is a string or an array of input objects before processing.
Release Summary
This major release introduces support for multi-modal function call outputs (images and files) and BatchUsage, while changing the output type of tool call response items from string to a union type.
Need More Details?
View the full release notes and all changes for OpenAI Python SDK v2.0.0.
View Full Changelog