Agent app is not supported in blocking mode? Why? #1003

Closed
opened 2026-02-21 17:29:27 -05:00 by yindo · 3 comments
Owner

Originally created by @joyjoyyo on GitHub (Jan 31, 2024).

Self Checks

Provide a description of the help you need

I want to use the blocking mode in the agent app.

Originally created by @joyjoyyo on GitHub (Jan 31, 2024). ### Self Checks - [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 file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). ### Provide a description of the help you need I want to use the blocking mode in the agent app.
yindo added the 💪 enhancement🐞 bug labels 2026-02-21 17:29:27 -05:00
yindo closed this issue 2026-02-21 17:29:27 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 31, 2024):

🤖

Hey there, @joyjoyyo! Fancy seeing you here again. Hope you're doing splendidly! 🚀

Based on the current codebase of dify, the blocking mode seems to be part of the moderation settings. It's not explicitly referred to as "blocking mode", but it can be inferred from the code that it relates to the moderation settings that control the inputs and outputs of the system.

The moderation settings can be configured for different types of providers, including 'openai_moderation', 'keywords', and 'api'. The settings for each provider type can be customized, and the changes are handled by different functions such as handleDataKeywordsChange, handleDataContentChange, handleDataApiBasedChange, and handleDataExtraChange.

Here is the code that handles the changes to the moderation settings for inputs and outputs:

<ModerationContent
  title={t('appDebug.feature.moderation.modal.content.input') || ''}
  config={localeData.config?.inputs_config || { enabled: false, preset_response: '' }}
  onConfigChange={config => handleDataContentChange('inputs_config', config)}
  info={(localeData.type === 'api' && t('appDebug.feature.moderation.modal.content.fromApi')) || ''}
  showPreset={!(localeData.type === 'api')}
/>
<ModerationContent
  title={t('appDebug.feature.moderation.modal.content.output') || ''}
  config={localeData.config?.outputs_config || { enabled: false, preset_response: '' }}
  onConfigChange={config => handleDataContentChange('outputs_config', config)}
  info={(localeData.type === 'api' && t('appDebug.feature.moderation.modal.content.fromApi')) || ''}
  showPreset={!(localeData.type === 'api')}
/>

In the case of 'api' type, the preset responses are not shown, and the information is fetched from the API. For other types, the preset responses are shown and can be customized by the user.

However, I wasn't able to find specific information about why the blocking mode is not supported in the agent app. It's possible that this information is not available in the repository or I may have missed it. Could you provide more details about the issue you're experiencing? This could help me understand the problem better and provide a more accurate response.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot[bot] commented on GitHub (Jan 31, 2024): _🤖_ <!-- Greeting --> Hey there, @joyjoyyo! Fancy seeing you here again. Hope you're doing splendidly! 🚀 <!-- Answer --> Based on the current codebase of dify, the blocking mode seems to be part of the moderation settings. It's not explicitly referred to as "blocking mode", but it can be inferred from the code that it relates to the moderation settings that control the inputs and outputs of the system. The moderation settings can be configured for different types of providers, including 'openai_moderation', 'keywords', and 'api'. The settings for each provider type can be customized, and the changes are handled by different functions such as `handleDataKeywordsChange`, `handleDataContentChange`, `handleDataApiBasedChange`, and `handleDataExtraChange`. Here is the code that handles the changes to the moderation settings for inputs and outputs: ```tsx <ModerationContent title={t('appDebug.feature.moderation.modal.content.input') || ''} config={localeData.config?.inputs_config || { enabled: false, preset_response: '' }} onConfigChange={config => handleDataContentChange('inputs_config', config)} info={(localeData.type === 'api' && t('appDebug.feature.moderation.modal.content.fromApi')) || ''} showPreset={!(localeData.type === 'api')} /> <ModerationContent title={t('appDebug.feature.moderation.modal.content.output') || ''} config={localeData.config?.outputs_config || { enabled: false, preset_response: '' }} onConfigChange={config => handleDataContentChange('outputs_config', config)} info={(localeData.type === 'api' && t('appDebug.feature.moderation.modal.content.fromApi')) || ''} showPreset={!(localeData.type === 'api')} /> ``` In the case of 'api' type, the preset responses are not shown, and the information is fetched from the API. For other types, the preset responses are shown and can be customized by the user. However, I wasn't able to find specific information about why the blocking mode is not supported in the agent app. It's possible that this information is not available in the repository or I may have missed it. Could you provide more details about the issue you're experiencing? This could help me understand the problem better and provide a more accurate response. ## Sources - [web/app/components/app/configuration/toolbox/moderation/moderation-setting-modal.tsx](https://github.com/langgenius/dify/blob/main/web/app/components/app/configuration/toolbox/moderation/moderation-setting-modal.tsx) --- This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
Author
Owner

@takatost commented on GitHub (Jan 31, 2024):

Agent's reasoning time is usually longer, and in most cases, the Blocking mode will directly time out.
For example, if you use Cloudflare, the connection timeout is only 100s. Many external reverse proxies in enterprise environments may be even stricter, perhaps only 10s. After timing out, it is difficult to locate which layer the problem is in. Enabling Blocking mode may actually bring more problems.
My suggestion is to directly receive streaming data and temporarily store it in an object, and then output it all at once after it ends.

@takatost commented on GitHub (Jan 31, 2024): Agent's reasoning time is usually longer, and in most cases, the Blocking mode will directly time out. For example, if you use Cloudflare, the connection timeout is only 100s. Many external reverse proxies in enterprise environments may be even stricter, perhaps only 10s. After timing out, it is difficult to locate which layer the problem is in. Enabling Blocking mode may actually bring more problems. My suggestion is to directly receive streaming data and temporarily store it in an object, and then output it all at once after it ends.
Author
Owner

@joyjoyyo commented on GitHub (Jan 31, 2024):

Agent's reasoning time is usually longer, and in most cases, the Blocking mode will directly time out. For example, if you use Cloudflare, the connection timeout is only 100s. Many external reverse proxies in enterprise environments may be even stricter, perhaps only 10s. After timing out, it is difficult to locate which layer the problem is in. Enabling Blocking mode may actually bring more problems. My suggestion is to directly receive streaming data and temporarily store it in an object, and then output it all at once after it ends.

Thank you for answering my questions.

@joyjoyyo commented on GitHub (Jan 31, 2024): > Agent's reasoning time is usually longer, and in most cases, the Blocking mode will directly time out. For example, if you use Cloudflare, the connection timeout is only 100s. Many external reverse proxies in enterprise environments may be even stricter, perhaps only 10s. After timing out, it is difficult to locate which layer the problem is in. Enabling Blocking mode may actually bring more problems. My suggestion is to directly receive streaming data and temporarily store it in an object, and then output it all at once after it ends. Thank you for answering my questions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1003