Skip to content

GitHub Copilot GPT-5 streams can crash on missing reasoning summary state #576

Closed

Description

@EntropyParadigm

Bug

GitHub Copilot GPT-5 Responses models can fail in interactive Nanocoder with:

Cannot read properties of undefined (reading 'summaryParts')

I reproduced this with a GitHub Copilot provider configured for gpt-5.5. The non-chat Copilot model path uses the OpenAI Responses API, and Copilot can emit reasoning completion / summary events without the @ai-sdk/openai parser having an active reasoning entry for that item.

There is also a related no-output case where text has already streamed to the UI, but the AI SDK final result.text path is unavailable. Nanocoder then treats the turn as empty even though the user saw output.

Expected behavior

Copilot GPT-5 Responses streams should not crash when reasoning summary state is absent, and streamed text should be preserved as the assistant message content.

Notes

I have a small patch ready with regression tests for both cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions