Mercenaries were vital components of Medieval and Renaissance armies. But for various reasons European governments shifted towards using standing national armies. The French sort of continued the mercenary tradition with their Foreign Legion, and the Swiss Guard continued as a ceremonial bodyguard for the Pope, but figures like John Hawkwood, landsknechts, and Varangians seem to have become irrelevant by the 20th century.
Were there any other exceptions? Did mercenaries or privateers fight in the world wars? What about smaller civil wars, rebellions, and insurrections? What made a war suitable for mercenaries as opposed to state armies?
I once read that militaries await war while mercenaries chase it. Did any private armies lounge around Europe waiting for Word War III to break out or did they all strike out for the greener, less imminently irradiated pastures of Third World brushfires?
Were any of these 'active' mercenaries descended from pre-modern mercenary companies or was there a complete turnover in the industry?
As you say, the Foreign Legion was only a partial continuation of the tradition, as they fall outside of what many consider to be a mercenary. If that is of interest to you, I would recommend this answer I provided on the FFL, as it does touch a good deal on WWI and WWII. Be happy to answer any follow ups on the matter as well.