openclaw常用命令
1. 使用 openclaw models 命令
```bash
# 查看当前模型状态和认证信息
openclaw models status
# 列出所有可用模型
openclaw models list
# 设置默认模型(可用别名或完整模型名)
openclaw models set <model-or-alias>
# 例如:
openclaw models set qwen
openclaw models set qwen-portal/vision-model
# 扫描可用的模型/提供商
openclaw models scan
```
### models status 的选项:
- --json — JSON 输出
- --plain — 纯文本输出
- --probe — 实时探测所有提供商的认证状态
- --check — 检查认证是否过期(退出码 1=过期/缺失,2=即将过期)
2. 使用 openclaw config 命令
```bash
# 查看当前默认模型配置
openclaw config get agents.defaults.model.primary
# 设置默认模型
openclaw config set agents.defaults.model.primary "qwen-portal/vision-model"
# 设置模型别名
openclaw config set agents.defaults.models.qwen-portal/coder-model.alias "qwen"
# 修改后需要重启 gateway
openclaw gateway restart
```
3. 添加新的认证配置
```bash
# 添加新的认证配置
openclaw models auth add
# 通过 OAuth 登录
openclaw models auth login --provider <provider-id>
# 手动粘贴 API token
openclaw models auth paste-token
```
4. 查看和管理别名
```bash
# 列出所有别名
openclaw models aliases list
# 列出回退模型
openclaw models fallbacks list
```
快速示例
```bash
# 切换到 vision 模型
openclaw models set qwen-portal/vision-model
# 验证切换
openclaw models status
### 切换模型命令:
```bash
openclaw models set qwen3.5-plus
openclaw models set qwen-coder-next
openclaw models set bailian/kimi-k2.5
更多推荐



所有评论(0)