Codeshares can be confusing, however there are resources available on the airlines' websites and even on your confirmation which can help. Looking at the confirmation you were e-mailed, if it's a codeshare it should say "American Airlines flight 6754
operated by Alaska Airlines" or "Alaska Airlines flight 1123
operated by American Airlines." Codeshare flight number information is also available online but it can be tricky to find.
Here's a link to AA's complete list of codeshare partners and the flight number range they use for each. Just match the AA flight number with the range on the chart and you'll know which partner operates it. Alaska had a similar list
on their website but it appears to have been removed.