Even if there were to be any First Class seats in that UA flight, in a code sharing arrangement with others (like AI), usually, Economy Class seats are shared. Because, the UA can not increase the price of those allocated seats given to other partners. So, usually, the top tier seats are not shared (like Business/First/Premium Economy...).
So, it is always better to buy tickets from the main owner-operator than with the other code-shared carriers.
One more reason to do so - in case of auto upgrades, co-shared pax will (most often) not get such a benefit.