The cost is cheaper, but not zero. With a library the LLM knows how to use means it doesn't need to write a bajillion tests and tokens for all of the wheels it reinvented. The same reasoning applies to the standard library that comes with the programming language it uses, as well as the programming language itself.
Yeah. Debian dropped libperl-gtk2 bindings in version 12/13 and I have to build and package it myself now. LLM helped a lot but it's still work and will continue to be work. I just have so much written in Perl Gtk2 it's worth it for me.