Skip to content

fix: enhance OpenAI streaming events with new response types and handling (gpt-5.5)#118

Open
gaki2 wants to merge 3 commits into
lazy-hq:mainfrom
gaki2:feat/branch_test
Open

fix: enhance OpenAI streaming events with new response types and handling (gpt-5.5)#118
gaki2 wants to merge 3 commits into
lazy-hq:mainfrom
gaki2:feat/branch_test

Conversation

@gaki2

@gaki2 gaki2 commented May 6, 2026

Copy link
Copy Markdown
Contributor

Background

When using gpt-5.5, the OpenAI streaming response included additional event types such as response.created, response.in_progress, and response.content_part.added. These events were not fully supported in the current stream handling logic, which caused the response flow to break and resulted in errors.

Changes

  • Added support for newly observed OpenAI streaming event types:
    • response.created
    • response.in_progress
    • response.content_part.added
    • response.content_part.done
  • Updated streaming handling in the OpenAI language model implementation to safely ignore non-output lifecycle events and correctly initialize text output when response.content_part.added is received
  • Adjusted related stream tests to reflect the updated event sequence
  • Included minor cleanup changes from formatting and clippy fixes

Expected Result

  • gpt-5.5 streaming responses are handled correctly
  • Text output starts at the proper point in the event flow
  • The previous runtime error caused by unhandled response events no longer occurs
    Closes #[issue_number]

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I have read the Contributing Guidelines.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

@gaki2

gaki2 commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

Hi @ishaksebsib . Could you review my PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant