Repository navigation
fix: normalize Copilot reasoning stream IDs - #836
Closed
RealBhupesh wants to merge 1 commit into
Closed
RealBhupesh wants to merge 1 commit into
RealBhupesh wants to merge 1 commit into
Conversation
RealBhupesh
requested review from
Avtrkrb,
akramcodez and
will-lamerton
as code owners
August 10, 2026 02:08
3 tasks done
Member
|
Hey @RealBhupesh - thanks for this PR - closing due to an earlier PR that solves the issue is almost ready to merge! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
output_indexbefore AI SDK 6 parses the stream[DONE]eventsCloses #719
Root cause
GitHub Copilot can rotate the opaque
item_idacross events for one logical output while keepingoutput_indexstable.@ai-sdk/openai3.x keys active reasoning state by item ID, so the rotated ID triggers the reportedsummaryPartsdereference.NanoCoder already carries a pnpm patch, but published npm/Homebrew installations do not receive or apply it: the package publishes
distand selected assets, notpatches/orpnpm-workspace.yaml. That explains why the reporter reproduces the crash in releases containing the repository commit.The upstream SDK fixed the same live Copilot sequence in vercel/ai#18548 by correlating events through
output_index, but that correction is on the provider's next major line. This PR applies the narrow compatibility normalization only to NanoCoder's Copilot fetch path without a broad AI SDK migration.Validation
pnpm run test:formatpnpm run test:lintgit diff --checkCurrent branch CI will inherit the ACP SDK failure already on
mainuntil #830 merges.