AGUI505
August 29, 2026 · View on GitHub
Severity: warning · Group: Transport · Checked in: transport · Since: 0.x
Message: Content-Type '{contentType}' is neither text/event-stream nor application/x-ndjson
Spec grounding
The spec has no single quotable sentence for this behavior; the rule is grounded in the linked section as a whole.
Source: https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model
Example
This rule is checked at the transport layer, so its fixture is a timed
HTTP replay rather than a bare stream — see
spec/fixtures/invalid/AGUI505-unexpected-content-type and the replay
protocol in spec/fixtures/README.md:
{
"contentType": "application/json",
"chunks": [
{
"gapMs": 0,
"text": "data: {\"type\":\"RUN_STARTED\",\"threadId\":\"thread_001\",\"runId\":\"run_001\",\"timestamp\":1755300023200}\n\n"
},
{
"gapMs": 0,
"text": "data: {\"type\":\"TEXT_MESSAGE_START\",\"messageId\":\"msg_001\",\"role\":\"assistant\",\"timestamp\":1755300023300}\n\n"
},
{
"gapMs": 0,
"text": "data: {\"type\":\"TEXT_MESSAGE_CONTENT\",\"messageId\":\"msg_001\",\"delta\":\"All good here.\",\"timestamp\":1755300023400}\n\n"
},
{
"gapMs": 0,
"text": "data: {\"type\":\"TEXT_MESSAGE_END\",\"messageId\":\"msg_001\",\"timestamp\":1755300023500}\n\n"
},
{
"gapMs": 0,
"text": "data: {\"type\":\"RUN_FINISHED\",\"threadId\":\"thread_001\",\"runId\":\"run_001\",\"outcome\":{\"type\":\"success\"},\"timestamp\":1755300023600}\n\n"
}
]
}
Expected findings:
warningAGUI505 at stream — Content-Type 'application/json' is neither text/event-stream nor application/x-ndjson