Hiding empty response items must not renumber your stream state

If your response-stream adapter hides empty items, keep that filtering out of the index space used to apply updates. A row’s position in the visible list should not become its stream identity.

The OpenAI Python v3.14.0 release notes, dated September 14, 2026, list a specific bug fix: “preserve response stream indexes after empty items,” linking issue #3126 and commit 8f84fbd. That is a useful prompt to inspect your own adapter’s mapping—not evidence that UI filtering caused the SDK bug.

Keep two coordinate systems

My recommendation is to maintain response state under the original stream item indices, then derive the visible list from that state. Every visible entry should retain its original index, even if its display position changes.

Consider this synthetic adapter example, not an API payload or a reproduction of the reported bug:

Original stream index Adapter item Display position after filtering
0 Empty; hidden by the application Not displayed
1 Content the application displays 0

The visible row at position 0 still represents stream item 1. If the adapter treats the compacted list as its stream-state array, it has conflated two coordinates. An update addressed to original index 1 must still resolve to that item, not to whatever occupies display position 1.

The design rule is straightforward: apply updates using the original index; filter when building the view. If a UI callback starts with a display position, resolve it through the retained mapping before touching response state. Hiding an item need not mean discarding its place in that mapping.

This is an application-design recommendation, not a description of how the SDK implements the fix.

A regression fixture worth adding

Propose a small test at the adapter boundary, using the event contract your adapter actually consumes:

  1. Establish an empty item at original index 0 and a later content-bearing item at original index 1.
  2. Build the filtered view. Assert that the sole visible item retains original index 1, despite appearing at display position 0.
  3. Apply a subsequent update targeting original index 1. Assert that it changes the later item and does not modify or recreate item 0 as the target.
  4. Build both filtered and unfiltered views of the resulting state. Assert that visibility changes, but the updated item’s original index and content do not.

These are proposed assertions, not executed test results. The sequence is schematic rather than a documented wire-event format. An SDK upgrade alone is not a passing result for custom adapter code that renumbers items afterward.

The release notes do not spell out every affected event shape, what counts as an empty item in each case, the precise failure mechanism, or the full range of affected earlier versions. They also establish no provider or model compatibility guarantee. Keep the conclusion narrow: inspect the boundary where stream state becomes a filtered list, and test that removing a row from view never changes where subsequent updates land.

For a model evaluation that consumes this filtered output, I would make adapter integrity a separate result from answer quality. A misaddressed update is not enough evidence to mark the model’s answer wrong, but silently dropping that run from the report would hide an application failure.

I’d extend the proposed fixture with an assertion at the evaluator boundary: does the scorer receive the expected content from the expected original item? Checking only the final concatenated text is weaker than checking item attribution; a synthetic test could preserve the same text while assigning it to the wrong item.

For that test, replay one fixed synthetic sequence through the adapter and keep the scorer unchanged. Use distinguishable content for the items, assert the expected item-to-content mapping independently of the adapter, and check what reaches the scorer. A second live model call would change the generated input as well, making it a poor control for isolating an adapter defect.

I would report mapping failures as a separate count alongside answer-quality results, with the total attempted cases visible. After fixing the adapter, replay those cases before drawing a model-quality conclusion. This is a proposed evaluation method, not a measured failure rate or a reproduction of the SDK issue. The linked v3.14.0 release note supports the index-preservation concern; it does not establish that any particular model’s evaluation results were affected.