Streaming with Web Search Tool has missing chunks

The response API with web search tool produces incomplete, disordered and duplicate chunks.

When using the openAI playground this is a sample event stream that is produced:

event: response.output_text.delta
data: {"type":"response.output_text.delta","sequence_number":204,"item_id":"msg_68768a6338548193946470669deb8f26005eb134dce5d9cd","output_index":3,"content_index":0,"delta":" benchmarks","logprobs":[]}

event: response.output_text.delta
data: {"type":"response.output_text.delta","sequence_number":205,"item_id":"msg_68768a6338548193946470669deb8f26005eb134dce5d9cd","output_index":3,"content_index":0,"delta":" ","logprobs":[]}

event: response.output_text.delta
data: {"type":"response.output_text.delta","sequence_number":206,"item_id":"msg_68768a6338548193946470669deb8f26005eb134dce5d9cd","output_index":3,"content_index":0,"delta":".","logprobs":[]}

event: response.output_text.delta
data: {"type":"response.output_text.delta","sequence_number":207,"item_id":"msg_68768a6338548193946470669deb8f26005eb134dce5d9cd","output_index":3,"content_index":0,"delta":" Just","logprobs":[]}

event: response.output_text.delta
data: {"type":"response.output_text.delta","sequence_number":208,"item_id":"msg_68768a6338548193946470669deb8f26005eb134dce5d9cd","output_index":3,"content_index":0,"delta":"ikipedia.org](https://en.wikipedia.org/wiki/2025_in_artificial_intelligence?utm_source=chatgpt.com)). Just days","logprobs":[]}

event: response.output_text.annotation.added
data: {"type":"response.output_text.annotation.added","sequence_number":209,"item_id":"msg_68768a6338548193946470669deb8f26005eb134dce5d9cd","output_index":3,"content_index":0,"annotation_index":0,"annotation":{"type":"url_citation","end_index":556,"start_index":450,"title":"2025 in artificial intelligence","url":"https://en.wikipedia.org/wiki/2025_in_artificial_intelligence?utm_source=chatgpt.com"}}

event: response.output_text.delta
data: {"type":"response.output_text.delta","sequence_number":210,"item_id":"msg_68768a6338548193946470669deb8f26005eb134dce5d9cd","output_index":3,"content_index":0,"delta":" later","logprobs":[]}

Notice when stitching the deltas you get:
benchmarks. Justikipedia.org](https://en.wikipedia.org/wiki/2025_in_artificial_intelligence?utm_source=chatgpt.com)). Just days... which is an invalid markdown.

The correct result should be:
benchmarks. ([wikipedia.org](https://en.wikipedia.org/wiki/2025_in_artificial_intelligence?utm_source=chatgpt.com)). Just days...

It is missing ([w and it has Just repeated twice.

I have attached the full Event Stream.
Note, somehow the playground correctly renders this. I would like to know how it knows to fix these broken chunks.

resp_68768a440e8081938a12dd14fc24ecea005eb134dce5d9cd

1 Like

Well this is from OpenAI playground and inspecting the request’s event stream inside network tab. So following the documentation does not apply.

It happens occasionally and is fairly non-consistent.

ah, interesting, there must be a bug on the playground then, i imagined it was on the api, hopefully it gets fixed soon, not much the community can do i guess

The API also has these issues once in a while. That’s how I found out about it and tested on the playground. There are other people who have posted the same exact issues as well. No response from OpenAI so far.

1 Like