- Notifications
You must be signed in to change notification settings - Fork2k
Comparing changes
Open a pull request
base repository:openai/openai-agents-python
Uh oh!
There was an error while loading.Please reload this page.
base:v0.2.0
head repository:openai/openai-agents-python
Uh oh!
There was an error while loading.Please reload this page.
compare:v0.2.1
- 12commits
- 44files changed
- 6contributors
Commits on Jul 15, 2025
Realtime: introduce a demo without a UI (#1135)
The UI demo is nice, but this let you print more logs to the console (atthe cost of being ugly)
Commits on Jul 16, 2025
Realtime: move demo audio to separate thread (#1141)
Without this, the audio playback contends for CPU with the event queueand mic input, which is bad
MCP: add support for tool_result.structuredContent (#1150)
MCP recently added `structuredContent` as an additional field in toolresults. This lets us use that field when sending the response to themodel.
Correct error message for invalid output types with strict JSON schema (
#1101)### Problem1. **Incorrect parameter reference**: Suggests passing`output_schema_strict=False` to `Agent()`, but this parameter doesn'texist2. **Vague guidance**: The phrase "make the output type strict" doesn'texplain HOW to make types strict### SolutionUpdated the error message to provide accurate, actionable guidance:**Before:**```"Either make the output type strict, or pass output_schema_strict=False to your Agent()"```**After:**```"Either use a dataclass, Pydantic model, or TypedDict, or wrap your type with AgentOutputSchema(your_type, strict_json_schema=False)"```---------Co-authored-by: Kazuhiro Sera <seratch@openai.com>
Add Streaming of Function Call Arguments to Chat Completions (#999)
## SummaryThis PR implements real-time streaming of function call arguments asrequested in#834. Previously, function call arguments were only emittedafter the entire function call was complete, causing poor userexperience for large parameter generation.## Changes- **Enhanced `ChatCmplStreamHandler`**: Added real-time streaming offunction call arguments during generation- **New streaming logic**: Function call arguments now streamincrementally as they are generated, similar to text content- **Backward compatibility**: Maintains existing behavior for completedfunction calls- **Comprehensive testing**: Added tests for both OpenAI and LiteLLMmodels- **Example implementation**: Created demonstration code showing the newstreaming capabilityCloses#834
Empty mcp tool result error (#1142)
### SummaryFixed `MCPUtil.invoke_mcp_tool()` to return `"[]"` instead of logging anerror when MCP tools return empty content. Empty results (`None, []`)are valid outputs and should be treated consistently withfunction tools. The `None -> "[]"` and `[] -> "[]"` behavior comes fromthe MCP Python SDK's[ FastMCP implementation](https://github.com/modelcontextprotocol/python-sdk/blob/6566c08446ad37b66f1457532c7f5a14f243ae10/src/mcp/server/fastmcp/utilities/func_metadata.py#L500). ### Test plan- Added comprehensive test coverage in`test_mcp_fastmcp_behavior_verification()` that verifies all FastMCPedge cases - Enhanced FakeMCPServer to support custom content testing scenarios - Ran full test suite - all tests pass - Verified the fix handles `None, [], {}, [{}], [[]]` cases correctly ### Issue numberCloses#1035 ### Checks - [x] I've added new tests (if relevant) - [ ] I've added/updated the relevant documentation - [x] I've run `make lint` and `make format` - [x] I've made sure tests passCo-authored-by: thein <thein@MacBook-Pro.local>
Add a web demo that uses a fastapi backend. Also remove the CLI UI demo.
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:git diff v0.2.0...v0.2.1
Uh oh!
There was an error while loading.Please reload this page.