Python: Add streaming support for code interpreter deltas#3775
Merged
giles17 merged 4 commits intomicrosoft:mainfrom Feb 10, 2026
Merged
Python: Add streaming support for code interpreter deltas#3775giles17 merged 4 commits intomicrosoft:mainfrom
giles17 merged 4 commits intomicrosoft:mainfrom
Conversation
Member
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Python-side streaming support for OpenAI Responses API code interpreter code delta/done events so code snippets appear in ChatResponseUpdate.contents during streaming (addressing #3683).
Changes:
- Handle
response.code_interpreter_call_code.deltaandresponse.code_interpreter_call_code.donein_parse_chunk_from_openai()by emittingcode_interpreter_tool_callcontent. - Add unit tests covering parsing of these new streaming event types.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
python/packages/core/agent_framework/openai/_responses_client.py |
Adds parsing for code interpreter code delta/done stream events into Content.from_code_interpreter_tool_call(...). |
python/packages/core/tests/openai/test_openai_responses_client.py |
Adds tests ensuring delta/done events produce code_interpreter_tool_call contents with text inputs. |
python/packages/core/agent_framework/openai/_responses_client.py
Outdated
Show resolved
Hide resolved
dmytrostruk
approved these changes
Feb 10, 2026
markwallace-microsoft
approved these changes
Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Adds handlers for code interpreter streaming events so that code snippets are surfaced in the
Contentscollection during streaming.Contributes to #3683 (Python side)
Description
Contribution Checklist