Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openai/openai-agents-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.0
Choose a base ref
...
head repository: openai/openai-agents-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.2.1
Choose a head ref
  • 12 commits
  • 44 files changed
  • 6 contributors

Commits on Jul 15, 2025

  1. Realtime: use SDK types for all messages (#1134)

    To ensure we are using correct events, using the realtime types from the
    openai sdk. Added conversion tests as well.
    
    
    
    
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    * #1135
    * __->__ #1134
    rm-openai authored Jul 15, 2025
    1 Configuration menu
    Copy the full SHA
    c7d50cb View commit details
    Browse the repository at this point in the history
  2. Realtime: introduce a demo without a UI (#1135)

    The UI demo is nice, but this let you print more logs to the console (at
    the cost of being ugly)
    rm-openai authored Jul 15, 2025
    Configuration menu
    Copy the full SHA
    6293d66 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2025

  1. Realtime: handoffs (#1139)

    ---
    [//]: # (BEGIN SAPLING FOOTER)
    * #1141
    * __->__ #1139
    rm-openai authored Jul 16, 2025
    Configuration menu
    Copy the full SHA
    479c171 View commit details
    Browse the repository at this point in the history
  2. Realtime: move demo audio to separate thread (#1141)

    Without this, the audio playback contends for CPU with the event queue
    and mic input, which is bad
    rm-openai authored Jul 16, 2025
    Configuration menu
    Copy the full SHA
    dff0548 View commit details
    Browse the repository at this point in the history
  3. MCP: add support for tool_result.structuredContent (#1150)

    MCP recently added `structuredContent` as an additional field in tool
    results. This lets us use that field when sending the response to the
    model.
    rm-openai authored Jul 16, 2025
    Configuration menu
    Copy the full SHA
    66e5be3 View commit details
    Browse the repository at this point in the history
  4. Correct error message for invalid output types with strict JSON schema (

    #1101)
    
    ### Problem
    1. **Incorrect parameter reference**: Suggests passing
    `output_schema_strict=False` to `Agent()`, but this parameter doesn't
    exist
    2. **Vague guidance**: The phrase "make the output type strict" doesn't
    explain HOW to make types strict
    
    ### Solution
    Updated 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>
    DanielHashmi and seratch authored Jul 16, 2025
    Configuration menu
    Copy the full SHA
    99ba260 View commit details
    Browse the repository at this point in the history
  5. Add Streaming of Function Call Arguments to Chat Completions (#999)

    ## Summary
    
    This PR implements real-time streaming of function call arguments as
    requested in #834. Previously, function call arguments were only emitted
    after the entire function call was complete, causing poor user
    experience for large parameter generation.
    
    ## Changes
    
    - **Enhanced `ChatCmplStreamHandler`**: Added real-time streaming of
    function call arguments during generation
    - **New streaming logic**: Function call arguments now stream
    incrementally as they are generated, similar to text content
    - **Backward compatibility**: Maintains existing behavior for completed
    function calls
    - **Comprehensive testing**: Added tests for both OpenAI and LiteLLM
    models
    - **Example implementation**: Created demonstration code showing the new
    streaming capability
    
    Closes #834
    devtalker authored Jul 16, 2025
    Configuration menu
    Copy the full SHA
    00c87ea View commit details
    Browse the repository at this point in the history
  6. Empty mcp tool result error (#1142)

    ### Summary
    
    Fixed `MCPUtil.invoke_mcp_tool()` to return `"[]"` instead of logging an
    error when MCP tools return empty content. Empty results (`None, []`)
    are valid outputs and should be treated consistently with
    function tools. The `None -> "[]"` and `[] -> "[]"` behavior comes from
    the 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 FastMCP
    edge cases
      - Enhanced FakeMCPServer to support custom content testing scenarios
      - Ran full test suite - all tests pass
      - Verified the fix handles `None, [], {}, [{}], [[]]` cases correctly
    
      ### Issue number
    
      Closes #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 pass
    
    Co-authored-by: thein <thein@MacBook-Pro.local>
    thoo and thein authored Jul 16, 2025
    Configuration menu
    Copy the full SHA
    076eb72 View commit details
    Browse the repository at this point in the history
  7. Unbreak tests (#1157)

    Breakage from #1142
    rm-openai authored Jul 16, 2025
    Configuration menu
    Copy the full SHA
    f63cc0c View commit details
    Browse the repository at this point in the history
  8. Realtime: web demo (#1149)

    Add a web demo that uses a fastapi backend. Also remove the CLI UI demo.
    rm-openai authored Jul 16, 2025
    Configuration menu
    Copy the full SHA
    32997b2 View commit details
    Browse the repository at this point in the history
  9. Realtime docs (#1153)

    Documentation (both written and code)
    rm-openai authored Jul 16, 2025
    Configuration menu
    Copy the full SHA
    bbbcdae View commit details
    Browse the repository at this point in the history
  10. v0.2.1 (#1151)

    rm-openai authored Jul 16, 2025
    Configuration menu
    Copy the full SHA
    aeb4381 View commit details
    Browse the repository at this point in the history
Loading