Akin to Java in Oracle vs Google case, keeping the API but LLM-ing the implementation can be considered as fair use.