一:从天翼云模型推理服务获取模型调用AppKey等信息
访问模型推理服务地址:https://ctxirang.ctyun.cn/maas/home,在左侧菜单栏进入“服务接入。
点击“创建服务组”,填写服务信息,选择所需的模型服务,并进行提交。
获取并妥善保管模型调用App Key。
二、openClaw 添加模型配置
方式一:通过Web UI修改配置文件(适用于Windows或者Mac系统)
在终端执行以下命令打开 Web UI。
openclaw dashboard在Web UI的左侧菜单栏中选择 “配置”-> “All Settings” -> “RAW”。
复制以下内容到Raw JSONS输入框,替换已有内容,并将YOUR_API_KEY替换为在服务接入页面所获取到的App Key。
{
"models": {
"mode": "merge",
"providers": {
"xirang": {
"baseUrl": "https://wishub-x6.ctyun.cn/v1",
"apiKey": "YOUR_API_KEY",
"api": "openai-completions",
"models": [
{
"id": "GLM-5",
"name": "GLM-5",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 204800,
"maxTokens": 131072,
"rateLimit": {
"rpm": 2000,
"tpm": 100000000
}
},
{
"id": "Qwen3.5-397B-A17B",
"name": "Qwen3.5-397B-A17B",
"reasoning": true,
"input": [
"text","image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 65536,
"maxTokens": 16384
},
{
"id": "Qwen3-Max",
"name": "Qwen3-Max",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 258048,
"maxTokens": 65536
},
{
"id": "Doubao-Seed-2.0-pro",
"name": "Doubao-Seed-2.0-pro",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 131072,
"maxTokens": 65536
},
{
"id": "DeepSeek-V3.2-Standard",
"name": "DeepSeek-V3.2-Standard",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 131072,
"maxTokens": 16384
},
{
"id": "DeepSeek-V3-0324",
"name": "DeepSeek-V3-0324",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 131072,
"maxTokens": 16384
},
{
"id": "Kimi-K2-Thinking",
"name": "Kimi-K2-Thinking",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 32768,
"maxTokens": 16384
},
{
"id": "DeepSeek-R1-0528",
"name": "DeepSeek-R1-0528",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 98304,
"maxTokens": 16384
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "xirang/GLM-5"
},
"models": {
"xirang/GLM-5": {},
"xirang/Qwen3.5-397B-A17B": {},
"xirang/Qwen3-Max": {},
"xirang/Doubao-Seed-2.0-pro": {},
"xirang/DeepSeek-V3.2-Standard": {},
"xirang/DeepSeek-V3-0324": {},
"xirang/Kimi-K2-Thinking": {},
"xirang/DeepSeek-R1-0528": {}
}
}
},
"gateway": {
"mode": "local"
}
}点击右上角 Save 保存,再点击 Update 使配置生效,保存成功后,apiKey将显示为“__OPENCLAW_REDACTED__”。由于脱敏保护,仅在前端界面隐藏,不影响实际调用。
方式二:通过终端修改配置文件(适用于Windows 、mac 系统、Linux系统)
在终端执行以下命令打开配置文件
Mac系统和Linux系统执行以下命令:
nano ~/.openclaw/openclaw.jsonWindows系统执行以下命令(Windows系统推荐优先使用方式一):
notepad %USERPROFILE%\.openclaw\openclaw.json复制以下内容到配置文件。将YOUR_API_KEY替换为在服务接入页面所获取到的App Key。
{
"models": {
"mode": "merge",
"providers": {
"xirang": {
"baseUrl": "https://wishub-x6.ctyun.cn/v1",
"apiKey": "YOUR_API_KEY",
"api": "openai-completions",
"models": [
{
"id": "GLM-5",
"name": "GLM-5",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 204800,
"maxTokens": 131072
},
{
"id": "Qwen3.5-397B-A17B",
"name": "Qwen3.5-397B-A17B",
"reasoning": true,
"input": [
"text","image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 65536,
"maxTokens": 16384
},
{
"id": "Qwen3-Max",
"name": "Qwen3-Max",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 258048,
"maxTokens": 65536
},
{
"id": "Doubao-Seed-2.0-pro",
"name": "Doubao-Seed-2.0-pro",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 131072,
"maxTokens": 65536
},
{
"id": "DeepSeek-V3.2-Standard",
"name": "DeepSeek-V3.2-Standard",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 131072,
"maxTokens": 16384
},
{
"id": "DeepSeek-V3-0324",
"name": "DeepSeek-V3-0324",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 131072,
"maxTokens": 16384
},
{
"id": "Kimi-K2-Thinking",
"name": "Kimi-K2-Thinking",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 32768,
"maxTokens": 16384
},
{
"id": "DeepSeek-R1-0528",
"name": "DeepSeek-R1-0528",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 98304,
"maxTokens": 16384
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "xirang/GLM-5"
},
"models": {
"xirang/GLM-5": {},
"xirang/Qwen3.5-397B-A17B": {},
"xirang/Qwen3-Max": {},
"xirang/Doubao-Seed-2.0-pro": {},
"xirang/DeepSeek-V3.2-Standard": {},
"xirang/DeepSeek-V3-0324": {},
"xirang/Kimi-K2-Thinking": {},
"xirang/DeepSeek-R1-0528": {}
}
}
},
"gateway": {
"mode": "local"
}
}保存文件并退出,运行以下命令来使配置生效。
openclaw gateway restart三、使用openClaw
Windows或者Mac环境
新开一个终端,运行以下命令。
openclaw dashboard在Web UI点击左侧顶部“聊天”进入聊天窗口后,输入Message进行对话。
Linux环境
新开一个终端,运行以下命令,进入TUI界面。
openclaw tui在TUI界面进行对话。
四、常见问题
聊天对话上方出现“API rate limit reached. Please try again later”
原因:由于模型免费额度已用完或已到期,或者已经开通模型付费但因账户余额不足,模型已无法使用。
解决方案:
请在控制台开通模型付费。如遇部分模型无法自助开通,请联系客户经理或提交工单购买。
提示“USER_TPM_RATELIMITING 用户请求TPM超限,请减少tokens后重试”
原因:每分钟消耗的Token总数已超过系统阈值,单次请求的文本过长(如长文档分析、长代码生成),或多个并发请求的总Token量过大,导致触发限流。
解决方案:
缩短聊天消息长度:请尝试将问题或输入内容拆分成几个较短的部分,分批发送。
稍后再试:系统限流通常会在1分钟内自动恢复,您可以稍等一会儿再继续提问。
减少同时对话:避免并发过高,如果您同时打开了多个聊天窗口,请先集中在一个窗口对话,关闭其他窗口,避免多个对话同时争抢额度。
调整限额:如果您需要更高的流量额度,请联系客户经理或提交工单提升额度。
提示“USER_RPM_RATELIMITING 用户请求RPM超限,请稍后重试”
原因:您当前发起的请求速度过快,每分钟的请求数(RPM, Requests Per Minute)已超过系统阈值。
解决方案:
稍后再试:限流通常会在1分钟内自动解除,您可以稍后再试。
降低发送频率:发送完一条消息后,等出现回复再发送下一条,避免连续快速发送。
减少同时对话:避免并发过高,如果您同时打开了多个聊天窗口,请先集中在一个窗口对话,关闭其他窗口,避免多个对话同时争抢额度。
调整限额:如果您需要更高的流量额度,请联系客户经理或提交工单提升额度。
提示“400 模型id错误,无法与AppKey对应,请联系管理员”
问题:当前使用的模型没有与您在服务接入所创建AppKey对应,导致无法使用。
解决方案:
修改服务组重新添加模型服务:在服务接入页面找到创建的服务组,编辑服务组,勾选您需要在OpenClaw中使用的模型,提交后在OpenClaw进行重试。