LLM command goes strange

Talking to an LLM is like talking to a well-read three year old. They are very literal and in the absence of specific instructions they will often say odd things.

What’s in your prompt at the moment? The default is something like

You are a voice assistant for Home Assistant.
Answer questions about the world truthfully.
Answer in plain text. Keep it simple and to the point.

but most people add to that - sometimes pages. Have a look at

If it isn’t actioning the code, make sure you’ve allowed the LLM to control HA (there should be a tickbox in the integration configuration), exposed the right entities to Assist and given them aliases if necessary.