SIGN IN SIGN UP

fix(responses): estimate usage for streams cut before terminal usage (#7427)

Tool-call argument, reasoning and refusal deltas now feed the completion
estimate, and a stream that produced any upstream event bills its
estimated prompt tokens unless upstream reported an explicit failure.
Responses streams interrupted before response.completed no longer settle
at zero and refund the whole pre-consume.

Inspired by #7195. Refs #7062.
C
Calcium-Ion committed
55a6cd2a44eaf189bbd565dd2cdfa591d19b06d6
Parent: e2bb05f
Committed by GitHub <noreply@github.com> on 9/18/2026, 4:14:03 AM