You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Cannot read properties of undefined (reading 'summaryParts') when using Github Copilot with GPT-5.3 Codex #719
I dug into this and confirmed the root cause is actually upstream in @ai-sdk/openai, not in nanocoder itself. GitHub Copilot's Responses-API proxy for gpt-5.3-codex emits reasoning-summary stream events (response.reasoning_summary_part.added/.done) without a matching preceding response.output_item.added event (or with a mismatched item_id). The SDK's streaming handler assumes that entry always exists and dereferences it with a non-null assertion in a few places, so it throws instead of degrading gracefully.
I filed the upstream issue with the exact code paths and a suggested fix: vercel/ai#18270
This explains why the #576 fix didn't help here — that one covered a different (GPT-5.5) trigger path, but the underlying assumption in the SDK is still not guarded for Copilot's event ordering in general. Until the upstream fix lands, this will likely keep resurfacing with other Copilot/reasoning-model combinations too.
Will update here once there's movement on the AI SDK side.
I reviewed this against the current main branch before opening any duplicate fix. The repository already contains the defensive @ai-sdk/openai patch from commit d212c78, which initializes missing reasoning state for summary events, plus regression tests for both missing reasoning items and summary events without tracked state.
That directly covers the reported summaryParts crash path. I’m not opening a duplicate PR here. Please retest against the latest main; if the error still reproduces, a fresh event trace would help distinguish a new Copilot event ordering from the case already guarded.
@RealBhupesh I've been testing on v1.28 (both from npm and brew). The said commit is included into tags v1.29.0, v1.28.1, and v1.28.0. So, I don't see any reason for trying the latest main here.
You're right: retesting current main was not a useful next step here, and the logs you posted are the complete application-level logs NanoCoder currently exposes. There is no user-facing raw SSE trace switch, so you could not have produced the event trace I asked for without instrumenting the provider path.
I found why releases containing the repository commit still crash: the workaround is a pnpm patch under patches/, but NanoCoder's published package includes dist and selected assets only. The patch and pnpm-workspace.yaml are absent from the npm tarball, so npm and Homebrew installations keep using the unpatched @ai-sdk/openai code.
The upstream investigation has now captured the live Copilot sequence and confirmed that Copilot rotates opaque item IDs while keeping output_index stable (vercel/ai#18548). I opened #836 with a publish-compatible fix in NanoCoder's Copilot stream path, regression coverage for reasoning/text events and chunk boundaries, and no requirement for additional logs from you.
Thanks for pushing back and for the detailed release information; it exposed the packaging gap.
Activity
drmgc commentedon Jul 31, 2026
Here the same error with logs enabled:
Though in a log file there is no error logs
A-S-Manoj commentedon Aug 1, 2026
Thanks for the detailed repro and logs, @drmgc.
I dug into this and confirmed the root cause is actually upstream in
@ai-sdk/openai, not in nanocoder itself. GitHub Copilot's Responses-API proxy forgpt-5.3-codexemits reasoning-summary stream events (response.reasoning_summary_part.added/.done) without a matching precedingresponse.output_item.addedevent (or with a mismatcheditem_id). The SDK's streaming handler assumes that entry always exists and dereferences it with a non-null assertion in a few places, so it throws instead of degrading gracefully.I filed the upstream issue with the exact code paths and a suggested fix: vercel/ai#18270
This explains why the #576 fix didn't help here — that one covered a different (GPT-5.5) trigger path, but the underlying assumption in the SDK is still not guarded for Copilot's event ordering in general. Until the upstream fix lands, this will likely keep resurfacing with other Copilot/reasoning-model combinations too.
Will update here once there's movement on the AI SDK side.
RealBhupesh commentedon Aug 3, 2026
I reviewed this against the current
mainbranch before opening any duplicate fix. The repository already contains the defensive@ai-sdk/openaipatch from commitd212c78, which initializes missing reasoning state for summary events, plus regression tests for both missing reasoning items and summary events without tracked state.That directly covers the reported
summaryPartscrash path. I’m not opening a duplicate PR here. Please retest against the latestmain; if the error still reproduces, a fresh event trace would help distinguish a new Copilot event ordering from the case already guarded.drmgc commentedon Aug 5, 2026
@RealBhupesh I've been testing on v1.28 (both from npm and brew). The said commit is included into tags v1.29.0, v1.28.1, and v1.28.0. So, I don't see any reason for trying the latest
mainhere.Here are the only logs I get
With NANOCODER_LOG_LEVEL=debug
NANOCODER_LOG_LEVEL=debug NANOCODER_CORRELATION_ENABLED=true NANOCODER_LOG_DIR=/tmp/nanocoder-log nanocoderLogs from /tmp/nanocoder-log/nanocoder-2026-08-05.log
PS not sure if these are the event traces that you've been asking for. If they aren't, pls explain how do I get the right ones
fix(openai): correlate rotated Responses API item ids (#18548)
RealBhupesh commentedon Aug 10, 2026
You're right: retesting current
mainwas not a useful next step here, and the logs you posted are the complete application-level logs NanoCoder currently exposes. There is no user-facing raw SSE trace switch, so you could not have produced the event trace I asked for without instrumenting the provider path.I found why releases containing the repository commit still crash: the workaround is a pnpm patch under
patches/, but NanoCoder's published package includesdistand selected assets only. The patch andpnpm-workspace.yamlare absent from the npm tarball, so npm and Homebrew installations keep using the unpatched@ai-sdk/openaicode.The upstream investigation has now captured the live Copilot sequence and confirmed that Copilot rotates opaque item IDs while keeping
output_indexstable (vercel/ai#18548). I opened #836 with a publish-compatible fix in NanoCoder's Copilot stream path, regression coverage for reasoning/text events and chunk boundaries, and no requirement for additional logs from you.Thanks for pushing back and for the detailed release information; it exposed the packaging gap.
fix: map rotated Copilot reasoning ids to the item at that output_index
fix: announce rotated Copilot reasoning item ids before the SDK parse…
fix: map rotated Copilot reasoning ids to the item at that output_index
fix: announce rotated Copilot reasoning item ids before the SDK parse…
fix: map rotated Copilot reasoning ids to the item at that output_index
fix: announce rotated Copilot reasoning item ids before the SDK parse…
fix: map rotated Copilot reasoning ids to the item at that output_index
fix: announce rotated Copilot reasoning item ids before the SDK parse… (
fix: announce rotated Copilot reasoning item ids before the SDK parse… (