Function Calling and DoExecuted event with Claude API

I use TTMSMCPCloudAIService component.

I am testing function calling with Claude API. The function calls work correctly, but the DoExecuted event is fired while there are tools not executed already. I would like to use the event DoExecuted in order to know the final response from Claude, but in this case there is no response already.

I have made a similar call with Mistral API and the DoExecuted event is fired when the final response is received. In TTMSMCPCloudAI.DoClaudeRequest, DoExecuted is always executed whithout checking if it is a tool call. So it seems it could be bug specific to Claude requests.

Thanks in advance

Please provide more details how this can be reproduced.
In our demos, the OnExecuted event is used to show the execution results in the memo. When we run these demos where tool calls are used, the OnExecuted event is also triggered when the Claude LLM is selected.

I have tested it with AIWeatherDemo. The event is executed, and the result is shown correctly on the memo.

But the problem is that the event is executed twice. The first time, the final response is not ready. In the demo this is not a problem, because it simply sets the memo text to an empty string, and the next time the event is called the memo is filled with the final response.

But I need to use the event from our server code, which needs to detect the final response from Claude API. And because the event is fired twice, I do not know how to detect if there is the final response or an intermediate one. With Mistral API I do not have problem, because the event is fired only once, with the final response.

Thanks in advance

We traced & solved this issue with Claude tools handling. The next update of TMS AI Studio will have this fixed.