Why did Austria Hungary feel so confident in their fight against Serbia even though this would make Russia join the war?

Russia didn't have any strong allies like Germany

Austria Hungary was huge and Serbia was small and weak nation without a government and would crumble under Austrian threat.

France would also help Russia and so Austria Hungary didn't feel confidant at all.

Germany promised that they would help Austro-Hungarian Empire win the war.

Germany's promise to support Austria-Hungary in their fight against Serbia likely gave them confidence, as they saw Germany as a strong ally with a powerful military. Additionally, Austria-Hungary may have underestimated the potential for Russia to join the war, believing that they could defeat Serbia and prevent further escalation. Their perception of Serbia as a small and weak nation may have also contributed to their confidence in the outcome of the conflict.