def test_update_tool_calls_partial_arguments():
    """Test partial update to tool call arguments."""
    tool_calls = [
        {
            "id": "call_123",
            "type": "function",
            "index": 0,
            "function": {"name": "test_function", "arguments": "{"},
        }
    ]

    delta = ChatCompletionDeltaToolCall(index=0, function={"arguments": '"key":'})

    result = update_tool_calls(tool_calls, [delta])
    assert result[0]["function"]["arguments"] == '{"key":'
Test partial update to tool call arguments.
llama-index-integrations/llms/llama-index-llms-litellm/tests/test_utils.py