Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added all DeepSeek r1 models on aws bedrock to bedrock model provider #13249

Conversation

Riddhimaan-Senapati
Copy link
Contributor

Summary

I have added all DeepSeek r1 models on aws bedrock by adding the required yaml files to bedrock model provider in api\core\model_runtime\model_providers\bedrock. Partially fixes #13248 . One thing I am not sure about is pricing since bedrock pricing is different(since it uses instance pricing) from the direct api pricing which I have used in my yaml files.

The models themselves can be found on this page(Note: use US-East or US-West region to find the deepseek models)

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. ⚙️ feat:model-runtime labels Feb 5, 2025
@Riddhimaan-Senapati
Copy link
Contributor Author

@crazywoola @laipz8200 Let me know of any changes that you want made to this PR.

@crazywoola crazywoola added this to the deepseek milestone Feb 6, 2025
@crazywoola crazywoola mentioned this pull request Feb 6, 2025
83 tasks
@ybalbert001
Copy link
Contributor

These models should be deployed by bedrock Marketplace at first, if you want to use them. You are not able to use it only by its model_id like other SAAS style models.

@Riddhimaan-Senapati
Copy link
Contributor Author

Riddhimaan-Senapati commented Feb 6, 2025

@ybalbert001 So what do you suggest? I did this way because other models were defined this way, and looking in the code, in order to run any one of these models you need to give your AWS account details like your bedrock_endpoint_url

@ybalbert001
Copy link
Contributor

I am not sure, maybe you can deploy it through SageMaker, and leverage SageMaker provider of dify to use it.

@laipz8200
Copy link
Member

Hi @Riddhimaan-Senapati. Since Bedrock does not provide direct access to the DeepSeek model, this PR may not be merged soon. We are actively communicating with AWS. Currently, as @ybalbert001 mentioned, users can deploy the model themselves on the Bedrock Marketplace and use it via SageMaker.

@laipz8200 laipz8200 self-assigned this Feb 6, 2025
@Riddhimaan-Senapati
Copy link
Contributor Author

@laipz8200 In that case, I should close this request since it's not relevant.

@Riddhimaan-Senapati Riddhimaan-Senapati deleted the add_deepseek_r1_to_bedrock branch February 6, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ feat:model-runtime size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deepseek-R1 / Custom Model support on AWS Bedrock
4 participants