Ai Assistant error

I have upgraded to Wappler 7.7.2 and when using the Ai Assistant, I receive the following error.

The assistant runs for a bit, but then displays the error. I have to start a new chat each time.

I have tried to ask the assistant to continue, bit will again get the error.

If you need more information, please let me know.

Hello, which AI model are you using?

Hi Teodor,

It was Opus 4.6. I can try other models tomorrow when I'm back in the office to see if I get the same error.

Ray.

Hi Ray,

Opus 4.6 is much more restrictive than other/previous agents, hence using another model will not produce the error.

When you get the error using Opus 4.6, AI suggests adding this instruction:

“Do not modify or regenerate tool_use_id values. Always reuse the exact ID provided.”

Are you using the Anthropic API or another provider? It seems in your screenshot that it does work for a little while before the error comes, is it with some specific tool call that it happens?

Here are two examples and the task just before the errors

Claude Opus 4.6

GitHub Copilot

image

Should I be using something other than GitHub Copilot?

Thanks
Ray

Do the errors mostly happen in the Editor chat panel or also in the AI manager?

Turn on the experimental feature Enable On-Demand System Prompts and use only the AI manager, the new experimental option will cost less tokens and the AI manager can do all edits by itself instead of delegating it to the Editor AI assistant. This also costs fewer premium requests with Github Copilot.

Hi Patrick,

In both, see below.

I will try the experimental feature.

Thanks
Ray