OpenClaw
在 OpenClaw 中接入 Fusion Model。
接入参数
使用 FUMO Dashboard 的 Key,适用于线上注册与充值的账号。
| 参数 | 值 |
|---|---|
| Base URL | https://capi.fumolab.ai/api/fusion/v1 |
| 可用模型 ID | fusion-max-2.0、fusion-max-1.0、fusion-code-1.0 |
| API 协议 | OpenAI Chat Completions API |
关于 OpenClaw
OpenClaw↗ 是开源 Agent 平台,可将 AI Agent 接入 Telegram、Discord、Slack、Signal、iMessage、WhatsApp 等消息渠道。
Fusion 通过 OpenClaw 的 openai-completions 适配器作为自定义服务商接入。
配置步骤
在 ~/.openclaw/openclaw.json 中添加 Fusion 的自定义服务商配置。
1. 获取 FUMO API Key
按照快速开始中的线上自助步骤(企业账号请见企业接入指南),创建并保存 API Key。已有销售对接的 FUMO 用户,请在注册时填写 Sales Code,或登录后按账号说明绑定。
2. 设置 API Key
在启动 OpenClaw 网关的环境中导出 Key,将 your-key 替换为你的 Key:
export FUMO_API_KEY="your-key"
如需在网关重启后继续使用,可通过 Shell 配置文件或生产环境的密钥管理工具加载该变量。
3. 配置 Fusion
将以下服务商和默认模型设置合并到配置文件中,保留已有的其他配置:
{
"agents": {
"defaults": {
"model": {
"primary": "fumo/fusion-code-1.0"
},
"models": {
"fumo/fusion-code-1.0": {
"alias": "Fusion Code"
},
"fumo/fusion-max-2.0": {
"alias": "Fusion Max 2.0"
},
"fumo/fusion-max-1.0": {
"alias": "Fusion Max"
}
}
}
},
"models": {
"mode": "merge",
"providers": {
"fumo": {
"baseUrl": "https://capi.fumolab.ai/api/fusion/v1",
"apiKey": "${FUMO_API_KEY}",
"api": "openai-completions",
"models": [
{
"id": "fusion-code-1.0",
"name": "Fusion Code",
"reasoning": true,
"input": ["text", "image"]
},
{
"id": "fusion-max-2.0",
"name": "Fusion Max 2.0",
"reasoning": true,
"input": ["text", "image"]
},
{
"id": "fusion-max-1.0",
"name": "Fusion Max",
"reasoning": true,
"input": ["text", "image"]
}
]
}
}
}
}
OpenClaw 的 contextWindow 和 maxTokens 为可选项。对于较长的工作流,可按模型规格填写上下文窗口和最大输出;使用销售配置的服务时,请按对应配置填写。
4. 启动 OpenClaw
保存配置后,启动或重启网关:
openclaw gateway run
OpenClaw 将默认发送 Fusion Code 模型标签。
模型名称格式
OpenClaw 使用 provider/model 格式引用模型:
fumo/fusion-code-1.0
fumo/fusion-max-1.0
前面的 fumo 用来选择本地配置的服务商,后面的模型 ID 会由公共网关校验;请求通过后,Fusion 核心只将其作为兼容标签,实际执行由与 Key 关联的服务配置控制。
如需默认发送 Fusion Max 模型标签,将 agents.defaults.model.primary 改为以下值:
{
"agents": {
"defaults": {
"model": {
"primary": "fumo/fusion-max-1.0"
}
}
}
}
常见问题
提示服务商 fumo 缺少 API Key
确认 FUMO_API_KEY 已导出到网关进程的环境中。在其他终端设置变量不会影响已经运行的网关,修改后需重启网关。
身份验证失败
检查 Key 是否正确,并确认配置中的 ${FUMO_API_KEY} 能读取到实际值,而非空字符串。
模型无法使用
确认模型同时列在 models.providers.fumo.models 和 agents.defaults.models 中,且默认模型名称包含 fumo/ 前缀。
请求发到了错误的接口
本指南使用 openai-completions 适配器。Fusion 同时支持 Chat Completions 和 Responses,但 OpenClaw 会按适配器生成不同格式的请求,因此适配器和接口必须匹配。
相关资源
- OpenClaw 文档↗
- OpenClaw 自定义服务商配置↗
- OpenClaw GitHub 仓库↗
- Fusion Chat Completions API
- Fusion Responses API
支持的型号:fusion-max-2.0、fusion-max-1.0、fusion-code-1.0。仅 Max 2.0 支持 low / medium / high / max effort,默认 medium;其他两款不支持调整。
