Cancelling Stream Does Not Show Usage
OpenAI Developer Community
May 26, 2026
I tried reproducing this again, and the usage data does show up now, but there’s a delay.
In my test, the immediate cancel() response still had usage: null, but polling/retrieving the response later showed usage populated. Most runs had usage appear around ~45-50 seconds after cancellation.
So the practical workaround is: after cancelling a background streaming response, don’t rely on the immediate cancel response for usage. Poll responses.retrieve(response_id) for a bit afterward, and expect usage to show up after some delay rather than instantly.
Discussion in the ATmosphere