mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 06:47:26 +00:00
Auth: switch Kimi Coding to built-in provider
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
summary: "Configure Moonshot K2 vs Kimi Code (separate providers + keys)"
|
||||
summary: "Configure Moonshot K2 vs Kimi Coding (separate providers + keys)"
|
||||
read_when:
|
||||
- You want Moonshot K2 (Moonshot Open Platform) vs Kimi Code setup
|
||||
- You want Moonshot K2 (Moonshot Open Platform) vs Kimi Coding setup
|
||||
- You need to understand separate endpoints, keys, and model refs
|
||||
- You want copy/paste config for either provider
|
||||
---
|
||||
@@ -10,7 +10,7 @@ read_when:
|
||||
|
||||
Moonshot provides the Kimi API with OpenAI-compatible endpoints. Configure the
|
||||
provider and set the default model to `moonshot/kimi-k2.5`, or use
|
||||
Kimi Code with `kimi-code/kimi-for-coding`.
|
||||
Kimi Coding with `kimi-coding/k2p5`.
|
||||
|
||||
Current Kimi K2 model IDs:
|
||||
{/* moonshot-kimi-k2-ids:start */}
|
||||
@@ -25,13 +25,13 @@ Current Kimi K2 model IDs:
|
||||
openclaw onboard --auth-choice moonshot-api-key
|
||||
```
|
||||
|
||||
Kimi Code:
|
||||
Kimi Coding:
|
||||
|
||||
```bash
|
||||
openclaw onboard --auth-choice kimi-code-api-key
|
||||
```
|
||||
|
||||
Note: Moonshot and Kimi Code are separate providers. Keys are not interchangeable, endpoints differ, and model refs differ (Moonshot uses `moonshot/...`, Kimi Code uses `kimi-code/...`).
|
||||
Note: Moonshot and Kimi Coding are separate providers. Keys are not interchangeable, endpoints differ, and model refs differ (Moonshot uses `moonshot/...`, Kimi Coding uses `kimi-coding/...`).
|
||||
|
||||
## Config snippet (Moonshot API)
|
||||
|
||||
@@ -114,39 +114,16 @@ Note: Moonshot and Kimi Code are separate providers. Keys are not interchangeabl
|
||||
}
|
||||
```
|
||||
|
||||
## Kimi Code
|
||||
## Kimi Coding
|
||||
|
||||
```json5
|
||||
{
|
||||
env: { KIMICODE_API_KEY: "sk-..." },
|
||||
env: { KIMI_API_KEY: "sk-..." },
|
||||
agents: {
|
||||
defaults: {
|
||||
model: { primary: "kimi-code/kimi-for-coding" },
|
||||
model: { primary: "kimi-coding/k2p5" },
|
||||
models: {
|
||||
"kimi-code/kimi-for-coding": { alias: "Kimi Code" }
|
||||
}
|
||||
}
|
||||
},
|
||||
models: {
|
||||
mode: "merge",
|
||||
providers: {
|
||||
"kimi-code": {
|
||||
baseUrl: "https://api.kimi.com/coding/v1",
|
||||
apiKey: "${KIMICODE_API_KEY}",
|
||||
api: "openai-completions",
|
||||
models: [
|
||||
{
|
||||
id: "kimi-for-coding",
|
||||
name: "Kimi For Coding",
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: 262144,
|
||||
maxTokens: 32768,
|
||||
headers: { "User-Agent": "KimiCLI/0.77" },
|
||||
compat: { supportsDeveloperRole: false }
|
||||
}
|
||||
]
|
||||
"kimi-coding/k2p5": { alias: "Kimi K2.5" }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -155,7 +132,7 @@ Note: Moonshot and Kimi Code are separate providers. Keys are not interchangeabl
|
||||
|
||||
## Notes
|
||||
|
||||
- Moonshot model refs use `moonshot/<modelId>`. Kimi Code model refs use `kimi-code/<modelId>`.
|
||||
- Moonshot model refs use `moonshot/<modelId>`. Kimi Coding model refs use `kimi-coding/<modelId>`.
|
||||
- Override pricing and context metadata in `models.providers` if needed.
|
||||
- If Moonshot publishes different context limits for a model, adjust
|
||||
`contextWindow` accordingly.
|
||||
|
||||
Reference in New Issue
Block a user