How is your experience with the OutSystems Community?
20
Views
1
Comments
AI Agent Action Fails Unless Input Is Set as “Generated by AI”

Hi everyone,

I am working with an OutSystems ODC AI Agent that calls an action from the agent flow.

I found an issue where the action fails if one of the action input parameters is not configured as Generated by AI.

The error I receive is:

OS-BERT-62000 - Error executing actionFailed to call AI model. Status code: BadRequest. The Mistral AI model provider returned this message: "MistralException - {"object":"error","message":"Tool call id has to be defined.","type":"invalid_request_invalid_args","param":null,"code":"3051","raw_status_code":400}." (OS-ABRS-FM-40001)

The action is used by an AI Agent and has inputs similar to:

  • ExportFileName
  • Query
  • SessionId

In my case:

  • ExportFileName is set as Generated by AI
  • Query is set as Generated by AI
  • SessionId is mapped from an input variable variable

The action is intended to export Monday.com board items to CSV. The agent should decide the file name and query, while the session ID should come from the current session context.

However, when the action input configuration is not marked as Generated by AI, the agent call fails with the Mistral error:

Tool call id has to be defined.

Once the input is changed to Generated by AI, the action seems to be handled correctly when the agent gets the input correctly of the SessionId.

I am trying to understand whether this is expected behavior or a configuration issue.

My questions are:

  1. For actions called by AI Agents, do all inputs that are part of the tool call need to be set as Generated by AI?
  2. Can an agent action safely mix:
    • values generated by AI, and
    • values mapped from app/session variables?
  3. What is the recommended way to pass internal values like SessionId into an action called by an AI Agent?
  4. Should internal parameters be hidden from the AI-generated input schema and injected by the app instead?

Expected behavior:

The AI Agent should generate only the values it needs to control, such as Query and ExportFileName, while application-controlled values like SessionId should be passed from the OutSystems context without causing the model/tool call to fail.

Actual behavior:

The action fails unless the relevant action input is configured as Generated by AI.

Has anyone else seen this behavior with ODC AI Agents ?




Screenshot 2026-06-19 162513.png
Screenshot 2026-06-19 162526.png
Screenshot 2026-06-19 162500.png
2026-03-09 12-26-51
Fábio Fantato
 
MVP

Hi @João Andrade , did you try to complete the sessionID description to something like "Use the same sessionId of the current agent call"?  In your screenshot the description is only "S". Probably the AI is ignoring this because it could not understand what should be provided here.  How better you describe this field, better the AI could decide the best ID to put here.


Regards

Fabio

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.