If so, why did Germany form an alliance with Austia-Hungary?
Were they objectively a liability?
Before WWI, did Germany know that Austria-Hungary would be a liability in actually fighting a war?
I object the premisse of the question. The k.u.k forces being a liability would mean the German army would be better off without them thats without a doubt incorrect and silly. Obviously Austria-Hungary had its part in escalting the conflict and thus could be seen as liability but in the actual fighting obviously not. Russia was in the war anyways how could the k.u.k army be a liability? Without the k.u.k Forces, Germany has to deal with the entire Russian army, Italian army et cetera and the war is over. Again if you only talk about the political aspects thats a different story. In WW2 you could make arguments for example the Italian Armies since they opened up unneccessary fronts which brought no value in return and just improved the allied position by drawing German forces ( Africa corps missing in Russia, possible negative effects on Barbarrosa due to Operation Marita) and eventually destroying these forces without much ressources invested on allied side ( Tunisia surrender of Axis forces ). But in WW1 the eastern front was unavoidable and k.u.k armies improved the situation obviously.
The better question would be if Germany overestimated the capabilities of its ally.