Skip to content

Python: Add OpenAI's sequence_number attribute to unit tests based on their latest package#12227

Merged
eavanvalkenburg merged 2 commits intomicrosoft:mainfrom
moonbox3:update-responses-agent-model
May 22, 2025
Merged

Python: Add OpenAI's sequence_number attribute to unit tests based on their latest package#12227
eavanvalkenburg merged 2 commits intomicrosoft:mainfrom
moonbox3:update-responses-agent-model

Conversation

@moonbox3
Copy link
Collaborator

@moonbox3 moonbox3 commented May 21, 2025

Motivation and Context

OpenAI released a new python package (1.81.0) which has some updates to the underlying Pydantic models for the Responses API. We need to pull in a new change for ResponseOutputItemDoneEvent, ResponseOutputItemAddedEvent, and ResponseTextDeltaEvent for streaming invocation which now has sequence_number attribute.

Description

Bring in a change from OpenAI's Python SDK from v1.81.0 related to SK's OpenAIResponsesAgent.

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner May 21, 2025 22:58
@moonbox3 moonbox3 changed the title Python: Add OpenAI's sequence_number attribute based on their latest package Python: Add OpenAI's sequence_number attribute to unit tests based on their latest package May 21, 2025
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label May 21, 2025
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented May 21, 2025

Python Unit Test Overview

Tests Skipped Failures Errors Time
3595 18 💤 0 ❌ 0 🔥 1m 39s ⏱️

@moonbox3 moonbox3 requested a review from Copilot May 22, 2025 00:26
@moonbox3 moonbox3 self-assigned this May 22, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates the new OpenAI Python SDK changes for version 1.81.0 by incorporating the sequence_number attribute into unit test events for streaming invocation.

  • Added sequence_number=0 to instances of ResponseOutputItemDoneEvent, ResponseOutputItemAddedEvent, and related events in the tests.

@moonbox3 moonbox3 disabled auto-merge May 22, 2025 01:25
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue May 22, 2025
Merged via the queue into microsoft:main with commit 0eec353 May 22, 2025
28 checks passed
@github-project-automation github-project-automation bot moved this to Sprint: Done in Semantic Kernel May 22, 2025
jcruzmot-te pushed a commit to thousandeyes/aia-semantic-kernel that referenced this pull request Sep 15, 2025
… their latest package (microsoft#12227)

### Motivation and Context

OpenAI release a new python package (1.81.0) which has some updates to
the underlying Pydantic models for the Responses API. We need to pull in
a new change for `ResponseOutputItemDoneEvent`,
`ResponseOutputItemAddedEvent`, and `ResponseTextDeltaEvent` for
streaming invocation which now has `sequence_number` attribute.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Bring in a change from OpenAI's Python SDK from v1.81.0 related to SK's
OpenAIResponsesAgent.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests for the Python Semantic Kernel

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants