OpenClaw(1) OpenClaw 添加模型配置 方式一:通过Web UI修改配置文件(适用于Windows或者Mac系统) 1. 在终端执行以下命令打开 Web UI。 plaintext openclaw dashboard 2. 在Web UI的左侧菜单栏中选择 “配置”> “All Settings” > “RAW”。 3. 复制以下内容(以GLM5Pro为例)到Raw JSONS输入框,替换已有内容,并将YOURAPIKEY替换为为你的API Key。 注意 配置models下的id 和 modelname 来源于您当前购买实际的可用模型,以下示例配置以GLM5Pro为例 plaintext { "models": { "mode": "merge", "providers": { "xirang": { "baseUrl": " "apiKey": "YOURAPIKEY", "api": "openaicompletions", "models": [ { "id": "GLM5Pro", "name": "GLM5Pro", "reasoning": true, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 204800, "maxTokens": 131072 }, { "id": "DeepSeek‑V3.2‑Pro", "name": "DeepSeek‑V3.2‑Pro", "reasoning": true, "input": [ "text" ], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 131072, "maxTokens": 16384 } ] } } }, "agents": { "defaults": { "model": { "primary": "xirang/GLM5Pro" }, "models": { "xirang/DeepSeekV3.2Pro": {}, "xirang/GLM5Pro": {} } } }, "gateway": { "mode": "local" } } 4. 点击右上角 Save 保存,再点击 Update 使配置生效,保存成功后,apiKey将显示为“OPENCLAWREDACTED”。由于脱敏保护,仅在前端界面隐藏,不影响实际调用。
来自: