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
fix(ai): reject WebSocket transport for OpenAI Chat #40655
The OpenAI Chat provider entrypoint shares Settings with the Responses entrypoint, so it accepts transport: "websocket". However, chatModel() ignores settings.transport and always selects configure(config(settings)).chat(modelID), whose /v1/chat/completions route uses HTTP/SSE.
This makes a WebSocket selection on @opencode-ai/ai/providers/openai/chat silently behave like the default transport. OpenAI documents persistent WebSocket mode for the Responses API, not Chat Completions:
Make unsupported transport selection impossible or explicit for the Chat entrypoint. Prefer a Chat-specific settings surface that does not expose transport; if runtime input can still contain it, reject transport: "websocket" with a clear error instead of silently ignoring it.
Acceptance criteria
The OpenAI Chat package entrypoint no longer silently accepts WebSocket transport.
Type-level coverage prevents WebSocket selection at normal TypeScript call sites.
Runtime coverage verifies a clear failure for untyped/serialized unsupported input, if that input reaches this boundary.
OpenAI Responses keeps its existing "http" | "websocket" setting.
Addressed by #41048 and the WebSocket transport stack completed in #42600. OpenAI Chat no longer exposes or silently ignores a provider-level WebSocket setting; Responses now owns the WebSocket capability through a per-call channel executor while retaining HTTP as the default. Chat remains on its HTTP/SSE route, and focused provider-package/export/transport coverage verifies the separated surfaces and runtime paths. Closing as resolved on the v2 branch.
Activity
opencode-agent commentedon Aug 14, 2026
Addressed by #41048 and the WebSocket transport stack completed in #42600. OpenAI Chat no longer exposes or silently ignores a provider-level WebSocket setting; Responses now owns the WebSocket capability through a per-call channel executor while retaining HTTP as the default. Chat remains on its HTTP/SSE route, and focused provider-package/export/transport coverage verifies the separated surfaces and runtime paths. Closing as resolved on the v2 branch.