Add Britain as an actual ally to the Austro-Hungarian-French alliance. Like that, even if Italy is allied to Germany and Russia, they would probably hesitate to join the war, since they would not only have to deploy against both Austria-Hungary and France, but they would also have to face the British, French and Austro-Hungarian navies all at once.
The Austro-Hungarian Army, but also the economy would probably be in a much better shape, while Russia would be worse off. All those French investment which historically helped to develop Russia would had enriched Austria-Hungary ITTL instead. Add in the mortal threat of having both Germany and Russia as enemies, and the military budget of the Dual Monarchy would had been incomparable higher from much earlier on.
Like this, if Austria-Hungary stays on the defensive early on during the war, it could repel the initial Russo-German onslaught, thanks to the favourable terrain conditions. Galicia might need to be abandoned though.
Once the allied aid starts to pour in, the frontlines would harden indefinitely.