Getting below error when trying to add two numbers from Agent in Agent Starter app

0
I am using Agent Builder app and created one agent which will do addition of two numbers with microflow (add two numbers) configured as tool. But I am getting an error mentioned below. Looking for guidance here if anyone has encountered the same error and have resolution for this ?       An error occurred in the REST call for operation Chat Completions.Microflow: Request_POSTHttpStatus : 400Content: {  "error": {    "message": "An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. The following tool_call_ids did not have response messages: call_wtIwqL3H9UecbCL3lZUTg9IS, call_ha1rMGMkkeoNQyRRSaeYwZrg",    "type": "invalid_request_error",    "param": "messages",    "code": null  }}Reasonphrase: Bad Request com.mendix.modules.microflowengine.MicroflowException 400: Bad Request    at OpenAIConnector.Request_POST (CallRest : 'Call REST (POST)')    at OpenAIConnector.Request_CallAPI (SubMicroflow : 'Request_POST')    at {"name":"GenAICommons.Request_ExecuteFromConnector","type":"JavaAction"}    at OpenAIConnector.ChatCompletions_WithHistory_Execute (JavaAction : 'Request_ExecuteFromConnector')    at {"name":"GenAICommons.ChatCompletions_WithHistory","type":"JavaAction"}    at GenAICommons.ChatCompletions_WithHistory (JavaAction : 'ChatCompletions_WithHistory')    at AgentCommons.ChatContext_ChatWithHistory_ActionMicroflow_AgentBuilder (SubMicroflow : 'Chat Completions (with history)')    at {"name":"ConversationalUI.ProviderConfig_ExecuteAction","type":"JavaAction"}    at ConversationalUI.ChatContext_ExecuteAction (JavaAction : 'ProviderConfig_ExecuteAction') Advanced stacktrace:Error calling REST service    at OpenAIConnector.Request_POST (CallRest : 'Call REST (POST)')    at OpenAIConnector.Request_CallAPI (SubMicroflow : 'Request_POST')    at {"name":"GenAICommons.Request_ExecuteFromConnector","type":"JavaAction"}    at OpenAIConnector.ChatCompletions_WithHistory_Execute (JavaAction : 'Request_ExecuteFromConnector')    at {"name":"GenAICommons.ChatCompletions_WithHistory","type":"JavaAction"}    at GenAICommons.ChatCompletions_WithHistory (JavaAction : 'ChatCompletions_WithHistory')    at AgentCommons.ChatContext_ChatWithHistory_ActionMicroflow_AgentBuilder (SubMicroflow : 'Chat Completions (with history)')    at {"name":"ConversationalUI.ProviderConfig_ExecuteAction","type":"JavaAction"}    at ConversationalUI.ChatContext_ExecuteAction (JavaAction : 'ProviderConfig_ExecuteAction') Advanced stacktrace:    at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:84) Caused by:400: Bad Request    at OpenAIConnector.Request_POST (CallRest : 'Call REST (POST)')    at OpenAIConnector.Request_CallAPI (SubMicroflow : 'Request_POST')    at {"name":"GenAICommons.Request_ExecuteFromConnector","type":"JavaAction"}    at OpenAIConnector.ChatCompletions_WithHistory_Execute (JavaAction : 'Request_ExecuteFromConnector')    at {"name":"GenAICommons.ChatCompletions_WithHistory","type":"JavaAction"}    at GenAICommons.ChatCompletions_WithHistory (JavaAction : 'ChatCompletions_WithHistory')    at AgentCommons.ChatContext_ChatWithHistory_ActionMicroflow_AgentBuilder (SubMicroflow : 'Chat Completions (with history)')    at {"name":"ConversationalUI.ProviderConfig_ExecuteAction","type":"JavaAction"}    at ConversationalUI.ChatContext_ExecuteAction (JavaAction : 'ProviderConfig_ExecuteAction') Advanced stacktrace:    at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:84)
asked
2 answers
0

Hi Vivek,

 

I can't say for sure what is going wrong, but could you check the version numbers of your modules?

 

I just tested the same (in a different app but newest modules from the marketplace) and it works.

 

The Agent Builder Starter App will be updated soon to contain the newest versions of the modules. The support for multiple input parameters for function microflows was only introduced recently, so this might not be part of your app.

image.png

 

 

Best regards

Liam

answered
0

I am using below versions for OpenAI Connector and GenAICommons. Also sharing MF detailsScreenshot 2025-08-08 172840.pngScreenshot 2025-08-08 172916.pngScreenshot 2025-08-08 173019.png 

answered