Skip to content

Merge remote-tracking branch 'origin/main' into sse

73132c3
Select commit
Loading
Failed to load commit list.
Open

mcp_transcoder: add sse server response support. #45374

Merge remote-tracking branch 'origin/main' into sse
73132c3
Select commit
Loading
Failed to load commit list.
CI (Envoy) / Mobile/Perf skipped Jun 3, 2026 in 0s

Check was skipped

This check was not triggered in this CI run

Details

Request (pr/45374/main@73132c3)

guoyilin42 @guoyilin42 73132c3 #45374 merge main@af5b6f3

mcp_transcoder: add sse server response support.

Commit Message: mcp_transcoder: add sse server response support.
Additional Description:
This PR introduces Server-Sent Events (SSE) server response support to the MCP JSON REST bridge filter. When the upstream server responds with a text/event-stream content type, the filter will now parse the stream and wrap each extracted complete event payload into a distinct text content item within the JSON-RPC content array on the fly.

Key Changes:

  • Added SseResponseExtractor: Introduced sse_response_extractor.cc and its header to process incoming chunks of an SSE stream and return completed event payloads.
  • Updated McpJsonRestBridgeFilter: Modified the encoding path to check for the text/event-stream content type. It now delegates chunk processing to the new SSE extractor and formats the results into the JSON-RPC streaming envelope.
  • Testing: Added unit tests in sse_response_extractor_test.cc to verify the handling of single/multiple events, multiline data, incomplete chunked events, and CRLF line endings. Also added ToolsCallSseStreamingTranscoding to integration tests.

Risk Level: Low
Testing: Unit and Integration tests.
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Environment

Request variables

Key Value
ref 10f0fa3
sha 73132c3
pr 45374
base-sha af5b6f3
actor guoyilin42 @guoyilin42
message mcp_transcoder: add sse server response support....
started 1780444809.176085
target-branch main
trusted false
Build image

Container image/s (as used in this CI run)

Key Value
default docker.io/envoyproxy/envoy-build:v0.1.5
mobile docker.io/envoyproxy/envoy-build:mobile-v0.1.5
Version

Envoy version (as used in this CI run)

Key Value
major 1
minor 39
patch 0
dev true