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
Claude streams in bursts via github-copilot provider, GPT streams smoothly #25172
Claude models via the github-copilot provider stream in visible bursts — text arrives in chunks with pauses up to ~500-750ms between them. GPT models on the same provider stream continuously. Happens on every Claude model I've tried (sonnet-4.5, sonnet-4.6).
To rule out OpenCode being the cause, I posted the same prompt directly to the Copilot API using the same OAuth token. The burst pattern is already present in the raw SSE from /v1/messages. GPT endpoints (/chat/completions, /responses) don't have it.
The difference seems to come from how OpenCode routes each model: Claude goes through @ai-sdk/anthropic → POST /v1/messages (Anthropic shim), while GPT uses @ai-sdk/github-copilot → POST /chat/completions. The shim batches SSE frames in a way the OpenAI endpoint doesn't. The toolStreaming = false workaround in copilot.ts (for the shim rejecting eager_input_streaming) makes agentic turns worse since the whole tool-call JSON arrives as one chunk.
I have a small Python script that measures inter-chunk gaps directly against the Copilot API — happy to share if it'd be useful for confirming.
Steps to reproduce
Set provider to github-copilot, pick any Claude model (e.g. claude-sonnet-4.6)
Send a prompt that produces a moderately long response
Watch text arrive in bursts with noticeable pauses
Switch to gpt-4o or gpt-5.4 on the same provider — streams without gaps
changed the title [-]Bug: Claude via github-copilot streams in bursts (vs smooth GPT/Gemini) — Anthropic /v1/messages shim cadence + toolStreaming=false[/-][+]Claude streams in bursts via github-copilot provider, GPT streams smoothly[/+]on May 2, 2026
Activity
rekram1-node commentedon Apr 30, 2026
Large ai generated issues are auto closed, please dont spam like that.
rekram1-node commentedon Apr 30, 2026
Please respect the maintainers of this project, we have rules:
https://github.com/anomalyco/opencode/blob/dev/CONTRIBUTING.md#no-ai-generated-walls-of-text
[-]Bug: Claude via github-copilot streams in bursts (vs smooth GPT/Gemini) — Anthropic /v1/messages shim cadence + toolStreaming=false[/-][+]Claude streams in bursts via github-copilot provider, GPT streams smoothly[/+]