I have briefly tested my #AIText #question type with #Moodle 5 and it appears to work as expected. It gives feedback and (optionally) marks to a student response based on prompt to the #LLM. In this case it was OpenAI with gpt-4.1 With thanks to @PhilippMemmel who gave me an essential hint about the code.
My next stop will be to test against
https://github.com/mebis-lp/moodle-local_ai_manager
Which is the Mebis-lp (Bavaria) AI back end which is a good alternative to the core Moodle AI subsystem.