[bug] The agent-chat app encountered an internal error when variables included a float number #15597

Closed
opened 2026-02-21 19:22:28 -05:00 by yindo · 5 comments
Owner

Originally created by @IthacaDream on GitHub (Jul 23, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.6.0

Cloud or Self Hosted

Cloud, Self Hosted (Docker), Self Hosted (Source)

Steps to reproduce

The agent-chat app encountered an internal error when variables included a float number, shown in the screenshot below.

Image

✔️ Expected Behavior

Both Integer and Float should be supported as Number variable types

Actual Behavior

No response

Originally created by @IthacaDream on GitHub (Jul 23, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.6.0 ### Cloud or Self Hosted Cloud, Self Hosted (Docker), Self Hosted (Source) ### Steps to reproduce The agent-chat app encountered an internal error when variables included a float number, shown in the screenshot below. <img width="763" height="352" alt="Image" src="https://github.com/user-attachments/assets/024ba49a-8ee7-4b01-925c-f8bfbf542969" /> ### ✔️ Expected Behavior Both Integer and Float should be supported as Number variable types ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:22:28 -05:00
yindo closed this issue 2026-02-21 19:22:28 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 23, 2025):

This is a known issue in Dify v1.6.0: the agent-chat app can throw an internal error if a variable of type "number" is assigned a float value. The root cause is that some validation logic only accepts integers for "number" types, so floats like 2.5 are rejected and cause a server error.

Recent pull requests have addressed this by updating type checks and validators to accept both integers and floats for number variables, and by improving serialization and variable type handling throughout the workflow system. However, these fixes were merged after v1.6.0 and are not included in your current version (PR #21667, PR #22025, PR #22414).

If you need a workaround before upgrading, you can try:

  • Using integer values instead of floats for number variables, or
  • Temporarily storing float values as strings (and converting them back to floats in your logic if needed).

When a new release is published that includes these PRs, upgrading will resolve the issue and allow both integer and float values for number variables as expected.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jul 23, 2025): <!-- Answer --> This is a known issue in Dify v1.6.0: the agent-chat app can throw an internal error if a variable of type "number" is assigned a float value. The root cause is that some validation logic only accepts integers for "number" types, so floats like 2.5 are rejected and cause a server error. Recent pull requests have addressed this by updating type checks and validators to accept both integers and floats for number variables, and by improving serialization and variable type handling throughout the workflow system. However, these fixes were merged after v1.6.0 and are not included in your current version ([PR #21667](https://github.com/langgenius/dify/pull/21667), [PR #22025](https://github.com/langgenius/dify/pull/22025), [PR #22414](https://github.com/langgenius/dify/pull/22414)). If you need a workaround before upgrading, you can try: - Using integer values instead of floats for number variables, or - Temporarily storing float values as strings (and converting them back to floats in your logic if needed). When a new release is published that includes these PRs, upgrading will resolve the issue and allow both integer and float values for number variables as expected. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/22837)
Author
Owner

@IthacaDream commented on GitHub (Jul 23, 2025):

This is a known issue in Dify v1.6.0: the agent-chat app can throw an internal error if a variable of type "number" is assigned a float value. The root cause is that some validation logic only accepts integers for "number" types, so floats like 2.5 are rejected and cause a server error.

Recent pull requests have addressed this by updating type checks and validators to accept both integers and floats for number variables, and by improving serialization and variable type handling throughout the workflow system. However, these fixes were merged after v1.6.0 and are not included in your current version (PR #21667, PR #22025, PR #22414).

If you need a workaround before upgrading, you can try:

  • Using integer values instead of floats for number variables, or
  • Temporarily storing float values as strings (and converting them back to floats in your logic if needed).

When a new release is published that includes these PRs, upgrading will resolve the issue and allow both integer and float values for number variables as expected.

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosu that's right, cannot input float variable, which led generating conversation name error

@IthacaDream commented on GitHub (Jul 23, 2025): > This is a known issue in Dify v1.6.0: the agent-chat app can throw an internal error if a variable of type "number" is assigned a float value. The root cause is that some validation logic only accepts integers for "number" types, so floats like 2.5 are rejected and cause a server error. > > Recent pull requests have addressed this by updating type checks and validators to accept both integers and floats for number variables, and by improving serialization and variable type handling throughout the workflow system. However, these fixes were merged after v1.6.0 and are not included in your current version ([PR #21667](https://github.com/langgenius/dify/pull/21667), [PR #22025](https://github.com/langgenius/dify/pull/22025), [PR #22414](https://github.com/langgenius/dify/pull/22414)). > > If you need a workaround before upgrading, you can try: > > * Using integer values instead of floats for number variables, or > * Temporarily storing float values as strings (and converting them back to floats in your logic if needed). > > When a new release is published that includes these PRs, upgrading will resolve the issue and allow both integer and float values for number variables as expected. > > _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._ > > How did I do? [Good](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f03eda28-50a0-4917-885b-9f8269ed7d31?feedback_type=other)  [![Join Discord](https://camo.githubusercontent.com/d562c2df5e4567ea41d37f1d91a4da0839d8341037045b103b2da268998de17f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot) [![Share on X](https://camo.githubusercontent.com/4649f705e2396d6f328dbc8e800a0509c9c17b3b20253b36706c393df124b93d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/22837) @dosu that's right, cannot input float variable, which led generating conversation name error
Author
Owner

@dosubot[bot] commented on GitHub (Jul 23, 2025):

You're correct—the conversation name generation error is a direct result of the float variable validation bug in Dify v1.6.0. When a float is used for a "number" variable, the validation fails, which breaks any downstream feature that relies on that variable, including conversation name generation. The recent PRs you mentioned (PR #21667, PR #22025, PR #22414) update the validation and serialization logic to support both integers and floats, so once those changes are released, this error will be resolved. There aren't any other documented workarounds or patches for this specific issue in v1.6.0.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jul 23, 2025): <!-- Answer --> You're correct—the conversation name generation error is a direct result of the float variable validation bug in Dify v1.6.0. When a float is used for a "number" variable, the validation fails, which breaks any downstream feature that relies on that variable, including conversation name generation. The recent PRs you mentioned ([PR #21667](https://github.com/langgenius/dify/pull/21667), [PR #22025](https://github.com/langgenius/dify/pull/22025), [PR #22414](https://github.com/langgenius/dify/pull/22414)) update the validation and serialization logic to support both integers and floats, so once those changes are released, this error will be resolved. There aren't any other documented workarounds or patches for this specific issue in v1.6.0. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/03d2f515-2172-48c9-9eb8-fce3909a7172?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/03d2f515-2172-48c9-9eb8-fce3909a7172?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/03d2f515-2172-48c9-9eb8-fce3909a7172?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/03d2f515-2172-48c9-9eb8-fce3909a7172?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/03d2f515-2172-48c9-9eb8-fce3909a7172?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/03d2f515-2172-48c9-9eb8-fce3909a7172?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/03d2f515-2172-48c9-9eb8-fce3909a7172?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/22837)
Author
Owner

@IthacaDream commented on GitHub (Jul 23, 2025):

@dosu you are a clever AI bot but not that clever. 😄

@IthacaDream commented on GitHub (Jul 23, 2025): @dosu you are a clever AI bot but not that clever. 😄
Author
Owner

@dosubot[bot] commented on GitHub (Jul 23, 2025):

😄 Touché! I’m always working on my cleverness—maybe one day I’ll even handle float variables without breaking a sweat. If you have more bugs to throw my way (or just want to test my wit), I’m here for it!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jul 23, 2025): <!-- Answer --> 😄 Touché! I’m always working on my cleverness—maybe one day I’ll even handle float variables without breaking a sweat. If you have more bugs to throw my way (or just want to test my wit), I’m here for it! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/a0c54925-bcea-429e-8a99-a70a8190cc79?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a0c54925-bcea-429e-8a99-a70a8190cc79?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a0c54925-bcea-429e-8a99-a70a8190cc79?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a0c54925-bcea-429e-8a99-a70a8190cc79?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a0c54925-bcea-429e-8a99-a70a8190cc79?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a0c54925-bcea-429e-8a99-a70a8190cc79?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a0c54925-bcea-429e-8a99-a70a8190cc79?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/22837)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15597