Response headers

Every x-agent-stream-* header a successful chat response carries, and whether it appears on a buffered or a streamed response.

Every x-agent-stream-* header below is the exact header name Agent Stream sends. A client can read cost and usage figures directly from these headers without parsing the response body. Agent Stream adds them to a successful chat response in any of the three request formats a surface accepts: OpenAI Chat, Anthropic Messages, and OpenAI Responses.

Every-request headers

Set on every successful chat response.

HeaderMeaningBufferedStreamed
x-agent-stream-trace-idRequest trace id.YesYes
x-agent-stream-providerUpstream provider that served the call.YesYes
x-agent-stream-modelThe model that produced the response: the routed, failover, or load-balanced model when one was used, the Merger LLM’s model in Summarise output from multiple LLMs mode, and collect in Compare output from multiple LLMs mode. The main model call is priced at this model. The Judge, Jury, Decider, and each compared or summarised model are priced at their own rates, and x-agent-stream-cost-usd includes them all.YesYes
x-agent-stream-cacheCache status: hit or miss.YesYes: hit when served from the response cache, otherwise miss.
x-agent-stream-input-tokensInput tokens for the execution. On a cache hit, the input tokens the cache saved.YesOnly on a cache hit
x-agent-stream-output-tokensOutput tokens for the execution. On a cache hit, the output tokens the cache saved.YesOnly on a cache hit
x-agent-stream-total-tokensTotal tokens for the execution. On a cache hit, the total tokens the cache saved.YesOnly on a cache hit
x-agent-stream-cached-tokensProvider-side cached input tokens. 0 on a cache hit.YesOnly on a cache hit
x-agent-stream-cache-write-tokensProvider-side cache-write tokens, 0 when the provider doesn’t report them. 0 on a cache hit.YesOnly on a cache hit
x-agent-stream-reasoning-tokensReasoning tokens, already counted in the output tokens. 0 when the provider doesn’t report them, and on a cache hit.YesOnly on a cache hit
x-agent-stream-cost-usdUSD cost for the execution, to 6 decimal places. 0.000000 on a cache hit.YesOnly on a cache hit
x-agent-stream-cache-saved-usdProvider spend avoided by a cache hit. Present only on a cache-hit response.Only on a cache hitOnly on a cache hit

The response cache is checked before the streaming path, so a streamed request can be served from the cache. A streamed cache hit carries the same headers as a buffered one. A stream that runs live starts before its tokens and cost are known, so it carries only the trace id, provider, model, and x-agent-stream-cache: miss, all set at stream start.

Conditional headers

Present only when the surface used the corresponding feature for this request. Buffered responses only.

HeaderMeaningPresent when
x-agent-stream-schema-validtrue if the completion matched the requested schema, otherwise false.The request set a json_schema response format.
x-agent-stream-context-transformWhich context-window compression ran and how many messages it removed.Context-window compression removed at least one message.
x-agent-stream-documentsDocument-ingestion summary for the request.The request included ingested documents.
x-agent-stream-audioAudio-input handling summary for the request.The request included audio input.
x-agent-stream-imagesImage-input handling summary for the request.The request included image input.

Negotiated dialect

HeaderMeaningBufferedStreamed
x-agent-stream-ingress-skinThe negotiated client dialect (openai_chat, anthropic_messages, openai_responses), set on success, error, and streamed responses alike.YesYes

Inbound-only headers

These are headers a caller sends, not response headers: listed here because they share the x-agent-stream-* / X-Agent-Stream-* prefix and are easy to mistake for response headers.

HeaderMeaning
X-Agent-Stream-Presentation (configurable name)Default header name a caller uses to present verifiable-presentation (VP) evidence, when a surface’s VP evidence source is header.
X-Agent-Stream-Upstream-AuthorizationLets a caller supply a distinct upstream credential (e.g. a Microsoft Graph token for Copilot) alongside the front-door token, separate from the surface’s own configured provider auth.
  • Telemetry and exports: The per-request telemetry record these headers are derived from.
  • Observability concept: Why these figures are exposed on the response rather than only in the dashboard.
  • Server tools and modalities: The document/audio/image ingestion and context-compression features the conditional headers report on.
  • Providers: Upstream provider auth, including the upstream-authorization override header.