Was the AI/engineer prompted in a way designed to elicit a close derivative of Open Source work, or is the task context novel and focused on solving a unique problem?
Is the resulting system close in design, architecture and specific snippets? Or is it very different?
I've seen academic AI that writes science papers, quoting and citing Source papers. This is usually done by using RAG to locate papers and extract specific quotes.
Now imagine a rag assisted open source coding system that can pull code from all over GitHub. It may vendor and modify a certain dependency. But it will also keep a copy of the original code's license, as requested by the license. If the AI eventually rewrites that dependency from scratch with a clean room implementation, then it can drop the license.
IANAL and this hasn't really been sorted out by the courts at all yet, but you could certainly make an argument that AI generating code based on what it has scraped is a derivative work. I am yet to see an AI bot that outputs licenses and copyright notices with it's generated code.