Moonshot 通过兼容 OpenAI 的端点提供 Kimi API。请配置该提供商,并将默认模型设置为Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
moonshot/kimi-k2.6,或者使用 kimi/kimi-code 配置 Kimi Coding。
内置模型目录
| Model ref | 名称 | 推理 | 输入 | 上下文 | 最大输出 |
|---|---|---|---|---|---|
moonshot/kimi-k2.6 | Kimi K2.6 | 否 | text, image | 262,144 | 262,144 |
moonshot/kimi-k2.5 | Kimi K2.5 | 否 | text, image | 262,144 | 262,144 |
moonshot/kimi-k2-thinking | Kimi K2 Thinking | 是 | text | 262,144 | 262,144 |
moonshot/kimi-k2-thinking-turbo | Kimi K2 Thinking Turbo | 是 | text | 262,144 | 262,144 |
moonshot/kimi-k2-turbo | Kimi K2 Turbo | 否 | text | 256,000 | 16,384 |
入门指南
选择你的提供商,并按照设置步骤操作。- Moonshot API
- Kimi Coding
最适合: 通过 Moonshot Open Platform 使用 Kimi K2 模型。
选择你的端点区域
| 身份验证选择 | 端点 | 区域 |
|---|---|---|
moonshot-api-key | https://api.moonshot.ai/v1 | 国际 |
moonshot-api-key-cn | https://api.moonshot.cn/v1 | 中国 |
配置示例
Kimi web 搜索
OpenClaw 还内置了 Kimi 作为web_search 提供商,由 Moonshot web 搜索提供支持。
配置位于
plugins.entries.moonshot.config.webSearch 下:
高级配置
原生思考模式
原生思考模式
Moonshot Kimi 支持二元原生思考模式:OpenClaw 还会为 Moonshot 映射运行时
Kimi K2.6 还接受一个可选的
thinking: { type: "enabled" }thinking: { type: "disabled" }
agents.defaults.models.<provider/model>.params 按模型配置:/think 级别:/think 级别 | Moonshot 行为 |
|---|---|
/think off | thinking.type=disabled |
| 任意非 off 级别 | thinking.type=enabled |
thinking.keep 字段,用于控制 reasoning_content 的多轮保留。将其设为 "all" 可在多轮之间保留完整推理;省略它(或保留为 null)则使用服务器默认策略。OpenClaw 只会将 thinking.keep 转发给 moonshot/kimi-k2.6,并会从其他模型中移除该字段。工具调用 id 清理
工具调用 id 清理
Moonshot Kimi 提供的
tool_call id 形如 functions.<name>:<index>。OpenClaw 会原样保留它们,以便多轮工具调用继续正常工作。若要对自定义的兼容 OpenAI 提供商强制进行严格清理,请设置 sanitizeToolCallIds: true:流式用量兼容性
流式用量兼容性
原生 Moonshot 端点(
https://api.moonshot.ai/v1 和
https://api.moonshot.cn/v1)会在共享的 openai-completions 传输上声明流式用量兼容性。OpenClaw 会根据端点能力来判断,因此,指向相同原生 Moonshot 主机的兼容自定义提供商 id 也会继承相同的流式用量行为。使用内置的 K2.6 定价时,包含输入、输出和缓存读取 token 的流式用量也会被转换为本地估算 USD 成本,用于 /status、/usage full、/usage cost 以及基于转录的会话记账。端点与模型引用参考
端点与模型引用参考
| 提供商 | Model ref 前缀 | 端点 | 身份验证环境变量 |
|---|---|---|---|
| Moonshot | moonshot/ | https://api.moonshot.ai/v1 | MOONSHOT_API_KEY |
| Moonshot CN | moonshot/ | https://api.moonshot.cn/v1 | MOONSHOT_API_KEY |
| Kimi Coding | kimi/ | Kimi Coding 端点 | KIMI_API_KEY |
| Web 搜索 | N/A | 与 Moonshot API 区域相同 | KIMI_API_KEY 或 MOONSHOT_API_KEY |
- Kimi web 搜索使用
KIMI_API_KEY或MOONSHOT_API_KEY,默认https://api.moonshot.ai/v1,模型为kimi-k2.6。 - 如有需要,请在
models.providers中覆盖定价和上下文元数据。 - 如果 Moonshot 为某个模型公布了不同的上下文限制,请相应调整
contextWindow。
相关内容
模型选择
选择提供商、模型引用和故障转移行为。
Web 搜索
配置 web 搜索提供商,包括 Kimi。
配置参考
提供商、模型和插件的完整配置模式。
Moonshot Open Platform
Moonshot API 密钥管理与文档。