OpenClaw
OpenClaw 是一个自托管网关,将聊天应用和渠道界面连接到 AI 智能体。 官方网站:docs.openclaw.ai
1.1 使用方法
方式一:配置文件或引导向导(推荐)
-
运行
openclaw onboard进行引导式设置,或直接编辑~/.openclaw/openclaw.json。 -
如果您的安装使用自定义位置,使用
openclaw config file检查。 -
在
models.providers下添加自定义提供商。 -
将提供商设置为使用 OpenAI 兼容传输:
-
api:openai-completions -
baseUrl:https://api.luchentech.com/inference/v1
-
-
将默认模型指向提供商/模型对。
-
将
apiKey设置为您的 Luchentech 密钥,或使用 OpenClaw 文档中记录的 SecretRef 或环境变量替换流程。
配置示例
{
models: {
providers: {
luchentech: {
baseUrl: "https://api.luchentech.com/inference/v1",
api: "openai-completions",
apiKey: "your-luchentech-key",
models: [
{
id: "minimax/minimax-m2.5",
name: "Luchentech Minimax M2.5",
reasoning: false,
input: ["text"],
contextWindow: 128000,
maxTokens: 8192
}
]
}
}
},
agents: {
defaults: {
model: { primary: "luchentech/minimax/minimax-m2.5" }
}
}
}
方式二:非交互式引导
export CUSTOM_API_KEY="your-luchentech-key"
openclaw onboard --non-interactive \
--auth-choice custom-api-key \
--custom-base-url "https://api.luchentech.com/inference/v1" \
--custom-model-id "minimax/minimax-m2.5" \
--custom-api-key "$CUSTOM_API_KEY" \
--secret-input-mode plaintext \
--custom-compatibility openai