Chatflow Agent Node Pass wrong number value to custom tools when Automatic argument passing is disabled #13283

Closed
opened 2026-02-21 19:11:26 -05:00 by yindo · 4 comments
Owner

Originally created by @trunglebka on GitHub (Apr 24, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.2.0 and 1.3.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Create any Chatflow
Add Agent node, choose Tool call strategy
Add tool with number input. Say DummyTool has id param of int type
Toggle off Automatic argument passing for any number param and set it as any inputs of type Number
Run the flow which trigger the DummyTool
Check the passed value of id

For example, the user_id in the input is 123455
Tool execution output:

{
  "output": {
    "tool_call_id": "send_otp_code_to_an_email",
    "tool_call_input": {
      "email": "abc_xyz@gmail.com",
      "user_id": [
        "1744858660069",
        "user_id"
      ]
    },
    "tool_call_name": "send_otp_code_to_an_email",
    "tool_response": "tool invoke error: read tool response failed: request failed: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'"
  }
}

Image

✔️ Expected Behavior

Pass the correct value

Actual Behavior

Pass weird values (array)

Originally created by @trunglebka on GitHub (Apr 24, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.2.0 and 1.3.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Create any `Chatflow` Add `Agent` node, choose Tool call strategy Add tool with number input. Say `DummyTool` has `id` param of `int` type Toggle off `Automatic` argument passing for any number param and set it as any inputs of type Number Run the flow which trigger the DummyTool Check the passed value of `id` For example, the `user_id` in the input is `123455` Tool execution output: ``` { "output": { "tool_call_id": "send_otp_code_to_an_email", "tool_call_input": { "email": "abc_xyz@gmail.com", "user_id": [ "1744858660069", "user_id" ] }, "tool_call_name": "send_otp_code_to_an_email", "tool_response": "tool invoke error: read tool response failed: request failed: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'" } } ``` ![Image](https://github.com/user-attachments/assets/f214edfa-419f-43b6-80f1-f94e06bb92a7) ### ✔️ Expected Behavior Pass the correct value ### ❌ Actual Behavior Pass weird values (array)
yindo added the 🐞 bug label 2026-02-21 19:11:26 -05:00
yindo closed this issue 2026-02-21 19:11:26 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 24, 2025):

When 'Automatic argument passing' is disabled in the Dify Chatflow Agent Node, the mechanism for argument passing involves manually generating parameters based on the given tool parameters, variable pool, and node data. This is done through the _generate_agent_parameters method. The method retrieves values from the variable pool or directly from the node data, depending on the input type (e.g., "variable", "mixed", "constant") [1].

In your case, it seems that the number input is being passed incorrectly as an array, which might be due to how the parameters are being constructed or retrieved. Ensure that the input type is correctly set and that the variable pool contains the expected values. Additionally, check if there are any transformations or conversions applied to the input that might result in an array format instead of a single integer value.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 24, 2025): <!-- Answer --> When 'Automatic argument passing' is disabled in the Dify Chatflow Agent Node, the mechanism for argument passing involves manually generating parameters based on the given tool parameters, variable pool, and node data. This is done through the `_generate_agent_parameters` method. The method retrieves values from the variable pool or directly from the node data, depending on the input type (e.g., "variable", "mixed", "constant") <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/agent/agent_node.py)</sup>. In your case, it seems that the number input is being passed incorrectly as an array, which might be due to how the parameters are being constructed or retrieved. Ensure that the input type is correctly set and that the variable pool contains the expected values. Additionally, check if there are any transformations or conversions applied to the input that might result in an array format instead of a single integer value. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/7122ab67-de32-46e4-b8ea-e7643c3dc80d?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/7122ab67-de32-46e4-b8ea-e7643c3dc80d?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/7122ab67-de32-46e4-b8ea-e7643c3dc80d?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/7122ab67-de32-46e4-b8ea-e7643c3dc80d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7122ab67-de32-46e4-b8ea-e7643c3dc80d?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/7122ab67-de32-46e4-b8ea-e7643c3dc80d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7122ab67-de32-46e4-b8ea-e7643c3dc80d?feedback_type=other)</sup>
Author
Owner

@pedrogomes02 commented on GitHub (Jun 9, 2025):

I’m encountering the same issue. In the initial dialog message, the agent correctly fills the tool input parameters using the values stored in the conversation variables. However, in subsequent messages, the agent tries to infer the input values (automatic is diabled) instead of using the existing values from the conversation variables.
Using Dify 1.4.1 release

@pedrogomes02 commented on GitHub (Jun 9, 2025): I’m encountering the same issue. In the initial dialog message, the agent correctly fills the tool input parameters using the values stored in the conversation variables. However, in subsequent messages, the agent tries to infer the input values (automatic is diabled) instead of using the existing values from the conversation variables. Using Dify 1.4.1 release
Author
Owner

@nicho2 commented on GitHub (Jun 18, 2025):

Hello,
I have the same think:

i use dify version 1.4.3

Image

{
  "output": {
    "llm_response": "",
    "tool_responses": [
      {
        "tool_call_id": "get_statistics_from_namespace_between_two_dates_get_statistics_from_namespace_between_two_dates__namespace__get",
        "tool_call_input": {
          "collection_name": "ieq_data",
          "database_name": "bati_analytique",
          "end_date": "2025-06-18T00:00:00",
          "namespace": "workcafe",
          "start_date": "2025-06-17T00:00:00"
        },
        "tool_call_name": "get_statistics_from_namespace_between_two_dates_get_statistics_from_namespace_between_two_dates__namespace__get",
        "tool_response": "null"
      }
    ]
  }
}
@nicho2 commented on GitHub (Jun 18, 2025): Hello, I have the same think: i use dify version 1.4.3 ![Image](https://github.com/user-attachments/assets/212211bd-1cd0-494d-986d-eae37f185d34) { "output": { "llm_response": "", "tool_responses": [ { "tool_call_id": "get_statistics_from_namespace_between_two_dates_get_statistics_from_namespace_between_two_dates__namespace__get", "tool_call_input": { "collection_name": "ieq_data", "database_name": "bati_analytique", "end_date": "2025-06-18T00:00:00", "namespace": "workcafe", "start_date": "2025-06-17T00:00:00" }, "tool_call_name": "get_statistics_from_namespace_between_two_dates_get_statistics_from_namespace_between_two_dates__namespace__get", "tool_response": "null" } ] } }
Author
Owner

@dosubot[bot] commented on GitHub (Aug 28, 2025):

Hi, @trunglebka. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that disabling automatic argument passing in a Chatflow Agent node causes a tool expecting a numeric input to receive an array instead, leading to type errors.
  • The issue seems linked to how parameters are manually generated from variable pools or node data when automatic passing is off.
  • Other users have confirmed similar problems in versions 1.4.1 and 1.4.3, with initial inputs correct but subsequent messages causing inference errors or null responses.
  • The root cause appears to be related to parameter handling in manual argument passing mode, but no resolution has been found yet.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open.
  • If I don’t hear back within 15 days, I will automatically close this issue to help focus on active problems.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 28, 2025): Hi, @trunglebka. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that disabling automatic argument passing in a Chatflow Agent node causes a tool expecting a numeric input to receive an array instead, leading to type errors. - The issue seems linked to how parameters are manually generated from variable pools or node data when automatic passing is off. - Other users have confirmed similar problems in versions 1.4.1 and 1.4.3, with initial inputs correct but subsequent messages causing inference errors or null responses. - The root cause appears to be related to parameter handling in manual argument passing mode, but no resolution has been found yet. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open. - If I don’t hear back within 15 days, I will automatically close this issue to help focus on active problems. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13283