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
OpenAI Responses WebSocket hangs after a top-level error event #50848
The native OpenAI Responses WebSocket route emits a provider-error for a top-level error event but never completes the response stream. The same transport completes normally for response.failed.
packages/llm/src/protocols/openai-responses.ts handles both event types, but TERMINAL_TYPES only includes response.completed, response.incomplete, and response.failed. Because a Responses WebSocket remains open between requests, waiting for the socket to close leaves LLMClient.stream() and LLMClient.generate() pending indefinitely after an API error.
Expected: a top-level error event emits its provider-error and terminates the current response stream.
Plugins
None
OpenCode version
dev (18ef3cc7c5, package version 1.18.32)
Steps to reproduce
Configure the OpenAI Responses WebSocket route with an in-memory socket.
After response.create, send this frame and keep the socket open:
Observe provider-error(rate_limit_exceeded: Rate limit reached), followed by a timeout because the stream remains open.
Replace the frame with {"type":"response.failed","response":{"error":{"code":"server_error","message":"boom"}}} and observe that the stream ends immediately.
Activity
rekram1-node commentedon Oct 14, 2026
This would only happen in the experimental protocol for v1, if u update to v2 it is fixxed