code and mifr_action (the SDK ignores those extras). SSE uses the same object in data: {"error":…} and still omits [DONE]. An HTTP abort sends no body.
mifr_action is one of retry, wait, fix_key, fix_request, or pick_model.
Status codes
Unknown routes return 404.
PUT / DELETE / TRACE return 405 with Allow: GET, POST, OPTIONS. If the caller hangs up, the gateway records aborted and sends no body.
Verdict headers
Successful non-stream completions put identity on HTTP headers. On a stream, the same facts appear on the terminal SSE chunk with snake_case names (- becomes _). They cannot ride on the SSE HTTP head, because that head is flushed before a provider is chosen.
Headers are the gateway’s report; mifr_receipt is the proof.
OpenAI and Vercel SDKs ignore extra HTTP headers and extra JSON keys.
Routing
When you omitprovider, the gateway picks idle-first near-tie. If the chosen Mac dies, hangs (90 seconds with no token), stalls (90 seconds since the last token), or returns a bad receipt, the gateway retries another qualified Mac: at most two pre-token failovers, plus one mid-stream hop after the first token. Two idle Macs may be raced before the first token (x-mifr-hedge: 1). It never retries the same id, never drops to a lower floor, and never returns an unverified completion. A pin does not hop or hedge.