I mean, sure, except that many large open-source projects (e.g. Linux [1], Nixpkgs [2], etc) require this as part of their AI policy. Omit attribution in your own projects if you want, but the maintainers of these projects are owed at least that level of transparency for contributions.
[1] https://docs.kernel.org/process/coding-assistants.html
[2] https://github.com/NixOS/nixpkgs/commit/d18b8f3238abdb2cd878...