Sagemaker Can't load model name #6550

Closed
opened 2026-02-21 18:16:16 -05:00 by yindo · 1 comment
Owner

Originally created by @phuochungtr on GitHub (Nov 5, 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).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.10.2

Cloud or Self Hosted

Cloud

Steps to reproduce

Build sagemaker endpoint, then create from blank a basic chatbot, then update endpoint in chat bot, then enter some query.

✔️ Expected Behavior

can load model and interact with model like version 0.7.2

Actual Behavior

Error :
Predictor missing field inputs
LLMResult model input should be a valid string (input_value=None)
No response

Originally created by @phuochungtr on GitHub (Nov 5, 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] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.10.2 ### Cloud or Self Hosted Cloud ### Steps to reproduce Build sagemaker endpoint, then create from blank a basic chatbot, then update endpoint in chat bot, then enter some query. ### ✔️ Expected Behavior can load model and interact with model like version 0.7.2 ### ❌ Actual Behavior Error : Predictor missing field inputs LLMResult model input should be a valid string (input_value=None) _No response_
yindo added the 🐞 bug🙏 help wanted labels 2026-02-21 18:16:16 -05:00
yindo closed this issue 2026-02-21 18:16:16 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 5, 2024):

Hey there, @phuochungtr! I'm here to help you with bug reports, questions, or anything else you need assistance with. I'm a bot designed to assist you while waiting for a human maintainer. Let's dive in and see how I can support you.

The "Predictor missing field inputs" error in Dify version 0.10.2 when using a Sagemaker model could be due to the payload not being correctly structured or missing required fields when calling the predict method on the Predictor object. Ensure that the params dictionary passed to the inference function contains all necessary fields, especially "model_name", which is used to populate the "model" field in the payload. Additionally, verify that the messages list is correctly formatted as a list of dictionaries with "role" and "content" keys.

Also, ensure that the sagemaker_endpoint is correctly specified and that any required credentials, such as aws_access_key_id and aws_secret_access_key, are provided if not automatically obtained from the running environment. Check that the aws_region is correctly set to match your Sagemaker deployment [1][2].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 5, 2024): <!-- Greeting --> Hey there, @phuochungtr! I'm here to help you with bug reports, questions, or anything else you need assistance with. I'm a bot designed to assist you while waiting for a human maintainer. Let's dive in and see how I can support you. <!-- Answer --> The "Predictor missing field inputs" error in Dify version 0.10.2 when using a Sagemaker model could be due to the payload not being correctly structured or missing required fields when calling the `predict` method on the `Predictor` object. Ensure that the `params` dictionary passed to the `inference` function contains all necessary fields, especially "model_name", which is used to populate the "model" field in the payload. Additionally, verify that the `messages` list is correctly formatted as a list of dictionaries with "role" and "content" keys. Also, ensure that the `sagemaker_endpoint` is correctly specified and that any required credentials, such as `aws_access_key_id` and `aws_secret_access_key`, are provided if not automatically obtained from the running environment. Check that the `aws_region` is correctly set to match your Sagemaker deployment <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/sagemaker/llm/llm.py)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/sagemaker/sagemaker.yaml)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6550