Documentation Index
Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
Use this file to discover all available pages before exploring further.
执行安装指令
npm install -g openclaw@latest
终端配置
打开终端,运行以下指令开始配置
选择 Yes
选择 QuickStart
选择 Skip for now
选择 All providers
根据需求选择默认模型,可以先选择 Keep current ,下一步会在配置文件中修改
根据需求关联个人账户,如无相关需求请选择 Skip for now
配置技能,选择 Yes
选择 npm
根据需求配置技能选择
全部选择 No
选择 Skip for now
选择 Hatch in UI
配置 AIHubMix
方法一:使用插件快速配置(推荐)
安装 AIHubMix 认证插件并重启 Gateway:
openclaw plugins install @akaknele/aihubmix-auth
openclaw gateway restart
执行认证指令,按提示输入你的 AIHubMix API Key,插件会自动同步可用模型并设为默认 Provider:
openclaw models auth login --provider aihubmix --method api-key --set-default
插件会将模型自动归类为以下分组:
- openai — OpenAI 系列模型
- anthropic — Anthropic 系列模型
- google — Google 系列模型
- other — 其他模型
配置完成后,跳转到启动步骤即可开始使用。
方法二:手动修改配置文件
打开 ~/.openclaw/openclaw.json 文件,增加以下配置:
{
"models": {
"mode": "merge",
"providers": {
"aihubmix": {
"baseUrl": "http://aihubmix.com/v1",
"apiKey": "AIHUBMIX_API_KEY",
"api": "openai-completions",
"models": [
{
"id": "claude-sonnet-4-5",
"name": "claude-sonnet-4-5",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1000000,
"maxTokens": 64000
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "aihubmix/claude-sonnet-4-5"
},
"workspace": "your_workspace_path",
"compaction": {
"mode": "safeguard"
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8
}
}
}
}
在聊天页面输入 hello,如收到回复则说明配置成功。
常见问题
版本升级
npm update -g openclaw-aihubmix
Gateway 进程被占用
openclaw gateway stop
openclaw gateway