Repository navigation
Agent bridge: web search and code execution items from Google and Mistral no longer reach Responses clients with an empty item id - #5375
Merged
Conversation
…ll items with an empty id
dragonstyle
approved these changes
Sep 14, 2026
dragonstyle
left a comment
Collaborator
There was a problem hiding this comment.
Verified empty and supplied IDs, web-search round-tripping, and streaming item-ID consistency on asyncio and Trio. The empty-ID regression fails without the fix. Approving.
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.
This PR contains:
What is the current behavior? (You can also link to an open issue here)
Fixes #5373
responses_output_items_from_assistant_messagecopiesContentToolUse.idstraight intoweb_search_callandcode_interpreter_calloutput items. Google code execution content hasid=""and mistral usesid or "", so a scaffold driving those models through the bridge over the Responses API gets items withid: "", and two of them in one turn can't be told apart by id.What is the new behavior?
When the content id is empty the bridge mints one with
uuid(), the same way the other output items in that function already get theirs. Non-empty ids pass through unchanged. The fix is in the bridge only; the providers and thetool_use_to_code_interpreter_paramhelper are untouched.Added
tests/agent/test_bridge_responses_output_items.py(two web search + two code execution items withid="", asserts non-empty unique ids). It fails onmainand passes with the fix. Note #5284 also creates this file, so whichever lands second will need a trivial rebase; happy to do that.Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No.
Other information:
Written with Claude Code (Claude Opus 5).
pytest tests/agent: 1554 passed, 1246 skipped, 0 failed; 84 errors, all tests writing to a read-only/tmpin my local sandbox, unrelated to this changeruff check/ruff format --check(0.9.6),mypyon the touched files,make suppressions-check: cleanSlow tests
Agent review
ensure_idkeeps a supplied id), google/mistral/OpenAI replay (none key on this id), and other callers oftool_use_to_code_interpreter_param(none)ws_prefix, matching the otheruuid()items in the same function)