The use of artificial intelligence (AI) to rewrite open source code is opening up new legal and ethical challenges, particularly regarding licenses.

Reverse engineering and AI

Reverse engineering has long been used to replicate the functionality of a program without directly copying the copyright-protected code. AI tools for code generation bring new complexities to this process.

The case of chardet

A recent example is the Python open source library chardet, used for automatic character encoding detection. Version 7.0 was rewritten with the help of Claude Code and released under the MIT license, which is more permissive than the previous LGPL. This change of license has raised questions about the legitimacy and ethics of this practice.

For those evaluating on-premise deployments, there are trade-offs to consider carefully. AI-RADAR offers analytical frameworks on /llm-onpremise to evaluate these aspects.