diff --git a/litellm/litellm_core_utils/streaming_chunk_builder_utils.py b/litellm/litellm_core_utils/streaming_chunk_builder_utils.py index c808cfca457..d58ded11385 100644 --- a/litellm/litellm_core_utils/streaming_chunk_builder_utils.py +++ b/litellm/litellm_core_utils/streaming_chunk_builder_utils.py @@ -587,7 +587,10 @@ class ChunkProcessor: hasattr(usage_chunk, "server_tool_use") and usage_chunk.server_tool_use is not None ): - server_tool_use = usage_chunk.server_tool_use + _stu = usage_chunk.server_tool_use + server_tool_use = ( + ServerToolUse(**_stu) if isinstance(_stu, dict) else _stu + ) if ( usage_chunk_dict["prompt_tokens_details"] is not None and getattr(