AI Coding Assistants and Licensing: What "Trained On" Actually Means for Your Code
Whether an AI coding assistant learned from permissively licensed code, proprietary code, or something in between is a separate question from who owns what it outputs.
A separate piece in this category already covers who owns code an AI assistant generates for you. This one covers an earlier, different question: what code the assistant itself was trained on in the first place, and whether that training data's own license terms create any obligation that follows the assistant's output.
Large coding models are trained on enormous corpora of publicly available source code, much of it pulled from public repositories carrying real open-source licenses -- permissive licenses like MIT and Apache that allow reuse with minimal conditions, and copyleft licenses like GPL that require derivative works to carry the same license forward. A model trained on that mix has, in some sense, learned patterns from code that came with real legal terms attached.
Whether training a model on that code in the first place requires complying with those licenses' terms is a genuinely unsettled legal question, actively being tested in court in multiple ongoing lawsuits against AI vendors -- not a settled point either side can currently cite with full confidence. Separately, and more practically, a small number of documented cases have shown coding assistants reproducing long, close-to-verbatim stretches of code from their training data on certain prompts, which raises the licensing question again on the output side, since a copyleft license's obligations could conceivably attach to a chunk of code that closely matches its licensed source.
This is why enterprise AI coding tools increasingly advertise things like training-data provenance filtering (excluding restrictively licensed code from the training set entirely) and IP indemnification (the vendor contractually assuming legal risk if its output turns out to infringe). Neither feature exists on a typical free consumer tier, which is worth checking specifically before relying on an assistant's output in a codebase with real licensing obligations of its own.
None of this means every AI-suggested line of code carries hidden legal risk -- most suggestions are short, generic, and wouldn't be copyrightable on their own even coming from a human. It does mean "what was this trained on, and does that carry any obligation" is a real, separate question from "who owns what it just wrote me," worth keeping distinct rather than treating as the same settled issue.
