New API like secretstream includes algo into API names, so, I hope, it is "stable forever", but it is rather new feature.
Basic APIs like "crypto_secretbox" are "black boxes" and there are no any guarantees spelled out. Algorithms are mentioned in documentation, though.
What will do libsodium if used algorithm will be broken? I don't know.
Means you'd have to find a compiled lib with the exact same settings to decrypt them though.
In 12 years, libsodium never had any breaking API changes, even though I don't like the NaCl API much (especially usage of `unsigned long long` instead of `size_t` for sizes).
API stability is something I'm very committed to, in all my software. APIs can always be improved. But from a developer perspective, a suboptimal but stable API is far better than something that requires changes to all your applications every time the dependencies are updated.