feat(vercel-functions): WebSocket guidance + SSE/streaming clarification#102
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4b11d99. Configure here.
4b11d99 to
aadbf8b
Compare
aadbf8b to
03b2a1b
Compare
03b2a1b to
8d04585
Compare
…ication Vercel Functions now serve WebSocket connections natively. Document this across the skill set, steer users away from the polling workarounds people reach for, and correct the common belief that streaming/SSE requires the Edge runtime. - vercel-functions: new "## WebSockets" section (request lifecycle, Fluid Compute requirement, Active CPU pricing) with ws, Socket.IO (server + client transport gotcha), Next.js experimental_upgradeWebSocket, and reconnect/persistent-state examples. Wire discovery via importPatterns (ws, socket.io, socket.io-client), retrieval, docs, and promptSignals. - promptSignals trigger on the long-polling workaround technique, but deliberately NOT on named third-party services (Pusher, PubNub, Ably) — those are intentional choices, not a signal someone is working around a missing feature, so we don't nag. - vercel-functions Streaming: call out that SSE/streaming works on the default Node.js runtime — no runtime='edge' needed. - knowledge-update: correct the stale "Functions can't hold WebSocket connections" belief, add that streaming/SSE is not Edge-exclusive, and reinforce that Edge is inferior in nearly every case. - lexical-index: add polling/long-polling to the realtime synonym group so the lexical fallback maps the workaround technique to websocket/realtime. - vercel.md: add WebSockets to the compute list and Functions matrix. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8d04585 to
ab930c3
Compare
mglagola
approved these changes
Jun 26, 2026
cramforce
approved these changes
Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Vercel Functions now serve WebSocket connections natively (changelog, docs). This documents WebSockets across the skill set, steers users away from third-party realtime services and polling workarounds, and corrects the common belief that streaming/SSE needs the Edge runtime.
Changes
vercel-functions— new## WebSocketssection:GET+Upgrade→ Routing Middleware/rewrites/Firewall/rate limits), instance pinning + Fluid Compute concurrency, Active CPU pricing.wsserver, Socket.IO server + client (with thetransports: ['websocket']/pathgotcha), Next.jsexperimental_upgradeWebSocket()from@vercel/functions, plus Express/Hono/Nitro and Python (FastAPI /python-socketio) notes.importPatterns(ws,socket.io,socket.io-client), retrieval, docs, andpromptSignals— including workaround terms (long polling,pusher,pubnub,ably) so prompts reaching for a websocket substitute surface the native guidance.vercel-functionsStreaming — explicit callout that SSE/streaming works on the default Node.js runtime; noruntime = 'edge'needed.knowledge-update— corrects the stale "Functions can't hold WebSocket connections" belief, adds that streaming/SSE is not Edge-exclusive, and reinforces that Edge is inferior in nearly every case.lexical-index— addspolling/long-polling/pusher/ablyto therealtimesynonym group for the lexical fallback.vercel.md— adds WebSockets to the Core Platform compute list and the Functions decision matrix.Not labeled as beta, per request.
Verification
bun test→ 878 pass, 0 fail;bun run validatepasses;build:manifest:check+build:from-skills:checkclean.🤖 Generated with Claude Code
Note
Low Risk
Documentation and generated skill metadata only; no runtime or application code paths change.
Overview
Documents native WebSockets on Vercel Functions and steers agents away from third-party realtime services and long-polling workarounds, while correcting the belief that streaming/SSE requires
runtime = 'edge'.vercel-functionsadds a WebSockets section (ws, Socket.IO client/server gotchas, Next.jsexperimental_upgradeWebSocket(), reconnect/backoff, external store for state) plus discovery: websockets docs,importPatternsforws/socket.io, retrieval aliases/intents, andpromptSignalsfor websocket and long-polling terms. The Streaming section now states SSE/ReadableStreamwork on default Node.js (Fluid Compute).knowledge-updateadds bullets that Functions support WebSockets, streaming is not Edge-exclusive, and Edge should not be the default choice.lexical-indexexpands therealtimesynonym group withpolling/long-polling.vercel.mdlists WebSockets on the platform and in the Functions decision matrix. Regeneratedskill-manifest.json/skill-catalog.mdreflect the metadata changes.Reviewed by Cursor Bugbot for commit ab930c3. Bugbot is set up for automated code reviews on this repo. Configure here.