Cline
Cline is an AI-powered extension for Visual Studio Code (VS Code) that uses large language models (LLMs) to handle complex software development tasks, helping developers work more efficiently. Huawei Cloud MaaS provides access to a wide range of models across multiple model families. By connecting Cline to MaaS, developers can use these models to power Cline's capabilities, including file management, code debugging, and terminal interaction. However, many developers are unsure how to configure this integration, making it difficult to get the full benefit of AI-assisted development.
How can you connect Cline to models deployed on MaaS and unlock its full potential as an AI coding assistant?
This section walks you through the integration process, showing you how to connect Cline to MaaS model services and set up your own AI coding assistant. Once configured, Cline offers four key capabilities:
- Access to MaaS models: Connect Cline to model services from multiple model families available on MaaS.
- File management and code debugging: Create and edit files with ease while monitoring linter and compiler errors in real time. Cline can detect issues such as missing imports and syntax errors, analyze their causes, and suggest fixes to help you write cleaner, more reliable code.
- Integrated terminal and real-time feedback: Run commands directly from the integrated terminal and view their output in real time. Cline can also help identify and resolve server-side issues after code changes, keeping your development workflow smooth and efficient.
- End-to-end web testing and debugging: Launch websites in a headless browser and simulate user actions such as clicking, typing, and scrolling. Cline captures screenshots and console logs in real time, then analyzes them to identify and fix runtime and visual issues, helping you deliver high-quality web applications.
Billing
You are billed based on the number of tokens used. For details, see Inference Service Billing Items.
Constraints
This function is only available in the CN-Hong Kong region.
Prerequisites
- You have registered a Huawei Cloud account. For details, see Signing Up for a Huawei Cloud Account.
- For details, see Configuring MaaS Access Permissions.
- You have subscribed to a built-in service or created an endpoint. For details, see Subscribing to a Built-in Service and Creating an Endpoint.
Supported Models
The system supports text generation models with a context length of at least 32K.
You can log in to the MaaS console. In the Model Filtering area of Model Square, choose Text Generation for Type and at least 32K for Context Length to view the supported models.
Step 1: Installing Cline in VS Code
- Open VS Code. Click
on the navigation pane, enter Cline in the search box, and click Install. If you see a small robot icon
on the left, Cline is installed.Figure 1 Installing Cline
Step 2: Preparing for MaaS Model API Access
Obtain the model ID, API key, and API address of the MaaS model service, which are required for connecting with Cline.
- Obtain the Model ID and API URL
- Go to the MaaS Real-Time Inference page. By default, the Built-in Services page is displayed. You can also switch to the Endpoints page. Figure 2 Real-Time Inference page
- In the Operation column of the model, click API Calling and select a version. On the View API Call Description page, obtain the API URL and model ID.

- Go to the MaaS Real-Time Inference page. By default, the Built-in Services page is displayed. You can also switch to the Endpoints page.
- Obtain an API Key
If you already have an API key, you can use it. If you do not have an API key, go to the API Key Management page to create one.
Step 3: Configuring the MaaS API in Cline
- Configure the MaaS model service.
- Open VS Code, click
in the navigation pane to open the Cline plugin, and click
in the upper right corner. Figure 3 Opening the cline plugin
- On the Settings page, configure related information and click Done.
- Open VS Code, click
- Use the Cline plugin in VS Code to call the MaaS API for automatic code generation.
Helpful Links
For details about how to call MaaS APIs, see Sending a Chat Request (Chat/Post).
For details about how to troubleshoot common errors, see Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot

