Cloudflare Workers port of ai-sdk-openai-websocket-fetch — a drop-in fetch replacement that routes OpenAI Responses API streaming requests through a persistent WebSocket connection, reducing TTFB in multi-step agentic workflows. Version 0.0.1, pre-release. Key differentiator: uses Workers-native WebSocket API instead of Node.js 'ws' package, enabling persistent connections in edge environments. Inspired by Vercel Labs' original but adapted for Workers runtime constraints. Ships TypeScript types.
npm install agents-sdk-openai-websocket-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a WebSocket fetch, integrating with OpenAI SDK, and streaming text with cleanup.
Run in a Cloudflare Worker environment or use the original Node.js package ai-sdk-openai-websocket-fetch.
Add onFinish handler as shown in quickstart.
Ensure your OpenAI client uses the Responses API endpoint.
Pin to exact version in production.
Use a Cloudflare Worker environment. For Node.js, use the original ai-sdk-openai-websocket-fetch package.
Use `import { createWebSocketFetch } from 'agents-sdk-openai-websocket-fetch'`.No dependency data recorded yet.