> "The treaty mentions gods such as Indra and Mithra, but unfortunately, both the Indo-Aryans and Indo-Iranians worshiped gods under those names"
No, to the extent that there is evidence, it is that the Mitanni Gods are the Vedic Gods.
See "The Aryan Gods of the Mitani People” by Sten Konow, 1923".
I uploaded a copy here:
https://www.academia.edu/41685888/The_A ... ani_People
Since you can obtain the whole text, I'll just quote a little:
The result of the preceding enquiry is accordingly that the Indra of the Mitani treaty was in every likelihood the well-known Vedic god and not an Aryan, pre-Indian deity. An examination of the last name of the list, that of the two Nāsatayas, apparently leads to the same conclusion.
...
The Mitani treaty supposes a dual deity, such as we find in the Vedic Nāsatyau, a frequent designation of the two Aśvins....
....In the same way there is every presumption that the single Nāsatya, who we know from Iranian and Indian sources, goes back into the period of Indo-Iranian unity, while the divine couple of the Ṛgveda is an Indian innovation, due to a combination of the ancient Aryan demon Nāsatya with another one who was closely connected with him.
....
...
The Vedic gods mentioned in the treaty are not, of course, meant as an enumeration of all, or even of the principal Indian gods of the Mitani chiefs. Only such deities are mentioned as have something to do with the treaty itself. It is, therefore, quite natural that the list is opened by Mitra, the god of compacts and the personification of friendship. We also easily understand why the name of Varuna follows. He watches over solemn engagements and obligations connected with the treaty. Also Indra's role is easily intelligible. He is the god of war and battles whose activity has led to the conclusion of the peace. But what have the Nāsatyas to do with the treaty?
To quote Macdonell , the two Aśvins of the Ṛgveda "have come to be typically succouring divinities. They are the speediest helpers and deliverers from distress in general. They are constantly praised for such deeds. In particular, they rescue from the ocean in a ship or ships…Their rescue from all kinds of distress is a peaceful manifestation of divine grace, not a deliverance from foes in battle, as is generally the case with Indra (with whom, however, they are once associated in fight, even receiving the epithet of Vṛtra-slayers). They are thus also characteristically divine physicians, who heal diseases with their remedies, restoring sight, curing the blind, sick and maimed. They are the physicians of the gods and guardians of immortality, who ward off death from the worshipper. Apart from their character as helpers, healers and wonder-workers their general beneficence is often praised. They bring their worshipper to old age with seeing eye and abundance of children."
There is nothing in this description which helps us to understand why the Nāsatyas are invoked in the Mitani treaty. One might think they have been considered as restoring deities and are invoked as such to reestablish normal relations between the inimical parties. Such an explanation would, however, be rather far-fetched and unlikely, especially if we bear in mind that their activity is always described as a peaceful manifestation and not as the consequence of war and battles.
There is, however, one feature of the Aśvin myths which is of especial interest in connexion with the Mitani treaty. The Nāsatyas are the two husbands of Sūryā, the sun's daughter, and there is no part of the Aśvin-legend which is more frequently alluded to in the Ṛgveda. It is a well-known fact that Sūryā came to be considered as the typical bride and her legend to play a role in the ancient marriage-rites. In late hymns the two Aśvins then develop into the typical groomsmen who are invoked to conduct the bride home in their chariot.
There is nothing to show that this conception is old in the Ṛgveda. We hear, it is true, that the Aśvins bestow a child on the eunuch's wife, a husband on the old maid or a bride on a favourite, but such deeds are the same kind as their usual feats, where they act as helpers and protectors in need and distress. It is only in a late hymn that they are invoked to take the bride home to the bridegroom.
It is, however, evidently this side of their nature which accounts for their being mentioned in the Mitani treaty.
We have seen how that compact was concluded after a war between the Hittite king Subbiluliuma and the Mitani king, and how Subbiluliuma installed Mattiuaza as king of the Mitani and gave him his own daughter in marriage.
I have no hesitation in asserting that it is on account of this marriage that the Nāsatyas are invoked in the treaty. In this way we get a fully satisfactory explanation of the mentioning of all the Aryan deities named in the Mitani compact, and, so far as I can see, only in this way.