If you grade on pass/fail it’s easy to grade. Not every course uses letter grades…
If you let people use AI they are still accountable for the code written under their name. If they can’t look at the code and explain what it’s doing, that’s not demonstrating understanding.