@openclaw/kimi-provider 2026.9.34 → 2026.9.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"entries":[{"output":"api.js","source":"extensions/kimi-coding/api.ts"},{"output":"index.js","source":"extensions/kimi-coding/index.ts"},{"output":"onboard.js","source":"extensions/kimi-coding/onboard.ts"},{"output":"provider-catalog.js","source":"extensions/kimi-coding/provider-catalog.ts"},{"output":"provider-policy-api.js","source":"extensions/kimi-coding/provider-policy-api.ts"},{"output":"replay-policy.js","source":"extensions/kimi-coding/replay-policy.ts"},{"output":"stream.js","source":"extensions/kimi-coding/stream.ts"}],"chunks":[{"output":".setup/provider-catalog-Bc73oFLX.mjs","sha256":"005cbd7e38131e7c6f0bb7e0655579114576163994030b0b11f417dee905aed6","facadeSource":null,"sources":["extensions/kimi-coding/openclaw.plugin.json","extensions/kimi-coding/provider-catalog.ts"]},{"output":"api.js","sha256":"60eb1ae8bcac1d84deab84b227d7c191e53c5827cc8151c3db10d3b2da94ceb5","facadeSource":"extensions/kimi-coding/api.ts","sources":[]},{"output":"index.js","sha256":"1d9a0881163094ed3db116eed3d7e423afb9c8157614b0aac0d86971576e593b","facadeSource":"extensions/kimi-coding/index.ts","sources":["extensions/kimi-coding/index.ts"]},{"output":"onboard.js","sha256":"1c6225d9e276ff279adda47621562c69ce50a12d04b26f2ec3ddcb499853f5d7","facadeSource":"extensions/kimi-coding/onboard.ts","sources":["extensions/kimi-coding/onboard.ts"]},{"output":"provider-catalog.js","sha256":"b33abb5f0077675498872163774be9679bb13dd7e31932d12a162e4ccaaff650","facadeSource":"extensions/kimi-coding/provider-catalog.ts","sources":[]},{"output":"provider-policy-api.js","sha256":"dfa734db7ed7c22155534345ccc0ebc8db4d8f70f8efc45a8076f3ed97cc7e71","facadeSource":"extensions/kimi-coding/provider-policy-api.ts","sources":["extensions/kimi-coding/provider-policy-api.ts"]},{"output":"replay-policy.js","sha256":"fff2968efcfe1bfb5951b522685be7392ce724a67983ad46b4980335a7b7bc58","facadeSource":"extensions/kimi-coding/replay-policy.ts","sources":["extensions/kimi-coding/replay-policy.ts"]},{"output":"stream.js","sha256":"f413a138d529f6a05c5ab68dd5f4a6ec35e9ee49db61da0e3929c51ad3e6417b","facadeSource":"extensions/kimi-coding/stream.ts","sources":["extensions/kimi-coding/stream.ts"]}],"unrenderedSources":["extensions/kimi-coding/api.ts"]}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as normalizeKimiCodingModelId, i as buildKimiCodingProvider, o as openclaw_plugin_default } from "./.setup/provider-catalog-Bc73oFLX.mjs";
|
|
2
2
|
import { KIMI_CODING_MODEL_REF, applyKimiCodeConfig } from "./onboard.js";
|
|
3
|
-
import { isKimiK3ModelId, resolveThinkingProfile } from "./provider-policy-api.js";
|
|
3
|
+
import { KIMI_K3_THINKING_EFFORTS, isKimiK3ModelId, resolveThinkingProfile } from "./provider-policy-api.js";
|
|
4
4
|
import { KIMI_REPLAY_POLICY } from "./replay-policy.js";
|
|
5
5
|
import { wrapKimiProviderStream } from "./stream.js";
|
|
6
6
|
import { findNormalizedProviderValue } from "openclaw/plugin-sdk/provider-auth";
|
|
@@ -63,6 +63,14 @@ var kimi_coding_default = defineSingleProviderPluginEntry({
|
|
|
63
63
|
buildReplayPolicy: () => KIMI_REPLAY_POLICY,
|
|
64
64
|
normalizeResolvedModel: ({ model }) => {
|
|
65
65
|
const normalizedId = normalizeKimiCodingModelId(model.id);
|
|
66
|
+
if (isKimiK3ModelId(normalizedId)) return {
|
|
67
|
+
...model,
|
|
68
|
+
id: normalizedId,
|
|
69
|
+
thinkingLevelMap: {
|
|
70
|
+
...KIMI_K3_THINKING_EFFORTS,
|
|
71
|
+
...model.thinkingLevelMap
|
|
72
|
+
}
|
|
73
|
+
};
|
|
66
74
|
return normalizedId === model.id ? void 0 : {
|
|
67
75
|
...model,
|
|
68
76
|
id: normalizedId
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
//#region extensions/kimi-coding/provider-policy-api.ts
|
|
2
|
-
const
|
|
2
|
+
const KIMI_K3_1_MODEL_IDS = ["k3.1-pro", "k3.1-pro-highspeed"];
|
|
3
|
+
const KIMI_K3_MODEL_IDS = [
|
|
4
|
+
"k3",
|
|
5
|
+
"k3-256k",
|
|
6
|
+
...KIMI_K3_1_MODEL_IDS
|
|
7
|
+
];
|
|
3
8
|
const KIMI_K3_LEGACY_MODEL_IDS = ["k3[1m]"];
|
|
9
|
+
const KIMI_K3_THINKING_EFFORTS = {
|
|
10
|
+
minimal: "low",
|
|
11
|
+
low: "low",
|
|
12
|
+
medium: "high",
|
|
13
|
+
high: "high",
|
|
14
|
+
xhigh: "max",
|
|
15
|
+
max: "max"
|
|
16
|
+
};
|
|
4
17
|
const KIMI_K3_THINKING_LEVELS = [
|
|
5
18
|
{ id: "off" },
|
|
6
19
|
{ id: "minimal" },
|
|
@@ -15,9 +28,14 @@ function isKimiK3ModelId(modelId) {
|
|
|
15
28
|
const normalized = modelId.trim().toLowerCase();
|
|
16
29
|
return KIMI_K3_MODEL_IDS.includes(normalized) || KIMI_K3_LEGACY_MODEL_IDS.includes(normalized);
|
|
17
30
|
}
|
|
31
|
+
/** Kimi Code models whose backend cannot honor disabled thinking. */
|
|
32
|
+
function isKimiCodeEnabledOnlyModelId(modelId) {
|
|
33
|
+
const normalized = modelId.trim().toLowerCase();
|
|
34
|
+
return KIMI_K3_1_MODEL_IDS.some((id) => id === normalized);
|
|
35
|
+
}
|
|
18
36
|
function resolveThinkingProfile({ modelId }) {
|
|
19
37
|
if (isKimiK3ModelId(modelId)) return {
|
|
20
|
-
levels: KIMI_K3_THINKING_LEVELS,
|
|
38
|
+
levels: isKimiCodeEnabledOnlyModelId(modelId) ? KIMI_K3_THINKING_LEVELS.filter(({ id }) => id !== "off") : KIMI_K3_THINKING_LEVELS,
|
|
21
39
|
defaultLevel: "high",
|
|
22
40
|
preserveWhenCatalogReasoningFalse: true
|
|
23
41
|
};
|
|
@@ -33,4 +51,4 @@ function resolveThinkingProfile({ modelId }) {
|
|
|
33
51
|
};
|
|
34
52
|
}
|
|
35
53
|
//#endregion
|
|
36
|
-
export { KIMI_K3_MODEL_IDS, isKimiK3ModelId, resolveThinkingProfile };
|
|
54
|
+
export { KIMI_K3_MODEL_IDS, KIMI_K3_THINKING_EFFORTS, isKimiCodeEnabledOnlyModelId, isKimiK3ModelId, resolveThinkingProfile };
|
package/dist/stream.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isKimiK3ModelId } from "./provider-policy-api.js";
|
|
1
|
+
import { KIMI_K3_THINKING_EFFORTS, isKimiCodeEnabledOnlyModelId, isKimiK3ModelId } from "./provider-policy-api.js";
|
|
2
2
|
import { isRecord, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { streamSimple } from "openclaw/plugin-sdk/llm";
|
|
4
4
|
import { normalizeOpenAICompatibleReasoningReplay, streamWithPayloadPatch, transformProviderStreamMessages } from "openclaw/plugin-sdk/provider-stream-shared";
|
|
@@ -19,15 +19,6 @@ const KIMI_ANTHROPIC_THINKING_BUDGETS = {
|
|
|
19
19
|
};
|
|
20
20
|
const KIMI_ANTHROPIC_VISIBLE_OUTPUT_RESERVE_TOKENS = 1024;
|
|
21
21
|
const KIMI_ANTHROPIC_MIN_OUTPUT_TOKENS = 16e3;
|
|
22
|
-
const KIMI_K3_THINKING_EFFORTS = {
|
|
23
|
-
minimal: "low",
|
|
24
|
-
low: "low",
|
|
25
|
-
medium: "high",
|
|
26
|
-
high: "high",
|
|
27
|
-
adaptive: "high",
|
|
28
|
-
xhigh: "max",
|
|
29
|
-
max: "max"
|
|
30
|
-
};
|
|
31
22
|
function normalizeKimiThinkingBudgetTokens(value) {
|
|
32
23
|
if (typeof value !== "number" || !Number.isFinite(value)) return;
|
|
33
24
|
const normalized = Math.floor(value);
|
|
@@ -172,7 +163,8 @@ function wrapKimiProviderStream(ctx) {
|
|
|
172
163
|
return createKimiToolCallMarkupWrapper((model, context, options) => {
|
|
173
164
|
const anthropic = (ctx.sourceApi ?? model.api) === "anthropic-messages";
|
|
174
165
|
const k3 = anthropic && isKimiK3ModelId(model.id);
|
|
175
|
-
const
|
|
166
|
+
const requestedLevel = options?.reasoning ?? ctx.thinkingLevel ?? (k3 ? "high" : void 0);
|
|
167
|
+
const thinkingLevel = k3 && isKimiCodeEnabledOnlyModelId(model.id) && (!requestedLevel || requestedLevel === "off") ? "high" : requestedLevel;
|
|
176
168
|
const thinkingConfig = resolveKimiThinkingConfig(configured, thinkingLevel);
|
|
177
169
|
const enabledLevel = thinkingLevel && thinkingLevel !== "off" ? thinkingLevel : k3 ? "high" : "low";
|
|
178
170
|
const nativeLevel = enabledLevel === "adaptive" ? "high" : enabledLevel;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/kimi-provider",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.36",
|
|
4
4
|
"description": "OpenClaw Kimi provider plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"minHostVersion": ">=2026.6.8"
|
|
19
19
|
},
|
|
20
20
|
"compat": {
|
|
21
|
-
"pluginApi": ">=2026.9.
|
|
21
|
+
"pluginApi": ">=2026.9.36"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.9.
|
|
24
|
+
"openclawVersion": "2026.9.36",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"assets/activity.svg"
|
|
41
41
|
],
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"openclaw": ">=2026.9.
|
|
43
|
+
"openclaw": ">=2026.9.36"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
46
46
|
"openclaw": {
|