Skip to content

FIX: keep Responses web search calls replayable and behind the answer - #3080

Open
Utkarsh Bahuguna (u7k4rs6) wants to merge 1 commit into
microsoft:mainfrom
u7k4rs6:fix/responses-web-search-replay
Open

Utkarsh Bahuguna (u7k4rs6) wants to merge 1 commit into
microsoft:mainfrom
u7k4rs6:fix/responses-web-search-replay

Conversation

@u7k4rs6

Copy link
Copy Markdown
Contributor

Fixes #3079.

  • Parse: store the whole web_search_call item (id, status, action) instead of just type and id.
  • Replay: send exactly the fields the input item takes. Older rows that only have type and id can't be made valid, so they're skipped with a warning instead of failing the whole request.
  • Order: tool records go after the text, same as reasoning, so get_value() is the answer again. Replay order doesn't change since top-level items are always emitted before the message item.

Same repro as the issue on this branch:

get_value(): PyRIT 0.13 is out.
replayed: {'id': 'ws_1', 'type': 'web_search_call', 'status': 'completed', 'action': {'type': 'search', 'query': 'pyrit release'}}

The old tests pinned the call_id/query shape, so I moved them to the real one. New tests: the answer is the response value, the replayed item matches the SDK param fields, and a legacy row gets skipped. They fail on main. tests/unit/prompt_target, backend, executor and score: 8853 passed (4 MCP/tool files didn't collect locally because httpx2 isn't installed; they don't touch this).

I didn't rerun the notebook since it needs the OpenAI endpoint, so its saved output still shows the old order.

This branch has not been deployed

No deployments
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.

BUG: Responses web search call becomes the response and breaks the next turn

1 participant