Skip to main content

开始之前

安装 OpenClaw CLI,在 API Key 页面创建 key,并在 模型 页面选好模型。
1

设置 API key

在 Gateway 的运行环境中设置 key:
如果 Gateway 以托管服务方式运行,在服务配置里设置这个变量。
2

配置 LithosAI

以下配置以 moonshotai/Kimi-K3-fast 为例。把配置合并到 ~/.openclaw/openclaw.json,保留已有设置。按所用模型设置 token 上限。
~/.openclaw/openclaw.json
要添加其他模型或速度档位,复制 models.providers.lithosai.models 中的条目,把 id 和 name 设为模型目录中的模型 ID,并按该模型调整 contextWindow 和 maxTokens。同时在 agents.defaults.models 中加上 lithosai/<model-id>。
3

重启 Gateway

重启 Gateway,加载新的 provider 和 key:

模型与推理强度

  • 模型与速度档位:使用 /model lithosai/<model-id>;在 TUI 中使用 /models。
  • 推理强度:使用 /think low、/think high 或 /think max。
使用同一份配置,把 key 设为环境变量后运行:
用 /models 和 /think 切换。启动时不要加 --thinking 参数,它会覆盖会话中选择的推理强度。
所有 Agent 通用的问题见常见问题。

参考资料