releaseintermediate
[Release] openai/openai-agents-python v0.9.0: v0.9.0
By seratchgithub
View original on githubOpenAI Agents Python SDK v0.9.0 drops Python 3.9 support and introduces configurable timeout handling for function tools with options for timeout_seconds, timeout_behavior, and timeout_error_function. The release also narrows the Agent#as_tool() return type to FunctionTool, adds ToolOutputTrimmer for context management, and includes fixes for tracing and audio buffer handling.
Key Points
- •Drop Python 3.9 support — upgrade to Python 3.10 or newer as Python 3.9 reached end-of-life
- •Add configurable timeout handling for function tools with three new parameters: timeout_seconds, timeout_behavior, and timeout_error_function
- •Choose timeout behavior between 'error_as_result' (default) or 'raise_exception' for function tool failures
- •Agent#as_tool() return type narrowed from Tool to FunctionTool — may require code adjustments if relying on broader union types
- •Introduce ToolOutputTrimmer feature for smart context management to optimize token usage
- •Fix trace metadata propagation to spans for processors to improve observability and debugging
- •Resolve odd-length audio buffer handling in StreamedAudioResult for more robust voice processing
Found this useful? Add it to a playbook for a step-by-step implementation guide.
Workflow Diagram
Start Process
Step A
Step B
Step C
Complete
Concepts
Artifacts (1)
Function Tool Timeout Configurationpythonconfig
timeout_seconds: float | None
timeout_behavior: ToolTimeoutBehavior = "error_as_result" # or "raise_exception"
timeout_error_function: ToolErrorFunction | None