To be fair, and leaving aside more general concepts of pan-Slavicism entirely, I do not believe he had much choice in the defense of Serbia by 1914.
This is of course literally false. They had a choice, as do all governments. Beyond that, with hindsight it's 100% clear that backing down would have been much better for the monarchy than getting involved in a war that would destroy the empire and get the Czar killed in just 3 years time.
Domestically, the Foreign Minister Izvolsky had to be thrown to the wolves afterwards (a convenient target, since he really was responsible for the disaster), and Russian opinion was hardened against Vienna.
Well, right--the Russian Foreign Minister did a deal with Austria, thinking their neutrality was enough to get them access through the straights. The Czar knew about negotations but the rest of the government didn't. When they realized they weren't actually going to benefit from it, Russia "needed" to back down because otherwise the negotiations would be made public. From the point of view of the Russian government and people, it was reasonable to view themselves as victims. From the point of view of the Austrians, though, same thing.
More broadly years of brinksmanship had got everyone to the point where they all suspected they had just not firm enough.