-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
OpenAI now documents WebSocket support for LLM workflows, including:
- Responses API WebSocket mode
- Realtime API over WebSocket
ReqLLM currently has strong support for non-streaming requests and SSE-based streaming, but does not yet expose a dedicated OpenAI WebSocket transport path.
Why this matters
WebSockets can reduce repeated request overhead and enable persistent, low-latency interactions. For some workloads (especially conversational/session-based flows), this can provide better UX and more efficient transport semantics than one-off HTTP requests.
Proposed work
Research and propose an implementation plan for adding OpenAI WebSocket support to ReqLLM, then implement incrementally.
Areas to evaluate:
- API surface design in ReqLLM (how WebSocket session semantics should map to current high-level APIs)
- Provider architecture impact (new callbacks vs extending existing streaming callbacks)
- Event decoding and response assembly parity with existing
ReqLLM.Response/ReqLLM.StreamChunk - Error handling, reconnect behavior, and timeout/session lifecycle
- Usage reporting and compatibility with existing provider defaults
- Fixture/testing strategy for deterministic coverage
Suggested rollout
- Research/design spike with architecture notes and recommended API shape
- Implement Responses API WebSocket mode (server-side first)
- Evaluate/implement Realtime WebSocket support (possibly behind experimental API)
References
- WebSocket mode guide: https://developers.openai.com/api/docs/guides/websocket-mode
- Realtime WebSocket guide: https://developers.openai.com/api/docs/guides/realtime-websocket
- Realtime overview: https://platform.openai.com/docs/guides/realtime/server-events
- Changelog (WebSocket mode launch, Feb 23, 2026): https://developers.openai.com/api/docs/changelog
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request