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:
- Establish an empty item at original index
0and a later content-bearing item at original index1. - Build the filtered view. Assert that the sole visible item retains original index
1, despite appearing at display position0. - Apply a subsequent update targeting original index
1. Assert that it changes the later item and does not modify or recreate item0as the target. - 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.