github / github/copilot-sdk

[Model Routing] claude-sonnet-5 swallows streaming assistant.reasoning_delta; flushes all thinkingContent at completion

Open
#2,346 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
10.5k
Forks
1.5k
Avg merge
1d 11h
Merged PRs (30d)
127

Description

Environment Details:

Working Model: claude-sonnet-4.5 (streams perfectly)

Failing Model: claude-sonnet-5

Integration: GitHub Copilot SDK (subscribe('assistant.reasoning_delta'))

Observed Behavior:
When routing requests to claude-sonnet-5, the SDK emits zero assistant.reasoning_delta events during the generation lifecycle. Instead, it accumulates them in the background, resulting in a ~25,000ms Time-to-First-Token (TTFT) and blocking client-side UI rendering. A complete, non-empty thinkingContent block is delivered atomically only when the final text stream buffer flushes or the file completes.

Expected Behavior:
The SDK should map Anthropic's streaming reasoning frames into real-time assistant.reasoning_delta events immediately upon receiving them from the upstream model router, preserving low operational TTFT just as it successfully does for claude-sonnet-4.5.

Contributor guide

Open the contributing guide

Research direction

Start at the implementation behind subscribe('assistant.reasoning_delta') and follow the model-routing path for claude-sonnet-5. Compare its handling with claude-sonnet-4.5 and verify whether upstream reasoning frames are emitted immediately rather than buffered. Done means real-time reasoning_delta events and low TTFT for claude-sonnet-5, without waiting for final completion.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, java
Domain
ai, api, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.