Streaming

Fire Mission streams pass-through. The bytes you receive are byte-identical to what the upstream provider sent, in the exact order the provider sent them. There is no buffering or transcoding step in the hot path.

OpenAI surface (chat completions)

Set stream: true. Response is text/event-stream with the OpenAI delta format.

SSE text
data: {"id":"chatcmpl-...","choices":[{"delta":{"content":"Hello"}}]}

data: {"id":"chatcmpl-...","choices":[{"delta":{"content":" world"}}]}

data: [DONE]

Anthropic surface (messages)

Set stream: true. Response is the Anthropic event-stream format.

SSE text
event: message_start
data: {"type":"message_start","message":{"id":"msg_...","model":"claude-3-5-sonnet-latest"}}

event: content_block_delta
data: {"type":"content_block_delta","delta":{"type":"text_delta","text":"Hello"}}

event: message_stop
data: {"type":"message_stop"}

Connection notes

  • HTTP/1.1 keep-alive and HTTP/2 are both supported.
  • The connection is held open until the upstream provider completes the stream or your client disconnects.
  • If your client disconnects mid-stream, the upstream call is canceled and only the tokens already streamed are billed.
  • Errors mid-stream surface as a final SSE event with the standard error envelope, then the stream closes.

Logging during streams

Streaming calls log a single metadata-only row at completion: token counts (parsed from the upstream usage event), cost cents, status code, latency. No prompt or completion bytes are persisted (Two-Plane isolation).