Handle the current toolCall message format alongside legacy tool_use, and merge toolResult messages back into the preceding assistant message.
Handle the current toolCall message format alongside legacy tool_use, and merge toolResult messages back into the preceding assistant message.