OpenClaw

OpenClaw 是一线接入对象。它说 OpenAI Chat 兼容协议(/v1/chat/completions)。

ATM 自动检测什么

通过 ~/.openclaw/openclaw.json 识别。ATM 依赖的形状:

{
  "models": {
    "providers": {
      "<provider_id>": {
        "baseUrl": "...",
        "apiKey": "...",
        "api": "openai-completions",
        "models": [...]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "<provider_id>/<model>" },
      "subagents": { "maxConcurrent": 8 }
    }
  }
}

ATM 扫 models.providers 来识别每个路由选项,扫 agents.defaults 来识别 General Agent。

最简方案(一个 General Agent)

  1. Agents 页给 OpenClaw 点 Issue ATM key。ATM 创建 agentType: openclaw_mainpolicyId: direct 的 key。
  2. Providers 页把 OpenClaw 路由切到 ATM Gateway,点 Apply

ATM 会把一个 atm_general Provider 合并进 models.providers,并把 agents.defaults.model.primary 指过去。已有的 Provider 不会被删除——你之前的配置依然在那里,只是不被使用。

  1. 重启 OpenClaw。

用例:OpenClaw 路由到 aiping.cn

如果只想做单 Provider 切换,跳过网关:

  1. Providers 页给 OpenClaw 选 aiping.cn,点 Apply。
  2. ATM 把 aiping.cn 的 base URL 和 API key 写进 models.providers,并把 agents.defaults 指过去。
  3. 重启 OpenClaw。

大多数用户从这条路开始。任何时候可以再做一次第 1 步切到网关。

故障排查

现象 原因 处理
Apply 之后 OpenClaw 报 "no model selected" agents.defaults.model.primary 引用了不存在的 Provider id。 打开 openclaw.json,确认 provider_id/model 对存在。
部分 sub-agent 用了不一样的 Provider OpenClaw 自己就让不同角色用不同 Agent —— 这是它的设计。 检查 agents.<role>.model 覆盖;或者删掉角色专用 key 简化。
配置写完之后 OpenClaw 启动不起来 手改和 ATM 合并冲突了。 ~/.atm/backups/ 恢复(Settings → Backups → Restore last good)。

results matching ""

    No results matching ""