I just want to switch from openrouter qwen, to my own modelstudio keys.
I find the web gateway a bit confusing and difficult to change models (its not clear to me, maybe i'm misunderstanding the UI). So i am just editing openclaw.json instead.
Maybe i'm doing it wrong? Should i be re-running the onboarding? When i run openclaw model list i just see the model i have configured already.
So what is the best way to go about adding new models, or changing out my main model?
Here is what I did, but i think my json is incorrect:
- added bailian to auth:
{
"auth": {
"profiles": {
"openrouter:default": {
"provider": "openrouter",
"mode": "api_key"
},
"bailian:default": {
"provider": "bailian",
"mode": "api_key"
}
}
},
Swapped out witht he model i want:
"agents": {
"defaults": {
"model": "bailian/qwen3.5-plus",
"workspace": "/root/.openclaw/workspace",
"compaction": {
"mode": "safeguard"
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8
}
}
},
Added the models included with my alibaba modelstudio coding plan:
"models": {
"providers": {
"bailian": {
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"apiKey": "YOUR_ALIBABA_API_KEY_HERE",
"api": "openai-completions",
"models": [
{"id": "qwen3.5-plus"},
{"id": "qwen3-max-2026-01-23"},
{"id": "qwen3-coder-next"},
{"id": "qwen3-coder-plus"},
{"id": "MiniMax-M2.5"},
{"id": "glm-5"},
{"id": "glm-4.7"},
{"id": "kimi-k2.5"}
]
}
}
}
This part is whats throwing errors when i try to gateway restart (part 3).
So my question is:
Am i doing this right, is editing the raw json the way to go?
and B, whats wrong with my JSON? Ignore exact } json syntax, i know i pasted them in here wrong.