All Products
Search
Document Center

Alibaba Cloud Model Studio:Offical plug-in

Last Updated:May 08, 2025

Model Studio provides a variety of official plug-ins, including Image Generation, Calculator, and Python Code Interpreter, to enhance the features and broaden the application scenarios of large language models (LLMs).

First visit to Plug-ins page

To visit the Plug-ins page, the Alibaba Cloud account or RAM user must have the AliyunServiceRoleForSFMAccessCloudAPI role permission. You can follow the steps below to authorize.

Alibaba Cloud account

If you log on to Model Studio with the Alibaba Cloud account, review the agreement on the Plug-ins page and click Authorize and Enter.

RAM user

If you log on to Model Studio as a RAM user, review the agreement on the Plug-ins page and click Authorize and Enter. At this time, you may see an error message that says The user is not granted the permissions to create a service-linked role.

You must first follow the steps below to grant the RAM user the permission to create a service-linked role. Once authorized, the RAM user will be able to access Plug-ins page.

  1. Grant the permission to create a service-linked role.

    1. Log on to the RAM console with the Alibaba Cloud account.

    2. In the left-side navigation pane, click Permissions > Policies.

    3. Click Create Policy.

    4. On the JSON tab, enter the following content into Effect, Action, Resource, and Condition.

      {
          "Action": [
              "ram:CreateServiceLinkedRole"
          ],
          "Resource": "*",
          "Effect": "Allow",
          "Condition": {
              "StringEquals": {
                  "ram:ServiceName": "cloundapi-access.sfm.aliyuncs.com"
              }
          }
      }

      image

    5. Click OK.

    6. Name the policy and click OK.

      image

    7. In the left-side navigation pane, click Identities > Users.

    8. Find the RAM user and click Add Permissions in the Actions column.

    9. Select the newly created policy from the list and click Grant permissions.

      The RAM user is now authorized to create a service-linked role.

      image

  2. Go back to the Plug-ins page, review the agreement, and click Authorize and Enter.

Official plug-ins

Plug-ins page offers pre-installed official plug-ins from Model Studio. You can use them directly without configuring input and output parameters.

Name

Tool ID

Description

Billing

Python Code Interpreter

code_interpreter

Allows the LLM to execute Python code snippets, such as mathematical calculations, data analysis and visualization, and data processing.

Free

Calculator

calculator

Allows the LLM to perform complex mathematical calculations, such as “12313×13232”.

Free

Image Generation

text_to_image

Allows the LLM to generate images based on text, such as “please draw a smiling puppy”.

Free for a limited period. You must apply for the plug-in first.

Python Code Interpreter

Sample input:

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(-2, 2, 100)
y1 = np.sqrt(1 + x**2)
y2 = -np.sqrt(1 + x**2)

plt.plot(x, y1, label='y = sqrt(1 + x^2)')
plt.plot(x, y2, label='y = -sqrt(1 + x^2)')
plt.xlabel('x')
plt.ylabel('y')
plt.title('Hyperbola')
plt.legend()
plt.show()

Without plug-in

With plug-in

The LLM application cannot execute Python code and will only provide a language description of the code.

The LLM application can execute Python code and perform visual analytics on data.

python不插.jpeg

python插.jpeg

The Python Code Interpreter plug-in does not support external network access or uploading local files. Available dependencies include:

  • json5~=0.9.6

  • jupyter_client~=8.1.0

  • ipykernel~=6.25.0

  • seaborn

  • sympy

  • pydantic~=1.10.8

  • pillow~=9.4.0

  • fastapi~=0.101.1

  • dynaconf~=3.2.1

  • oss2~=2.18.1

  • matplotlib

  • starlette~=0.27.0

  • uvicorn~=0.23.2

  • requests~=2.31.0

  • scipy

  • html2text

  • matplotlib

  • pandas

  • pdf2image

  • pdfminer-six

  • pillow

  • pypdf

  • python-pptx

  • seaborn

  • sympy

  • wordcloud

Calculator

Sample input:

12313×13232

Without plug-in

With plug-in

The LLM application cannot accurately solve the problem and may return incorrect answers. In this case, the correct answer is 162,925,616.

The LLM application now has robust calculation capability and delivers the correct answer.

image

image

Image Generation

Sample input:

Please draw a smiling puppy.

Without plug-in

With plug-in

The LLM application cannot create visual content and can only provide textual descriptions.

The large model application has the ability to directly render images and can generate a puppy image according to instructions.

图文.jpeg

图文插.jpeg

Combined use of plug-ins

Model Studio supports the use of multiple tools in a single task. You can select plug-ins based on actual requirements.

Use official plug-ins

Step 1: To use official plug-ins in a sub-workspace, you must first authorize the sub-workspace. This step is not required if you use the default workspace.

  1. Go to Plug-ins, find the desired plug-in and click View Details.

  2. Click Authorization, select the sub-workspace to be authorized, and click OK.

    image

Step 2: Call the plug-in.

Call the plug-in

  • Method 1: On the Plug-ins page, add a tool to your agent application.

    Official plug-ins can only be added to agent applications in the same workspace.
    1. Find the desired plug-in and click Add to Agent.

    2. Select a tool and click Next.

    3. Select the agent application and click Confirm Add.

    4. On the application configuration page, you can find the tool added automatically.

      You can click + Plug-in to add up to 10 tools. The agent application will select and call one or more appropriate tools based on the user input.

      image

    5. Test the plug-in to ensure it meets your requirements.

    6. After testing, publish the application.

  • Method 2: In My Applications, add the tool to an agent or workflow application, test the plug-in, and publish the application. For more information, see Plug-ins: More efficiency tools and Workflow application.

Obtain tool ID

The tool ID uniquely identifies a specific tool. When calling the tool through the API, you must accurately pass the tool ID.

  1. On the Plug-ins page, find the desired plug-in and click View Details.

  2. View the tool ID.

    image

Reference

Apart from official plug-ins, Model Studio also supports custom plug-ins. For more information, see Custom plug-in.

OSZAR »