Skip to content

fix(ai): recover missing reasoning item ids - #44794

Open
rekram1-node wants to merge 3 commits into
v2from
reasoning-item-ids
Open

fix(ai): recover missing reasoning item ids#44794
rekram1-node wants to merge 3 commits into
v2from
reasoning-item-ids

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • track Responses reasoning items by their wire output index when a provider omits the item ID
  • reuse deterministic local block identities across summary parts, deltas, finals, and item completion
  • retain provider-issued IDs separately when they arrive later, including subsequent events without an output index
  • reject reasoning item boundaries that provide neither an item ID nor an output index

Scope

This PR only repairs reasoning stream identity. Final-item text reconciliation and terminal encrypted-content backfill remain separate follow-ups.

Verification

  • bun run typecheck
  • OpenAI Responses tests
  • generic Open Responses compatibility tests
  • xAI Responses tests

All 123 focused tests pass.

Keep reasoning streams coherent when compatible providers omit item IDs. Synthetic IDs remain internal, while provider-issued IDs are retained for safe replay when they arrive later.
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.

1 participant