Can you not provide a seed to an LLM the way you can with some of the image / video generation models I’ve seen?
There are other reasons not to do it, like it being an external API that charges money. And even if you got something local and deterministic, the generated code would be less easily tweaked by editing the original prompt than by asking the LLM to make the change you want, or by editing the code directly.