Creating a Model Provider
Scenarios
Workspace OpenClaw can be integrated with multiple mainstream AI models. You can build a personal AI assistant by connecting it to Lark, WeCom, or DingTalk. If the AI models provided by Huawei Cloud MaaS do not meet your requirements, you can connect to custom models by referring to this section.
Constraints
Custom models only support OpenAI-compatible API addresses, for example, https://api.openai.com/v1. Obtain the OpenAI-compatible API address from the model provider.
Procedure
- Log in to the console.
- In the navigation tree, choose AI Agent Management > Models. The Models page is displayed.
- Click the Model Providers tab and click Create. The Create Provider page is displayed.
- Configure the provider based on service requirements, as described in Table 1.
Table 1 Model provider parameters Parameter
Description
Example Value
Provider Type
Model provider, for example, Huawei Cloud MaaS, DeepSeek, or custom.
Huawei Cloud MaaS
Provider ID
Unique identifier.
NOTE:This parameter needs to be set when the provider type is set to Custom.
huawei
Provider Name
Name of the model provider.
huawei
API Type
API type. Set this parameter based on the site requirements.
OpenAI Completions
Base URL
API endpoint address.
NOTE:This parameter needs to be set when the provider type is set to Custom.
https://api.modelarts-maas.com/openai/v1
API Key (Optional)
API key provided by the provider.
ehnt******************************
Request Header (Optional)
Enter the key and value as required.
-
- Configure the parameters as required.
- Select Model:
- Click Select Model.
- Select the required model as required.
- Click OK.
- Add Custom Model:
- Click Add Custom Model.
- Configure the following parameters:
- ID: Enter an ID.
- Name: Enter a name.
- Description (Optional): Enter a description.
- maxTokens (Optional): Enter the maximum token value. Range: 1 to 2147483647.
- contextWindow (Optional): Enter the contextWindow value. Range: 1 to 2147483647.
- reasoning (Optional): This parameter controls whether the model displays the inference process. If you select true, the final answer is directly provided. If you select false, the model first performs self-reflection and logical reasoning, and then outputs the problem-solving process.
- Advanced Model Parameters (Optional): You need to maintain custom configuration items. Invalid parameters may cause service interruption or request failures.
- Select Model:
- Click OK.
- Click OK again.
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