Vercel

Vercel AI Gateway Adds WebSocket Support for OpenAI Responses API


Executive Summary

Vercel has updated its AI Gateway to support WebSocket mode for the OpenAI Responses API, enabling persistent connections for multi-turn AI conversations. This allows developers to send only new inputs instead of resending the full context on each turn, which can significantly reduce latency. The feature is designed for building more responsive and efficient AI agents, with OpenAI reporting up to 40% faster performance for complex, multi-step tasks.

Key Takeaways

* New Capability: AI Gateway now routes OpenAI Responses API traffic over a persistent WebSocket connection.

* Performance Boost: By avoiding the need to resend full context with each HTTP request, this mode can achieve up to ~40% faster execution for agentic applications with 20 or more tool calls.

* Efficient State Management: In a conversation, developers only need to send the new input along with the `previous_response_id` to maintain context.

* Compatibility: The WebSocket mode is fully compatible with privacy features like `store=false` and Zero Data Retention policies.

Strategic Importance

This update enhances Vercel AI Gateway's value proposition for developers building stateful, conversational AI applications, addressing a key performance bottleneck and making it a more competitive tool for advanced agent development.

Original article