Streams
Tokens generated before a stream fails are real work and are counted inusage. Read the usage block on the final chunk or the error payload rather than assuming a failed request cost nothing. If a stream ends before the provider reports usage, the gateway settles from what it can prove and never bills work that did not dispatch.
Reconcile against the developer console and agent status, not status codes.

