It also shows why this approach is questionable. Opus 4.6 without tool use or web access can provide chardets source code in full from memory/training data (ironically, including the licensing header): https://gist.github.com/yannleretaille/1ce99e1872e5f3b7b133e...
Wow, I did not expect such perfect reproduction. Link to the actual source code (before being rewritten):
https://github.com/chardet/chardet/blob/5.0.0/chardet/mbchar...
This comes with the uncomfortable implication that its impossible to tell actually to what extent are LLMs pulling together snippets of GPLd code, and to what extent is that legally acceptable.