It’s called a transpiler; you don’t need AI for this, but it’s obviously still licensed same as original - because it is the original, only translated.
I'm not talking about a transpiler, I'm talking about feeding massive amounts of non-GPL code into an AI and then ask it to produce new code based on that. A transpiler would simply take a single codebase and translate it into a new format, the obvious difference being that such a tool has an obvious and introspectable transformation function.
If the resulting code works the same way, it’s still a transpiler. If the resulting code works in a different way… then I have to ask what exactly does it do and how’s that supposed to be useful.