My understanding from folks at 3M who worked with Jeff Dahn's group @ Dalhousie... 18650 was primarily Panasonic (and others as it's fairly standardized) though Tesla made some changes to the chemistry. Some of these changes likely go back to around 2004.
2170 was a joint effort. Development was led by Tesla but had input from both. Tesla likely had more input on size, stack, and chemistry while Panasonic likely had greatest input on manufacturability.
Pack and BMS design has been led by Tesla with a lot of input from Panasonic.
As to credit. Neither entity, unless you include Dahn, can claim credit for Li-ion. Panasonic did advance Li-ion and some of that may be why Tesla choose Panasonic to work with though it also could have been that Panasonic appeared the easiest to work with. Tesla likely deserves credit for the idea of using these cells in a car, some chemistry changes, and development of the packs & BMS? My guess is that Tesla also deserves credit for the 2170 though its design had input from a lot of individuals from Tesla, Panasonic, Dalhousie, 3M, and elsewhere.