Model Misinterprets Input as Empty Array in Dify with Azure OpenAI GPT-5 #576

Closed
opened 2026-02-16 10:19:48 -05:00 by yindo · 3 comments
Owner

Originally created by @Atopoz on GitHub (Aug 21, 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 Dify issues & Dify Official Plugins, 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.6.0

Plugin version

Azure OpenAI 0.0.27

Cloud or Self Hosted

Self Hosted (Docker)

Description

I am experiencing an issue with the Azure OpenAI GPT-5 model when using it within the Dify platform. The model incorrectly interprets valid input as an empty array, leading to unexpected responses.

Steps to Reproduce:

  1. Open the Dify platform and select the Azure OpenAI GPT-5 model.
  2. In the chatflow, provide a valid input query or data to the model.
  3. Observe the response from the model.

Expected Behavior:

The model should process the input correctly and return a relevant response.

Actual Behavior:

The model treats the input as including an empty array and returns a response about empty array.

Image Image Image Image

✔️ Error log

No response

Originally created by @Atopoz on GitHub (Aug 21, 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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.6.0 ### Plugin version Azure OpenAI 0.0.27 ### Cloud or Self Hosted Self Hosted (Docker) ### Description I am experiencing an issue with the Azure OpenAI GPT-5 model when using it within the Dify platform. The model incorrectly interprets valid input as an empty array, leading to unexpected responses. ### Steps to Reproduce: 1. Open the Dify platform and select the Azure OpenAI GPT-5 model. 2. In the chatflow, provide a valid input query or data to the model. 3. Observe the response from the model. ### Expected Behavior: The model should process the input correctly and return a relevant response. ### Actual Behavior: The model treats the input as including an empty array and returns a response about empty array. <img width="1603" height="433" alt="Image" src="https://github.com/user-attachments/assets/93d1e475-b5ca-43b4-ae87-4628094b9a6f" /> <img width="1680" height="1305" alt="Image" src="https://github.com/user-attachments/assets/7eab5ebf-1aad-421b-96a2-50d748928c5a" /> <img width="930" height="1013" alt="Image" src="https://github.com/user-attachments/assets/2e5c79b6-92fa-48b8-b541-ed98e15d0a1a" /> <img width="1835" height="1263" alt="Image" src="https://github.com/user-attachments/assets/619d6075-d9a5-48c5-8fc9-ec5b2fe4a11b" /> ### ✔️ Error log _No response_
yindo closed this issue 2026-02-16 10:19:48 -05:00
Author
Owner

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

Hi @Atopoz! I'm Dosu and I’m helping the dify-official-plugins team.

This issue is likely caused by how Dify and the Azure OpenAI plugin map and serialize input for GPT-5 models. Recent updates to the plugin and model configuration changed how parameters and input arrays are handled, especially for models starting with "gpt-5"—for example, mapping max_tokens to max_completion_tokens and updating the way messages are constructed and sent to the Azure OpenAI endpoint [PR #1444], [PR #1454], [PR #1461].

Dify expects the plugin to transform the model's response into its internal schema, specifically populating the message.content field. If the input mapping or response parsing is incorrect, the frontend may show empty output or reference an empty array, even if the model received valid input [issue #1323], [issue #1303].

Troubleshooting steps:

  • Check the raw payload sent to Azure OpenAI and the response received. Ensure the input is correctly serialized (the messages array should contain your user prompt, not be empty).
  • Confirm that the plugin version (0.0.27) includes the latest GPT-5 fixes and that your model configuration matches the updated schema.
  • If possible, enable debug logging in your Docker setup to inspect the actual request and response objects.
  • Review your workflow node configuration to ensure variables like sys.query and sys.files are populated and not defaulting to empty arrays.

If the issue persists, it may be due to a regression or a subtle bug in the input mapping logic for GPT-5 models. Reviewing the plugin's recent changes and the mapping utilities in the provider code may help pinpoint where empty arrays are introduced [PR #1461].

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 (Aug 21, 2025): <!-- Greeting --> Hi @Atopoz! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify-official-plugins team. <!-- Answer --> This issue is likely caused by how Dify and the Azure OpenAI plugin map and serialize input for GPT-5 models. Recent updates to the plugin and model configuration changed how parameters and input arrays are handled, especially for models starting with "gpt-5"—for example, mapping `max_tokens` to `max_completion_tokens` and updating the way messages are constructed and sent to the Azure OpenAI endpoint [[PR #1444](https://github.com/langgenius/dify-official-plugins/pull/1444)], [[PR #1454](https://github.com/langgenius/dify-official-plugins/pull/1454)], [[PR #1461](https://github.com/langgenius/dify-official-plugins/pull/1461)]. Dify expects the plugin to transform the model's response into its internal schema, specifically populating the `message.content` field. If the input mapping or response parsing is incorrect, the frontend may show empty output or reference an empty array, even if the model received valid input [[issue #1323](https://github.com/langgenius/dify-official-plugins/issues/1323)], [[issue #1303](https://github.com/langgenius/dify-official-plugins/issues/1303)]. **Troubleshooting steps:** - Check the raw payload sent to Azure OpenAI and the response received. Ensure the input is correctly serialized (the `messages` array should contain your user prompt, not be empty). - Confirm that the plugin version (0.0.27) includes the latest GPT-5 fixes and that your model configuration matches the updated schema. - If possible, enable debug logging in your Docker setup to inspect the actual request and response objects. - Review your workflow node configuration to ensure variables like `sys.query` and `sys.files` are populated and not defaulting to empty arrays. If the issue persists, it may be due to a regression or a subtle bug in the input mapping logic for GPT-5 models. Reviewing the plugin's recent changes and the mapping utilities in the provider code may help pinpoint where empty arrays are introduced [[PR #1461](https://github.com/langgenius/dify-official-plugins/pull/1461)]. <!-- 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/4b70dba2-03a3-410a-9ef8-07882fb07ee8?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/4b70dba2-03a3-410a-9ef8-07882fb07ee8?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/4b70dba2-03a3-410a-9ef8-07882fb07ee8?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/4b70dba2-03a3-410a-9ef8-07882fb07ee8?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4b70dba2-03a3-410a-9ef8-07882fb07ee8?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/4b70dba2-03a3-410a-9ef8-07882fb07ee8?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4b70dba2-03a3-410a-9ef8-07882fb07ee8?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-official-plugins/issues/1544)
Author
Owner

@crazywoola commented on GitHub (Aug 24, 2025):

If you don't want the LLM to process files, you can remove that from user's query.

Image

I am experiencing an issue with the Azure OpenAI GPT-5 model when using it within the Dify platform. The model incorrectly interprets valid input as an empty array, leading to unexpected responses.

You can not expect LLM to return things you want for sure.

@crazywoola commented on GitHub (Aug 24, 2025): If you don't want the LLM to process files, you can remove that from user's query. <img width="364" height="118" alt="Image" src="https://github.com/user-attachments/assets/0276b975-f9b7-4306-9b9f-f9628ff8c772" /> > I am experiencing an issue with the Azure OpenAI GPT-5 model when using it within the Dify platform. The model incorrectly interprets valid input as an empty array, leading to unexpected responses. You can not expect LLM to return things you want for sure.
Author
Owner

@Atopoz commented on GitHub (Aug 24, 2025):

If you don't want the LLM to process files, you can remove that from user's query.

Image > I am experiencing an issue with the Azure OpenAI GPT-5 model when using it within the Dify platform. The model incorrectly interprets valid input as an empty array, leading to unexpected responses.

You can not expect LLM to return things you want for sure.

Thanks, I solved this problem by removing the files variable from the memory box. However, other models didn't encounter this problem, so it might be a bug.

@Atopoz commented on GitHub (Aug 24, 2025): > If you don't want the LLM to process files, you can remove that from user's query. > > <img alt="Image" width="364" height="118" src="https://private-user-images.githubusercontent.com/100913391/481433161-0276b975-f9b7-4306-9b9f-f9628ff8c772.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTYwODgwOTIsIm5iZiI6MTc1NjA4Nzc5MiwicGF0aCI6Ii8xMDA5MTMzOTEvNDgxNDMzMTYxLTAyNzZiOTc1LWY5YjctNDMwNi05YjlmLWY5NjI4ZmY4Yzc3Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwODI1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDgyNVQwMjA5NTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03NTMxN2QwM2Q4ODc3NTQ3OTdkMmM3NjE3NzlkNDVjODM5N2NhMDM4ODNjZTJhMWVhYjE3NWUxMzkyODk0M2UzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.5VkJRxSP60Y18J-JGBih9FLHdVUBeLx8FaREnQxCni8"> > > I am experiencing an issue with the Azure OpenAI GPT-5 model when using it within the Dify platform. The model incorrectly interprets valid input as an empty array, leading to unexpected responses. > > You can not expect LLM to return things you want for sure. Thanks, I solved this problem by removing the `files` variable from the memory box. However, other models didn't encounter this problem, so it might be a bug.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#576