Configuring Custom Models
CodeArts Agent allows enterprises to access third-party large language models. You can flexibly customize the models based on your service scenarios to meet your requirements for on-premises deployment, data security, and compliance control.
The professional edition of Huawei Cloud CodeArts Agent allows you to configure custom models on both the console and client. The basic edition allows you to configure custom models only on the client.
- On the console: Only enterprise administrators can configure custom models and manage client-side configuration permissions for members.
- On the client: All enterprise members can configure custom models.
This section describes how enterprise administrators configure custom models on the console.
Constraints
- Only the third-party models using the OpenAI-compliant Chat Completions APIs and Anthropic-compliant Messages APIs can be integrated with CodeArts Agent.
- The custom models created on the console can be invoked by all agents. However, those created on the client can be invoked only by the built-in agents, AgentTeam, and custom agents.
Custom Model Permissions
The permissions to create, manage, and use custom models vary depending on your account. A HUAWEI ID and its account root user have all operation permissions. IAM users and federated users must have the permissions or roles listed in Table 1 to perform the corresponding operations.
| Operation | Required IAM Permissions | Required Role |
|---|---|---|
| Create a custom model. | Tenant Administrator | Enterprise administrator |
| Add a custom model to the model list of an agent. | - | Enterprise administrator |
| Use a custom model. | - | Enterprise administrator, or enterprise member |
| Enable or disable a custom model. | Tenant Administrator | Enterprise administrator |
| Edit a custom model. | Tenant Administrator | Enterprise administrator |
| Delete a custom model. | Tenant Administrator | Enterprise administrator |
| Configure the members' permissions to create custom models. | - | Enterprise administrator |
Prerequisites
- You have purchased the CodeArts Agent Professional Edition package.
- If you are an IAM user or federated user, you have been granted the Tenant Administrator permissions. It is necessary to create a custom model.
For details about how to grant permissions to IAM users on the IAM console, see Creating a User Group and Assigning Permissions or Creating a User Group and Assigning Permissions (New Edition). For details about how to grant permissions to federated users, see Creating a User Group and Assigning Permissions. After the permissions of a user group to which a federated user belongs are modified, the enterprise IdP must be restarted to make the modifications take effect.
- You have obtained the model ID, model URL, and API key from the model provider. It is necessary to create a custom model.
Step 1: Creating a Custom Model
You can create a custom model on the CodeArts Agent console via a provider or custom configuration.
- Log in to the CodeArts Agent console using an account with the Tenant Administrator permissions.
- In the navigation tree on the left, choose Enterprise Settings > Models. The Models page is displayed.
- In Custom Models, click Create Model. The Create Model dialog box is displayed.
- Select Model provider, and set parameters by referring to Table 2. Figure 1 Creating a model via provider
Table 2 Parameters for creating a model by provider Parameter
Description
Model provider
Select the provider to which the model to be created belongs from the drop-down list.
Model ID
Select the ID of the model to be created. If the required model ID is not in the list, select Custom.
Custom Model ID
This parameter is available only when Model ID is set to Custom.
Enter the model ID obtained from the model provider.
Model Display Name
Enter the name of a model displayed in CodeArts Agent. The name contains a maximum of 64 characters.
The model display name can be the same as the name of a built-in model, but cannot be the same as the name of any other custom model.
API Key
Enter the API key obtained from the model provider.
Custom Model URL
Optional. After you select a provider, the system automatically enters the model URL. To modify the model URL, enable Custom Edit and enter the model URL. Enter only the base URL of the API. For example, if the model address is https://open.bigmodel.cn/api/paas/v4/chat/completions, enter https://open.bigmodel.cn/api/paas/v4 here.
Context Window
Optional. Set the input tokens and output tokens.
- Input Tokens: indicates the maximum number of tokens that can be received by the model in a single request.
- Output Tokens: indicates the maximum number of tokens that can be delivered by the model in a single response.
Description
Optional. Enter a maximum of 200 characters to describe the custom model.
- Click OK.
The model is displayed in the Custom Models area, indicating that the model is created.
- Log in to the CodeArts Agent console using an account with the Tenant Administrator permissions.
- In the navigation tree on the left, choose Enterprise Settings > Models. The Models page is displayed.
- In Custom Models, click Create Model. The Create Model dialog box is displayed.
- Select Custom, and set parameters by referring to Table 3. Figure 2 Creating a model via customized configurations
Table 3 Parameters for creating a model via customized configurations Parameter
Description
API Format
Select the API format used by the model from the drop-down list. Only OpenAI Chat Completions Format and Anthropic Messages Format are supported.
Model URL
Enter the model URL obtained from the model provider. Enter only the base URL of the API. For example, if the model address is https://open.bigmodel.cn/api/paas/v4/chat/completions, enter https://open.bigmodel.cn/api/paas/v4 here.
Model ID
Enter the model ID obtained from the model vendor. The value contains a maximum of 64 characters. For example, glm-5.1.
Model Display Name
Enter the name of a model displayed in CodeArts Agent. The name contains a maximum of 64 characters.
The model display name can be the same as the name of a built-in model, but cannot be the same as the name of any other custom model.
API Key
Enter the API key obtained from the model provider.
Context Window
Optional. Set the input tokens and output tokens.
- Input Tokens: indicates the maximum number of tokens that can be received by the model in a single request.
- Output Tokens: indicates the maximum number of tokens that can be delivered by the model in a single response.
Description
Optional. Enter a maximum of 200 characters to describe the custom model.
- Click OK.
The model is displayed in the Custom Models area, indicating that the model is created.
Step 2: Adding the Custom Model to the Model List of an Agent
- Log in to the CodeArts Agent console as an Enterprise Administrator. In the navigation tree on the left, choose Agent Settings > Agents.
- Locate a system built-in agent named Agent, and click Edit in the Operation column. The Edit Agent page is displayed.
- Select the new custom model from the Base Model drop-down list box, and click Confirm in the upper right corner to add the model to the agent.
After a custom model is added to the built-in agent named Agent, the model is automatically synchronized to all custom agents.
Step 3: Using the Custom Model
After a custom model is added to agents, all enterprise members can use the model on the CodeArts Agent client without consuming the tokens in the CodeArts Agent package.
- Log in to the CodeArts Agent client as an enterprise member or administrator.
- In the lower part of the chat window, select the agent for which the custom model has been added. In the model list on the right, select the custom model.
Configuring Members' Permissions to Create Custom Models
- Log in to the CodeArts Agent console as an Enterprise Administrator.
- In the navigation tree on the left, choose Enterprise Settings > Models. The Models page is displayed.
- In the Member Custom Model Permissions area, enable or disable the function.
- Enabled: Allows enterprise members to add custom models on the CodeArts Agent client.
- Disabled: Forbids enterprise members to add custom models on the CodeArts Agent client.
Managing Custom Models
After custom models are created, enterprise administrators can search for these models. Other management operations can be performed only by enterprise administrators with the Tenant Administrator permissions.
| Operation | Procedure |
|---|---|
| Search for a custom model. | In the search box of Custom Models, enter a model name to search for the model. |
| Enable or disable a custom model. | In the Custom Models area, locate the target model, and click Once disabled, the model will not be displayed in the model list of the agents on the CodeArts Agent client. |
| Edit a custom model. |
|
| Deleting a custom model |
|
Feedback
Was this page helpful?
Provide feedbackThank 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

