#14457 [Bug]: Usage data lost when streaming responses are terminated early by client disconnect
### What happened?
When a client terminates a streaming chat completion request before the provider sends the final chunk (containing usage statistics), LiteLLM loses all usage/token tracking for that request. This creates billing gaps, incomplete quota tracking, and inaccurate usage analytics.
## Problem Details
**Root Cause:** - Most LLM providers (Azure OpenAI, OpenAI, Anthropic, etc.) only send usage data in the final streaming chunk - When clients disconnect early, the stream terminates with an exception before this final chunk arrives - LiteLLM's exception handler (`litellm/litellm_core_utils/streaming_handler.py:1647-1660`) logs the failure but doesn't attempt to calculate usage for the partial response
**Code Evidence:** ```python # streaming_handler.py:1647-1660 except Exception as e: # LOG FAILURE - but no usage calculation threading.Thread( target=self.logging_obj.failure_handler, args=(e, traceback_exception) ).start() # Usage data is completely lost here ```
## Steps to Reproduce
1. Start a streaming completion request to any provider (Azure OpenAI, OpenAI, etc.) 2. Allow the stream to generate several tokens/chunks 3. Terminate the client…