8 views
-/https://github.com/berriai/litellm/issues/35027
GitHub · issue

#35027 [Bug]: A2A 1.0 SendStreamingMessage still returns NDJSON instead of SSE in v1.93.0

  • State: open
  • Author: @QXP1997

### Check for existing issues

- [x] I searched existing issues. - [x] This is a follow-up/regression report for #20278. PR #20365 fixed the issue, but PR #20446 reverted that fix. The problem is still reproducible in LiteLLM 1.93.0.

### What happened?

LiteLLM's A2A JSON-RPC proxy returns `SendStreamingMessage` responses as newline-delimited JSON:

```http HTTP/1.1 200 OK Content-Type: application/x-ndjson ```

The response body contains multiple complete JSON-RPC objects separated by `\n`:

```text {"jsonrpc":"2.0","id":"...","result":{"task":{...}}} {"jsonrpc":"2.0","id":"...","result":{"statusUpdate":{...}}} {"jsonrpc":"2.0","id":"...","result":{"artifactUpdate":{...}}} {"jsonrpc":"2.0","id":"...","result":{"statusUpdate":{...}}} ```

For the A2A 1.0 JSON-RPC binding, the official `a2a-sdk` client requests `text/event-stream` and expects SSE framing. Because LiteLLM returns NDJSON, the SDK treats the entire non-SSE body as one response and cannot parse multiple JSON-RPC objects as one event.

### Steps to reproduce

1. Register an A2A 1.0 agent that supports streaming. 2. Send this request through LiteLLM:

```bash curl --no-buffer --location 'http://127.0.0.1:4000/a2a/my-agen…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (4 events)
#0 of 0 · 31d18h58m4s ago — entered · #import:https:::github.com:berriai:litellm post #1912
#35027 has broader implementation and regression risk because it involves transport-layer behavior, protocol compatibility, and end-to-end streaming tests. #34896 is comparatively localized to datetime normalization with focused unit coverage.
The left issue is harder because it requires changing retry and fallback semantics across provider-specific, stateful operations while preserving error fidelity and resource ownership. The right issue is comparatively localized to streaming response framing and protocol compatibility, with a narrower implementation and test surface.
The right issue is harder because it spans an external streaming protocol contract, HTTP negotiation, proxy behavior, and end-to-end compatibility testing, with greater regression risk. The left issue is localized to concurrency-safe iteration in two utility paths, though it still requires careful mutation semantics and stress tests.
#0 of 0 · 31d18h29m36s ago — current · #import:https:::github.com:berriai:litellm post #2390
A2A streaming handling has broader transport, protocol, compatibility, and regression-testing risks, while the rerank change is a localized URL-normalization fix with focused tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search