Version 2.x to Latest
Breaking Changes in v2.0.0
Function Call Output Types
In v2.0.0, the output field for function tool calls now supports images and files in addition to strings: Before (v1.x):This change affects
ResponseFunctionToolCallOutputItem.output and ResponseCustomToolCallOutput.output.Version 1.x to 2.x
Package Compatibility
Version 2.x maintains backward compatibility for most features. Update your package:New Features in v2.x
Responses API Enhancements
Version 0.x to 1.x
Major Changes
Version 1.0 was a complete rewrite with many breaking changes:Client Initialization
Before (v0.x):Resource Structure
Before (v0.x):Error Handling
Before (v0.x):Async Support
Before (v0.x):Streaming
Before (v0.x):Migration Checklist
1
Update imports
Change from module-level functions to client-based API:
2
Update API calls
Migrate resource paths:
3
Update error handling
Error classes moved:
4
Update async usage
Use
AsyncOpenAI client:5
Test thoroughly
Test all API interactions in your application to ensure compatibility.
Python Version Support
Deprecated Features
Assistants API
The Assistants API is deprecated in favor of the Responses API: Deprecated:Getting Help
If you encounter issues during migration:- Check the CHANGELOG for detailed version changes
- Review the API Reference for current method signatures
- Visit the GitHub issues for community support
- See the examples directory for working code samples