Linus Torvalds used AI to fix a Linux bug, and now LLM critics on Linux face an uncomfortable choice
(www.xda-developers.com)
The documents I quote are from publications by the U.S. Copyright Office. But, the Berne convention and the WTO ensure that member states copyrights are aligned.
I doubt "allow for AI generated code" has the bipartisan support you think it does; it certainly doesn't have the popular support. But, ever if it were legal, it should still be unethical (e.g. Amnesty International's reports of human rights violations in generative AI), and I'd be attempting to avoid it.