Error in workflow using the Claude model in Bedrock in version 0.6.12 #4362

Closed
opened 2026-02-21 18:06:04 -05:00 by yindo · 10 comments
Owner

Originally created by @YYyp99 on GitHub (Jul 1, 2024).

Originally assigned to: @laipz8200 on GitHub.

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).
  • 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.12

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

We deployed Dify using k8s, which was not a problem before. However, after updating the new version, using the model provided by Bedlock will result in an error in the problem selector of the workflow

✔️ Expected Behavior

Previously, our entire workflow was fine, but now the problem classifier will have issues, and using the model directly in the workflow also requires selecting User

Actual Behavior

image
image
The problem selector will report an error, and using the system directly from the model will also report an error

Originally created by @YYyp99 on GitHub (Jul 1, 2024). Originally assigned to: @laipz8200 on GitHub. ### 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] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.12 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce We deployed Dify using k8s, which was not a problem before. However, after updating the new version, using the model provided by Bedlock will result in an error in the problem selector of the workflow ### ✔️ Expected Behavior Previously, our entire workflow was fine, but now the problem classifier will have issues, and using the model directly in the workflow also requires selecting User ### ❌ Actual Behavior ![image](https://github.com/langgenius/dify/assets/120240141/879150cc-fe15-4dc6-b499-8c2b78aa00ba) ![image](https://github.com/langgenius/dify/assets/120240141/06d19798-1bf6-4394-9248-05e3a9a51ff0) The problem selector will report an error, and using the system directly from the model will also report an error
yindo added the 🐞 bug🌊 feat:workflow labels 2026-02-21 18:06:04 -05:00
yindo closed this issue 2026-02-21 18:06:04 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 1, 2024):

To resolve the parameter validation error in your workflow using the Claude model in Bedlock after updating to Dify version 0.6.12, ensure that the parameters you are setting for the Claude model are within the valid range specified for that model. Specifically, the system parameter should be a list or tuple, not a string.

Here are the steps to address the issue:

  1. Check Parameter Types: Ensure that the system parameter is provided as a list or tuple. For example:

    {
      "system": ["value1", "value2"]
    }
    
  2. Valid Parameter Ranges: Make sure other parameters like temperature, top_p, top_k, and max_tokens are within their valid ranges:

    • temperature: -1 or 0..1
    • top_p: Follow the specific range defined for this parameter.
    • top_k: This is an integer parameter and should be set according to the model's requirements.
    • max_tokens: 1 to 4096
  3. Model Configuration: Ensure your model configuration YAML file is correctly set up. For example:

    model: claude-3-sonnet-20240229
    label:
      en_US: claude-3-sonnet-20240229
    model_type: llm
    features:
      - agent-thought
      - vision
      - tool-call
      - stream-tool-call
    model_properties:
      mode: chat
      context_size: 200000
    parameter_rules:
      - name: temperature
        use_template: temperature
      - name: top_p
        use_template: top_p
      - name: top_k
        type: int
        required: false
      - name: max_tokens
        use_template: max_tokens
        required: true
        default: 4096
        min: 1
        max: 4096
    
  4. Update Workflow: Adjust your workflow to ensure the system parameter is correctly formatted and other parameters are within the valid ranges.

By following these steps, you should be able to resolve the parameter validation error and ensure your workflow functions correctly with the Claude model in Dify version 0.6.12 [1][2][3][4].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jul 1, 2024): <!-- Answer --> To resolve the parameter validation error in your workflow using the Claude model in Bedlock after updating to Dify version 0.6.12, ensure that the parameters you are setting for the Claude model are within the valid range specified for that model. Specifically, the `system` parameter should be a list or tuple, not a string. Here are the steps to address the issue: 1. **Check Parameter Types**: Ensure that the `system` parameter is provided as a list or tuple. For example: ```json { "system": ["value1", "value2"] } ``` 2. **Valid Parameter Ranges**: Make sure other parameters like `temperature`, `top_p`, `top_k`, and `max_tokens` are within their valid ranges: - `temperature`: -1 or 0..1 - `top_p`: Follow the specific range defined for this parameter. - `top_k`: This is an integer parameter and should be set according to the model's requirements. - `max_tokens`: 1 to 4096 3. **Model Configuration**: Ensure your model configuration YAML file is correctly set up. For example: ```yaml model: claude-3-sonnet-20240229 label: en_US: claude-3-sonnet-20240229 model_type: llm features: - agent-thought - vision - tool-call - stream-tool-call model_properties: mode: chat context_size: 200000 parameter_rules: - name: temperature use_template: temperature - name: top_p use_template: top_p - name: top_k type: int required: false - name: max_tokens use_template: max_tokens required: true default: 4096 min: 1 max: 4096 ``` 4. **Update Workflow**: Adjust your workflow to ensure the `system` parameter is correctly formatted and other parameters are within the valid ranges. By following these steps, you should be able to resolve the parameter validation error and ensure your workflow functions correctly with the Claude model in Dify version 0.6.12 <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/learn-more/faq/llms-use-faq.md)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/anthropic/llm/claude-3-5-sonnet-20240620.yaml)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/anthropic/llm/claude-3-sonnet-20240229.yaml)</sup><sup>[[4]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/anthropic/llm/claude-3-opus-20240229.yaml)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@YYyp99 commented on GitHub (Jul 1, 2024):

