#33166 [BUG] prompt_tokens_details silently reset to None in streaming usage aggregation when a later chunk omits it
## Bug description
`ChunkProcessor._calculate_usage_per_chunk` in `litellm/litellm_core_utils/streaming_chunk_builder_utils.py` aggregates usage across all chunks in a stream. `completion_tokens_details` is only overwritten when the current chunk's value is not `None`:
```python if usage_chunk_dict["completion_tokens_details"] is not None: completion_tokens_details = usage_chunk_dict["completion_tokens_details"] ```
`prompt_tokens_details` has no equivalent guard, it's unconditionally reassigned on every usage-bearing chunk:
```python prompt_tokens_details = cast( Optional[PromptTokensDetailsWrapper], usage_chunk_dict["prompt_tokens_details"], ) ```
If a provider sends more than one chunk carrying a `usage` field, and a later chunk's `prompt_tokens_details` is `None` (e.g. a totals-only trailing chunk), it clobbers a real breakdown that was reported earlier in the same stream. The final aggregated usage ends up with `prompt_tokens_details=None` even though the breakdown was available.
## Steps to reproduce
Found via a production crash: switching an agent from `OpenAIChatCompletionsModel` to `OpenAIResponsesModel` (OpenAI Agents SDK) started raising `AttributeErro…