Adding onto what Halagaz has said, the Austrophilic government signed a secret convention, an alliance, with
Austria-Hungary in 1881, which, among other things, made the country very subservient to Vienna, now being unable to make deals without their approval. A convention they signed right after signing a trading deal which made it so that Serbia could only export its commodities to Austria-Hungary. Both deals were signed before the Congress of Berlin too. It was obvious that Austria-Hungary was only striving to use Serbia as a means of getting into the geopolitics of the Balkans, as around the same time Russia had become Bulgaria's patron. They even resigned the secret convention in 1887 with one more condition added onto it, that is the condition that Vienna would protect the interests of the Obrenović dynasty, further linking the two together and giving the then-ruler Milan I the ability to deal with his political opponents.
Also, Halagaz mentioned that relations were ambivalent until early 1906 - this references the customs war the two had from 1906 to 1908, aptly named the
Pig War after the commodity of importance. In an earlier thread regarding
Alexander I not marrying Draga Mašin, we partially discussed relations with Austria too, so you could look there as well.
To ensure a longer-lasting friendship, we would need to see Austria-Hungary give some concessions to the Serbs in order to ensure the popularity of the country within Serbia proper, to give reason for why the kingdom is attaching itself to Vienna by the thigh, which could mean less economic and political control from their end. In a world where we've got that, Serbia would more than likely be a member of the Triple Alliance, that is the Central Powers.
When it comes to WW1, I'd personally believe that in such a scenario, war would break out because of something unrelated to the Balkans, especially if we consider what was discussed in the thread I linked. Out of the Balkan-related causes Halagaz suggested, the only one I could see as possible is that of the Montenegrin assassination one, since we could presume Montenegro becoming the hub for preaching the unity of Serbdom, something which wouldn't be as supported by the Austrophilic government since Austria holds South Slavic lands. Otherwise, the next European war won't begin over some damned foolish thing in the Balkans, but some damned foolish thing elsewhere on the mainland.