You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
readModernSSE (pkg/vmcp/client/modern.go:366-397) scans an SSE response line by line and json.Unmarshals each data: line independently. The SSE spec frames one event as alldata: lines up to a blank-line boundary, joined with \n — a single JSON object may legally span multiple data: lines.
Against a conformant streamable-HTTP backend that splits its JSON that way, no single line unmarshals, readModernSSE never matches a response, and the probe falls through to errWrongEra — vMCP concludes the backend is not Modern and silently downgrades it to Legacy.
Fix
The correct algorithm already exists in-tree: sseResponsePayload (test/e2e/mcp_raw_client.go, added in #6033) accumulates data: lines to the blank-line boundary, joins with \n, skips interleaved notifications, and handles EOF without a trailing blank line. Port that into readModernSSE (with unit tests covering multi-line data:, CRLF, interleaved notifications, and EOF-without-blank-line).
Surfaced by review on #6033 (the reviewer verified the e2e helper is correct and flagged the production counterpart as the naive version). Refs #5743.
Activity
Replace vMCP Modern kill-switch with a capability gate (#6033)