I've not personally tested such stuff (as my setup is complete and I did the metadata all by hand before the age of LLMs), but to my understanding; the LLM is able to write opf/XML/whatever files you want for metadata, or even edit the file directly to add metadata. epubs and PDFs support author/title/etc tags iirc, so its not too hard to get the LLM to apply those after ingesting the text and searching online for matches.
I shitpost a lot in comments, making shitposts is lame and for losers. better to actually say meaningful things with a post rather than a nothingburger shitpost xD