WebSocket support for OpenAI Responses API live on AI Gateway
By Steven Van ·
OpenAI says the change cuts end-to-end latency by up to 40% in agentic loops with 20 or more tool calls.
Vercel's AI Gateway now supports WebSocket mode for the OpenAI Responses API, so a connection can stay open across turns instead of opening a new HTTP request for each one. Each turn sends only the new input plus a previous_response_id, rather than re-sending the full conversation context. OpenAI reports up to ~40% faster end-to-end execution over WebSockets for agentic rollouts with 20 or more tool calls.
The Responses route opens at GET /v1/responses and accepts response.create frames over the persistent connection. It is compatible with store=false and Zero Data Retention, and follows OpenAI's WebSocket mode specification.