The streaming wrapper only calls logCall after finalMessage succeeds. A disconnect or provider error after some output can therefore disappear from the request-cost view, even though it consumed time and may still incur charges. That particularly matters for the cost-per-completed-task comparison you recommend.
I would write an attempt record in a finally path with the last known usage, terminal status and a task ID, then reconcile any unavailable usage separately. Successful completions and failed attempts can remain distinguishable while both contribute to the route’s operational accounting.