OpenClaw 方式二:通过终端修改配置文件(适用于Windows 、mac 系统、Linux系统) 1. 在终端执行以下命令打开配置文件 Mac系统和Linux系统执行以下命令: plaintext nano ~/.openclaw/openclaw.json Windows系统执行以下命令(Windows系统推荐优先使用方式一): plaintext notepad %USERPROFILE%.openclawopenclaw.json 2. 复制以下内容(以GLM5Pro为例)到配置文件。将YOURAPIKEY替换为服务组的API Key。 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" } }