All Products
Search
Document Center

Data Management:Integrate models using the DMS AI plug-in

Last Updated:Mar 30, 2026

The DMS AI plug-in connects private model services and Alibaba Cloud Model Studio services to your Dify workspace through the Model Provider page. Supported service types include large language model (LLM), Embedding, and Rerank.

Prerequisites

Before you begin, make sure you have:

Integrate LLM services

Integrate private LLM services

Supported models: DeepSeek-R1-Distill-Qwen-1.5B, DeepSeek-R1-Distill-Qwen-7B, DeepSeek-R1-Distill-Qwen-14B, DeepSeek-R1-Distill-Qwen-32B, and DeepSeek-R1-Distill-Llama-70B.

Required parameters

Parameter Description Format
Model Name The name of the private model e.g., DeepSeek-R1-Distill-Qwen-7B
API Key The API key for your private model service
Endpoint URL The endpoint of your private model service http://172.17.XXX.XXX:XX/v1

Steps

  1. Go to your Dify workspace. On the Studio tab, click the account name in the upper-right corner, and then click Settings.

    image

  2. On the Model Provider page, configure Model Name, API Key, and Endpoint URL, and then click Save.

Integrate Alibaba Cloud Model Studio LLM services

The following example uses DeepSeek-R1.

Required parameters

Parameter Description Format / source
Model Type The type of model to integrate Select LLM
Model Name The name of the model deployed in Alibaba Cloud Model Studio e.g., DeepSeek-R1
API Key Your Alibaba Cloud Model Studio API key Get an API key
Endpoint URL The endpoint for Alibaba Cloud Model Studio services https://dashscope.aliyuncs.com/compatible-mode/v1

Steps

  1. Go to your Dify workspace. In the left-side navigation pane, click the image icon, and then click the Studio tab.

  2. Click the account name in the upper-right corner, and then click Settings.

  3. On the Model Provider page, set Model Type to LLM, configure Model Name, API Key, and Endpoint URL, and then click Save.

    image

Integrate Embedding or Rerank services

Connecting an Embedding or Rerank service to Dify requires two steps:

  1. Register the model on the Model Provider page in DMS AI.

  2. Select the model on the knowledge base configuration page in Dify.

The supported private Embedding and Rerank models are:

Model type Model name Maximum context size
Embedding bge-m3 8192
Embedding bge-large-zh-v1.5 512
Rerank bge-reranker-v2-m3 8192

Use private Embedding or Rerank services

Step 1: Register the model in DMS AI

Required parameters

Parameter Description
Model Type Select Text Embedding or Rerank
Model Name The name of the model
Service Provider Your service provider
API Key The API key for your private model service
Endpoint URL The endpoint of your private model service

Steps

  1. Go to your Dify workspace. On the Studio tab, click the account name in the upper-right corner, and then click Settings.

  2. On the Model Provider page, set Model Type to Text Embedding or Rerank, configure Model Name, Service Provider, API Key, and Endpoint URL, and then click Save.

    image

Step 2: Select the model on the knowledge base configuration page

  1. Go to your Dify workspace.

  2. On the Knowledge tab, click Create Knowledge.

    image

  3. On the knowledge base configuration page, select the model you registered in Step 1.

Use Embedding or Rerank services provided by AnalyticDB for PostgreSQL

Step 1: Register the model in DMS AI

The maximum context size for AnalyticDB for PostgreSQL services is 2048.

Required parameters

Parameter Description Source
Model Type Select Text Embedding or Rerank
Model Name The name of the model
Service Provider Your service provider
Access Key Your AccessKey ID View AccessKey pairs of a RAM user
Secret Key Your AccessKey Secret View AccessKey pairs of a RAM user
Instance ID The ID of your AnalyticDB for PostgreSQL instance
Region ID The region where your instance is deployed
Context Size Maximum input size in tokens Maximum: 2048

For parameter details, see Rerank.

Steps

  1. Go to your Dify workspace. On the Studio tab, click the account name in the upper-right corner, and then click Settings.

  2. On the Model Provider page, set Model Type to Text Embedding or Rerank, configure all required parameters listed above, and then click Save.

Step 2: Select the model on the knowledge base configuration page

  1. Go to your Dify workspace.

  2. On the Knowledge tab, click Create Knowledge.

    image

  3. On the knowledge base configuration page, select the model you registered in Step 1.

Troubleshooting

Model cannot connect — endpoint URL rejected

Verify the endpoint URL matches the expected format exactly. For private LLM services, the format is http://172.17.XXX.XXX:XX/v1. For Alibaba Cloud Model Studio, use https://dashscope.aliyuncs.com/compatible-mode/v1.

Authentication failed — invalid API key

Check that the API key is copied correctly with no leading or trailing spaces. For Alibaba Cloud Model Studio, generate a new API key from the Model Studio console if the existing one has expired or been revoked.

Alibaba Cloud Model Studio model cannot be reached

Internet access must be enabled for the VPC where your Dify instance is deployed. If you skipped this step, configure an Internet NAT gateway with SNAT rules. See Use the SNAT feature of an Internet NAT gateway to access the Internet.

Model name not recognized after saving

Confirm the model name matches exactly what is deployed in your service — including capitalization and hyphens (e.g., DeepSeek-R1-Distill-Qwen-7B, not deepseek-r1-distill-qwen-7b).