Yeah I'd imagine that's the best way. Lots of LLMs can generate workable Python code too, so code that jives with Blender's Python API doesn't seem like too much of a leap.
The only trick is that there has to be enough Blender Python code to train the LLM on.