image
Writing prompt will result in an error message

@YYyp99 commented on GitHub (Jul 1, 2024): ![image](https://github.com/langgenius/dify/assets/120240141/6eef6add-b6db-49da-b710-deb28f462e09) Writing prompt will result in an error message
Author
Owner

@christiancenti commented on GitHub (Jul 1, 2024):

Same problem here

@christiancenti commented on GitHub (Jul 1, 2024): Same problem here
Author
Owner

@YYyp99 commented on GitHub (Jul 1, 2024):

Same problem here

Are you also unable to use prompt at 0.6.12?

@YYyp99 commented on GitHub (Jul 1, 2024): > Same problem here Are you also unable to use prompt at 0.6.12?
Author
Owner

@YYyp99 commented on GitHub (Jul 1, 2024):

image 0.6.12, I used the same model and the tests worked fine.

I don't know why, 0.6.11 can be used, but after upgrading, it keeps reporting errors. However, I deployed it using k8s, and my upgrade method is to directly pull the latest image

@YYyp99 commented on GitHub (Jul 1, 2024): > <img alt="image" width="1326" src="https://private-user-images.githubusercontent.com/6822397/344695579-83bbaace-4ce1-4fa3-90c8-e6cc321446fc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4ODI0ODQsIm5iZiI6MTcxOTg4MjE4NCwicGF0aCI6Ii82ODIyMzk3LzM0NDY5NTU3OS04M2JiYWFjZS00Y2UxLTRmYTMtOTBjOC1lNmNjMzIxNDQ2ZmMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDJUMDEwMzA0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzUwM2FjM2Y4YTQwYjM5YzE5NTY2NGUzYjZkOGNlNmM2OThhNGQyMGM4MzlhODNjNGQ4ZGE5ZThmM2RjZTQyNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.myRK-XcUcaDKMEj6BHtBnTsQZe__E3-xSZOF4g0b4VE"> 0.6.12, I used the same model and the tests worked fine. I don't know why, 0.6.11 can be used, but after upgrading, it keeps reporting errors. However, I deployed it using k8s, and my upgrade method is to directly pull the latest image
Author
Owner

@crazywoola commented on GitHub (Jul 2, 2024):

Possible fix in workflow:

  • Leave the system blank
  • Add a user prompt
  • Edit this prompt
  • Test it again
@crazywoola commented on GitHub (Jul 2, 2024): Possible fix in workflow: - Leave the system blank - Add a user prompt - Edit this prompt - Test it again
Author
Owner

@YYyp99 commented on GitHub (Jul 2, 2024):

Possible fix in workflow:

  • Leave the system blank
  • Add a user prompt
  • Edit this prompt
  • Test it again

This is possible in the workflow, but the problem selector will report an error, and other agents will also report an error when writing prompts. Is this caused by my deployment issue, or is it because other users will also experience similar situations

@YYyp99 commented on GitHub (Jul 2, 2024): > Possible fix in workflow: > > * Leave the system blank > * Add a user prompt > * Edit this prompt > * Test it again This is possible in the workflow, but the problem selector will report an error, and other agents will also report an error when writing prompts. Is this caused by my deployment issue, or is it because other users will also experience similar situations
Author
Owner

@luckylhb90 commented on GitHub (Jul 2, 2024):

#5768
I had the same problem today. I then rolled back the local code to before this version, and now it works fine.

@luckylhb90 commented on GitHub (Jul 2, 2024): #5768 I had the same problem today. I then rolled back the local code to before this version, and now it works fine.
Author
Owner

@christiancenti commented on GitHub (Jul 2, 2024):

I use both dify in the cloud and locally. With the same version (0.6.12-fix1), locally it works but in cloud it doesn't.

@christiancenti commented on GitHub (Jul 2, 2024): I use both dify in the cloud and locally. With the same version (0.6.12-fix1), locally it works but in cloud it doesn't.
Author
Owner

@longzhihun commented on GitHub (Jul 2, 2024):

fixed please refer to the PR.

@longzhihun commented on GitHub (Jul 2, 2024): fixed please refer to the PR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4362