When returning to the US from LIR on AA flights your only stopover options are MIA and DFW. If you left from SJO you could also stopover in JFK.
It won't help you, but there are more creative options available on award flights from the US to SJO, including a stopover in SFO.
None of AA's partners link the US and Costa Rica.