> but you can't honestly expect someone to check every repo available from all time to see if a model [...] might've reproduced code from it.
Well, if you care about not violating any licenses, you could buy services from an LLM provider that was only trained on code in the Public Domain (or code that the LLM provider licensed for that purpose), and/or buy some kind of legal guarantee from the LLM provider that the code produced is "clean".
Of course, that'd be much more expensive than current offerings, but it would reflect the real cost of software development, not just YOLOing it, from a legal perspective.
When I wrote a book, part of the contract with my publisher was that I had to attest that I actually wrote the book myself, that quotes were properly attributed etc. If you buy code-writing services, why shouldn't it contain similar clauses?