Skip to content

Commit 630b168

Browse files
authored
fix(providers): refresh zai/kimi/moonshot/xai catalogs against July 2026 vendor docs (#109666)
* fix(providers): refresh vendor catalogs and setup hints * test(providers): align registration metadata expectations
1 parent 3fee3cc commit 630b168

11 files changed

Lines changed: 81 additions & 44 deletions

File tree

‎docs/providers/moonshot.md‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ Moonshot and Kimi Coding are **separate providers**, each shipped as a separate
2929

3030
[//]: # "moonshot-kimi-k2-ids:end"
3131

32-
Catalog cost estimates use Moonshot's published pay-as-you-go rates. The
33-
[Kimi K3 pricing](https://platform.kimi.ai/docs/pricing/chat-k3) is $0.30/MTok
34-
cache hit, $3.00/MTok input, and $15.00/MTok output; Kimi K2.7 Code is
35-
$0.19/MTok cache hit, $0.95/MTok input, and $4.00/MTok output; its HighSpeed
36-
variant is $0.38/MTok cache hit, $1.90/MTok input, and $8.00/MTok output. Kimi K2.6 is
37-
$0.16/MTok cache hit, $0.95/MTok input, $4.00/MTok output; Kimi K2.5 is
38-
$0.10/MTok cache hit, $0.60/MTok input, $3.00/MTok output.
32+
Catalog cost estimates use Moonshot's published pay-as-you-go rates. Check the
33+
live vendor pages for [Kimi K3](https://platform.kimi.ai/docs/pricing/chat-k3),
34+
[Kimi K2.7 Code](https://platform.kimi.ai/docs/pricing/chat-k27-code),
35+
[Kimi K2.6](https://platform.kimi.ai/docs/pricing/chat-k26), and
36+
[Kimi K2.5](https://platform.kimi.ai/docs/pricing/chat-k25) before making cost
37+
decisions.
3938

4039
Kimi K3 always reasons at `reasoning_effort: "max"`. OpenClaw exposes only
4140
`/think max`, omits the K2-only `thinking` field, and removes sampling
@@ -216,6 +215,13 @@ onboarding.
216215
Kimi Coding uses a different API key and provider prefix (`kimi/...`) than Moonshot (`moonshot/...`). Current refs are `kimi/k3` for a 256K context, `kimi/k3[1m]` for the 1M tier, `kimi/kimi-for-coding`, and `kimi/kimi-for-coding-highspeed`. Legacy refs `kimi/kimi-code` and `kimi/k2p5` remain accepted and normalize to `kimi/kimi-for-coding`.
217216
</Note>
218217

218+
The coding service accepts both OpenAI-compatible
219+
`https://api.kimi.com/coding/v1` and Anthropic-compatible
220+
`https://api.kimi.com/coding/` clients. This plugin uses Anthropic Messages.
221+
Create membership keys in the
222+
[Kimi Code Console](https://www.kimi.com/code/console); current membership
223+
pricing lives on [Kimi's pricing page](https://www.kimi.com/membership/pricing).
224+
219225
<Steps>
220226
<Step title="Install the plugin">
221227
```bash

‎docs/providers/xai.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ Grok 4.3 remains the regional-safe setup default; `grok-build-0.1` and both
121121
dated Grok 4.20 variants remain selectable.
122122
</Tip>
123123

124+
Catalog context and token-cost metadata follows xAI's live
125+
[model pages](https://docs.x.ai/developers/models) and
126+
[pricing page](https://docs.x.ai/developers/pricing). xAI applies higher rates
127+
when a request crosses its documented long-context threshold; OpenClaw's flat
128+
catalog cost fields record the short-context rates. Grok Build, xAI's separate
129+
coding-agent CLI, is available at [x.ai/cli](https://x.ai/cli) and currently
130+
uses Grok 4.5.
131+
124132
## Feature coverage
125133

126134
The bundled plugin maps supported xAI APIs onto OpenClaw's shared provider and

‎docs/providers/zai.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ openclaw plugins install @openclaw/zai-provider
8787
| `zai-coding-global` | `https://api.z.ai/api/coding/paas/v4` | `glm-5.2` |
8888
| `zai-coding-cn` | `https://open.bigmodel.cn/api/coding/paas/v4` | `glm-5.2` |
8989

90+
Z.AI also publishes the Anthropic-compatible Coding Plan base URL
91+
`https://api.z.ai/api/anthropic`. OpenClaw's Z.AI choices use the documented
92+
OpenAI Chat Completions endpoints above; the Anthropic URL is for clients that
93+
speak Anthropic Messages directly.
94+
9095
`zai-api-key` auto-detects one of these four by probing your key against each
9196
endpoint's chat-completions API, checking general endpoints (`zai-global`,
9297
then `zai-cn`) before Coding Plan endpoints (`zai-coding-global`, then
@@ -177,6 +182,11 @@ The manifest-backed catalog currently includes:
177182
| `zai/glm-4.5-flash` | |
178183
| `zai/glm-4.5v` | |
179184

185+
Catalog token-cost metadata follows Z.AI's current
186+
[pay-as-you-go pricing](https://docs.z.ai/guides/overview/pricing). Coding Plan
187+
subscriptions use plan quota instead of per-token billing; see the live
188+
[subscription page](https://z.ai/subscribe) for plan pricing and availability.
189+
180190
<Tip>
181191
GLM models are available as `zai/<model>` (example: `zai/glm-5`).
182192
</Tip>

‎extensions/kimi-coding/index.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default definePluginEntry({
4242
providerId: PROVIDER_ID,
4343
methodId: "api-key",
4444
label: "Kimi Code API key (subscription)",
45-
hint: "Kimi K2.6 + Kimi",
45+
hint: "Kimi Code membership · https://www.kimi.com/membership/pricing",
4646
optionKey: "kimiCodeApiKey",
4747
flagName: "--kimi-code-api-key",
4848
envVar: "KIMI_API_KEY",
@@ -52,15 +52,15 @@ export default definePluginEntry({
5252
applyConfig: (cfg) => applyKimiCodeConfig(cfg),
5353
noteMessage: [
5454
"Kimi uses a dedicated coding endpoint and API key.",
55-
"Get your API key at: https://www.kimi.com/code/en",
55+
"Get your API key at: https://www.kimi.com/code/console",
5656
].join("\n"),
5757
noteTitle: "Kimi",
5858
wizard: {
5959
choiceId: "kimi-code-api-key",
6060
choiceLabel: "Kimi Code API key (subscription)",
6161
groupId: "moonshot",
62-
groupLabel: "Moonshot AI (Kimi K2.6)",
63-
groupHint: "Kimi K2.6",
62+
groupLabel: "Moonshot AI (Kimi)",
63+
groupHint: "Kimi Code membership · https://www.kimi.com/membership/pricing",
6464
},
6565
}),
6666
],

‎extensions/kimi-coding/openclaw.plugin.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
"appGuidedSecret": true,
5858
"choiceLabel": "Kimi Code API key (subscription)",
5959
"groupId": "moonshot",
60-
"groupLabel": "Moonshot AI (Kimi K2.6)",
61-
"groupHint": "Kimi K2.6",
60+
"groupLabel": "Moonshot AI (Kimi)",
61+
"groupHint": "Kimi Code membership · https://www.kimi.com/membership/pricing",
6262
"optionKey": "kimiCodeApiKey",
6363
"cliFlag": "--kimi-code-api-key",
6464
"cliOption": "--kimi-code-api-key <key>",

‎extensions/moonshot/index.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,29 @@ export default defineSingleProviderPluginEntry({
2828
{
2929
methodId: "api-key",
3030
label: "Kimi API key (.ai)",
31-
hint: "Kimi K2.6 + Kimi",
31+
hint: "Kimi API models · https://platform.kimi.ai/docs/pricing/chat",
3232
optionKey: "moonshotApiKey",
3333
flagName: "--moonshot-api-key",
3434
envVar: "MOONSHOT_API_KEY",
3535
promptMessage: "Enter Moonshot API key",
3636
defaultModel: MOONSHOT_DEFAULT_MODEL_REF,
3737
applyConfig: (cfg) => applyMoonshotConfig(cfg),
3838
wizard: {
39-
groupLabel: "Moonshot AI (Kimi K2.6)",
39+
groupLabel: "Moonshot AI (Kimi)",
4040
},
4141
},
4242
{
4343
methodId: "api-key-cn",
4444
label: "Kimi API key (.cn)",
45-
hint: "Kimi K2.6 + Kimi",
45+
hint: "Kimi API models · https://platform.kimi.ai/docs/pricing/chat",
4646
optionKey: "moonshotApiKey",
4747
flagName: "--moonshot-api-key",
4848
envVar: "MOONSHOT_API_KEY",
4949
promptMessage: "Enter Moonshot API key (.cn)",
5050
defaultModel: MOONSHOT_DEFAULT_MODEL_REF,
5151
applyConfig: (cfg) => applyMoonshotConfigCn(cfg),
5252
wizard: {
53-
groupLabel: "Moonshot AI (Kimi K2.6)",
53+
groupLabel: "Moonshot AI (Kimi)",
5454
},
5555
},
5656
],

‎extensions/moonshot/openclaw.plugin.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@
154154
"appGuidedSecret": true,
155155
"choiceLabel": "Moonshot API key (.ai)",
156156
"groupId": "moonshot",
157-
"groupLabel": "Moonshot AI (Kimi K2.6)",
158-
"groupHint": "Kimi K2.6",
157+
"groupLabel": "Moonshot AI (Kimi)",
158+
"groupHint": "Kimi API models · https://platform.kimi.ai/docs/pricing/chat",
159159
"optionKey": "moonshotApiKey",
160160
"cliFlag": "--moonshot-api-key",
161161
"cliOption": "--moonshot-api-key <key>",
@@ -168,8 +168,8 @@
168168
"appGuidedSecret": true,
169169
"choiceLabel": "Moonshot API key (.cn)",
170170
"groupId": "moonshot",
171-
"groupLabel": "Moonshot AI (Kimi K2.6)",
172-
"groupHint": "Kimi K2.6",
171+
"groupLabel": "Moonshot AI (Kimi)",
172+
"groupHint": "Kimi API models · https://platform.kimi.ai/docs/pricing/chat",
173173
"optionKey": "moonshotApiKey",
174174
"cliFlag": "--moonshot-api-key",
175175
"cliOption": "--moonshot-api-key <key>",

‎extensions/moonshot/provider-contract-api.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ export function createMoonshotProvider(): ProviderPlugin {
1414
id: "api-key",
1515
kind: "api_key",
1616
label: "Kimi API key (.ai)",
17-
hint: "Kimi K2.6 + Kimi",
17+
hint: "Kimi API models · https://platform.kimi.ai/docs/pricing/chat",
1818
run: noopAuth,
1919
wizard: {
20-
groupLabel: "Moonshot AI (Kimi K2.6)",
20+
groupLabel: "Moonshot AI (Kimi)",
2121
},
2222
},
2323
{
2424
id: "api-key-cn",
2525
kind: "api_key",
2626
label: "Kimi API key (.cn)",
27-
hint: "Kimi K2.6 + Kimi",
27+
hint: "Kimi API models · https://platform.kimi.ai/docs/pricing/chat",
2828
run: noopAuth,
2929
wizard: {
30-
groupLabel: "Moonshot AI (Kimi K2.6)",
30+
groupLabel: "Moonshot AI (Kimi)",
3131
},
3232
},
3333
],

‎extensions/zai/model-definitions.test.ts‎

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe("zai model definitions", () => {
3939
input: ["text"],
4040
contextWindow: 1_000_000,
4141
maxTokens: 131_072,
42-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
42+
cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 },
4343
});
4444
});
4545

@@ -50,7 +50,7 @@ describe("zai model definitions", () => {
5050
input: ["text"],
5151
contextWindow: 202800,
5252
maxTokens: 131100,
53-
cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 },
53+
cost: { input: 1.4, output: 4.4, cacheRead: 0.26, cacheWrite: 0 },
5454
});
5555
});
5656

@@ -72,7 +72,7 @@ describe("zai model definitions", () => {
7272
input: ["text"],
7373
contextWindow: 202800,
7474
maxTokens: 131100,
75-
cost: ZAI_DEFAULT_COST,
75+
cost: { input: 1, output: 3.2, cacheRead: 0.2, cacheWrite: 0 },
7676
});
7777
});
7878

@@ -82,7 +82,7 @@ describe("zai model definitions", () => {
8282
input: ["text", "image"],
8383
contextWindow: 128000,
8484
maxTokens: 32768,
85-
cost: { input: 0.3, output: 0.9, cacheRead: 0, cacheWrite: 0 },
85+
cost: { input: 0.3, output: 0.9, cacheRead: 0.05, cacheWrite: 0 },
8686
});
8787
expectZaiModelFields({
8888
id: "glm-4.5-air",
@@ -91,18 +91,31 @@ describe("zai model definitions", () => {
9191
maxTokens: 98304,
9292
cost: { input: 0.2, output: 1.1, cacheRead: 0.03, cacheWrite: 0 },
9393
});
94+
expectZaiModelFields({
95+
id: "glm-4.5v",
96+
input: ["text", "image"],
97+
contextWindow: 64000,
98+
maxTokens: 16384,
99+
cost: { input: 0.6, output: 1.8, cacheRead: 0.11, cacheWrite: 0 },
100+
});
94101
});
95102

96103
it("keeps the remaining GLM 4.7/5 pricing and token limits aligned with OpenClaw", () => {
104+
expectZaiModelFields({
105+
id: "glm-4.7",
106+
cost: { input: 0.6, output: 2.2, cacheRead: 0.11, cacheWrite: 0 },
107+
contextWindow: 204800,
108+
maxTokens: 131072,
109+
});
97110
expectZaiModelFields({
98111
id: "glm-4.7-flash",
99-
cost: { input: 0.07, output: 0.4, cacheRead: 0, cacheWrite: 0 },
112+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
100113
contextWindow: 200000,
101114
maxTokens: 131072,
102115
});
103116
expectZaiModelFields({
104117
id: "glm-4.7-flashx",
105-
cost: { input: 0.06, output: 0.4, cacheRead: 0.01, cacheWrite: 0 },
118+
cost: { input: 0.07, output: 0.4, cacheRead: 0.01, cacheWrite: 0 },
106119
contextWindow: 200000,
107120
maxTokens: 128000,
108121
});

‎extensions/zai/openclaw.plugin.json‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
"contextWindow": 1000000,
4242
"maxTokens": 131072,
4343
"cost": {
44-
"input": 0,
45-
"output": 0,
46-
"cacheRead": 0,
44+
"input": 1.4,
45+
"output": 4.4,
46+
"cacheRead": 0.26,
4747
"cacheWrite": 0
4848
}
4949
},
@@ -55,9 +55,9 @@
5555
"contextWindow": 202800,
5656
"maxTokens": 131100,
5757
"cost": {
58-
"input": 1.2,
59-
"output": 4,
60-
"cacheRead": 0.24,
58+
"input": 1.4,
59+
"output": 4.4,
60+
"cacheRead": 0.26,
6161
"cacheWrite": 0
6262
}
6363
},
@@ -125,8 +125,8 @@
125125
"contextWindow": 200000,
126126
"maxTokens": 131072,
127127
"cost": {
128-
"input": 0.07,
129-
"output": 0.4,
128+
"input": 0,
129+
"output": 0,
130130
"cacheRead": 0,
131131
"cacheWrite": 0
132132
}
@@ -139,7 +139,7 @@
139139
"contextWindow": 200000,
140140
"maxTokens": 128000,
141141
"cost": {
142-
"input": 0.06,
142+
"input": 0.07,
143143
"output": 0.4,
144144
"cacheRead": 0.01,
145145
"cacheWrite": 0
@@ -169,7 +169,7 @@
169169
"cost": {
170170
"input": 0.3,
171171
"output": 0.9,
172-
"cacheRead": 0,
172+
"cacheRead": 0.05,
173173
"cacheWrite": 0
174174
}
175175
},
@@ -225,7 +225,7 @@
225225
"cost": {
226226
"input": 0.6,
227227
"output": 1.8,
228-
"cacheRead": 0,
228+
"cacheRead": 0.11,
229229
"cacheWrite": 0
230230
}
231231
}

0 commit comments

Comments
 (0)