# SSE protocol catalog

> Streaming shapes for OpenAI Chat, Responses, Anthropic Messages, and Gemini alt=sse — and what the gateway does on passthrough vs translate.

Gateway streaming by dialect. **Same-family** traffic is byte-passthrough after model rewrite; **cross-dialect** rebuilds events from the canonical IR.

## OpenAI Chat Completions

| Data | Notes |
|------|-------|
| `choices[].delta` | Token deltas; `role` on first chunk |
| `delta.reasoning_content` | Thinking on openai_compat (DeepSeek/Kimi/…) |
| `delta.tool_calls` | Incremental tool args |
| `finish_reason` | On final choice chunk |
| `data: [DONE]` | Terminator |
| `stream_options.include_usage` | Gateway forces usage metering on translate/build when streaming |

## OpenAI Responses API

| Event | Notes |
|-------|-------|
| `response.created` / `in_progress` / `completed` | Lifecycle |
| `response.output_text.delta` | Text |
| `response.function_call_arguments.delta` | Tools |
| Passthrough | openai family does not rewrite SSE |

Experimental duplex: [Realtime WebSocket](/llm-gateway/guides/realtime-websocket/) → `GET /v1/responses/ws`.

## Anthropic Messages

| `type` | Notes |
|--------|-------|
| `message_start` | Skeleton + usage start |
| `content_block_start` / `delta` / `stop` | Text, tool_use, thinking |
| `message_delta` | `stop_reason`, tokens |
| `message_stop` | End |
| `ping` | Keepalive (forwarded on passthrough) |

## Google Gemini (`alt=sse`)

| Shape | Notes |
|-------|-------|
| JSON per `data:` line | `candidates[].content.parts[]` |
| `thought: true` | Thinking; `thoughtSignature` preserved for multi-turn |
| `functionCall` | Tool use |
| Final `usageMetadata` | Mapped when present |

## Policy

- Passthrough: do **not** strip unknown event types or fields.  
- Translate: rebuild only known IR fields; do not invent vendor events.  
- Client disconnect mid-stream → usage status `client_abort`.  

## Related

- [Error & finish/stop reasons](/llm-gateway/reference/error-finish-reason/)  
- [Chat field parity](/llm-gateway/reference/chat-field-parity/)