Tips for traveling on codeshare flights- Check in with the airline operating your first flight
- Baggage policies differ between airlines and other charges may apply; check with the airline operating your flight for baggage information
- You can book and change codeshare flights on aa.com
https://www.aa.com/i18n/travel-info/.../codeshare.jsp
i suspect your flight from us to europe will follow the AA guidelines, and if there were a change of carrier en route, you "might" continue under the originating carrier baggage policy. or might not.
but a return flight is a separate flight, and in your case lufthansa/austria is the originating carrier, and will charge for baggage accordingly.