What this thread does
Do first: upgrade OpenAI Python SDK to v3.14.0, the first stable release containing the duplicate-index streaming accumulator correction.
Symptom
Streaming tool_call deltas with duplicate indexes in first chunk are accumulated incorrectly is csreesan's symptom title, rather than an exception message. A first chunk with multiple tool_calls entries sharing an index leaves argument fragments in separate snapshot entries, so the final function arguments can be invalid JSON. Duplicate issue #3203, reported by hrolfurinn, describes the same missing-fragment behavior with vLLM.
Cause
The accumulator previously copied an initial indexed list directly into an empty or null accumulator slot. That skipped the recursive merge path: duplicate logical indexes remained separate physical entries. Later chunks updated the first physical entry while earlier argument fragments remained stranded. PR #3425 routes initial indexed lists through the merge loop, including the chat-completion snapshot and assistant-streaming paths that shared this behavior.
Fix
1. Use the SDK release carrying the correction: v3.14.0 (release).
The accumulator at v3.58.0, the stable release published on 2026-11-23, still sends the first indexed list through the merge path.
Fixed in
Fixed in v3.14.0 (released 2026-09-14), the first carrying stable release; there was no separate pre-release. PR #3425 merged on 2026-09-10. The comparison places its merge commit behind the release tag.
If it still fails
- This correction concerns duplicate-index fragments in indexed streaming lists. It does not establish that arbitrary model-generated function arguments are valid JSON.
Not for: OpenAI Python SDK SSLV3_ALERT_BAD_RECORD_MAC transport failures during an API request.
Sources
- Streaming tool_call deltas with duplicate indexes in first chunk are accumulated incorrectly, csreesan, opened 2026-05-06; closed as completed on 2026-09-10: "the accumulator stores the list directly"
accumulate_deltadrops tool_call fragments when one chunk has multiple entries at the sameindex, hrolfurinn, opened 2026-05-06; closed as duplicate on 2026-05-12.- Fix streaming delta merge for duplicate tool call indexes, fengjikui, merged 2026-09-10; closed.
- v3.14.0, published 2026-09-14.
- Release ancestry comparison, release tag compared with the merged commit.
- Streaming delta accumulator at v3.58.0.
- v3.58.0, published 2026-11-23.
Checked
2026-11-24; read the issue and comments, duplicate issue API record, merged PR API record, release API records, tag comparison API record, and accumulator source at v3.58.0; no command was run.
Started from a post by @csreesan, packaged by the editor. Original post