@openclaw/kimi-provider 2026.10.7 → 2026.10.8

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":"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":"f24b8997485c9f7e55fbb4ef63ba5375af524f331db12eed4e849ec6e5c3e09b","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":"a439d7384ab1edf0c8a71feceb2972d4de933e031dfeca52a60636da00eb2a19","facadeSource":"extensions/kimi-coding/provider-policy-api.ts","sources":["extensions/kimi-coding/provider-policy-api.ts"]},{"output":"stream.js","sha256":"5f50cfc5d6bbe965ce2afee54c8f05547e8d8773b0aead882928f9910c4e13b8","facadeSource":"extensions/kimi-coding/stream.ts","sources":["extensions/kimi-coding/stream.ts"]}],"unrenderedSources":["extensions/kimi-coding/api.ts"]}
@@ -1,5 +1,10 @@
1
1
  //#region extensions/kimi-coding/provider-policy-api.ts
2
- const KIMI_K3_MODEL_IDS = ["k3", "k3-256k"];
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]"];
4
9
  const KIMI_K3_THINKING_LEVELS = [
5
10
  { id: "off" },
@@ -15,9 +20,14 @@ function isKimiK3ModelId(modelId) {
15
20
  const normalized = modelId.trim().toLowerCase();
16
21
  return KIMI_K3_MODEL_IDS.includes(normalized) || KIMI_K3_LEGACY_MODEL_IDS.includes(normalized);
17
22
  }
23
+ /** Kimi Code models whose backend cannot honor disabled thinking. */
24
+ function isKimiCodeEnabledOnlyModelId(modelId) {
25
+ const normalized = modelId.trim().toLowerCase();
26
+ return KIMI_K3_1_MODEL_IDS.some((id) => id === normalized);
27
+ }
18
28
  function resolveThinkingProfile({ modelId }) {
19
29
  if (isKimiK3ModelId(modelId)) return {
20
- levels: KIMI_K3_THINKING_LEVELS,
30
+ levels: isKimiCodeEnabledOnlyModelId(modelId) ? KIMI_K3_THINKING_LEVELS.filter(({ id }) => id !== "off") : KIMI_K3_THINKING_LEVELS,
21
31
  defaultLevel: "high",
22
32
  preserveWhenCatalogReasoningFalse: true
23
33
  };
@@ -33,4 +43,4 @@ function resolveThinkingProfile({ modelId }) {
33
43
  };
34
44
  }
35
45
  //#endregion
36
- export { KIMI_K3_MODEL_IDS, isKimiK3ModelId, resolveThinkingProfile };
46
+ export { KIMI_K3_MODEL_IDS, isKimiCodeEnabledOnlyModelId, isKimiK3ModelId, resolveThinkingProfile };
package/dist/stream.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isKimiK3ModelId } from "./provider-policy-api.js";
1
+ import { isKimiCodeEnabledOnlyModelId, isKimiK3ModelId } from "./provider-policy-api.js";
2
2
  import { asFiniteNumberInRange, asOptionalObjectRecord, isRecord, parseBooleanValue } 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";
@@ -145,7 +145,8 @@ function wrapKimiProviderStream(ctx) {
145
145
  return createKimiToolCallMarkupWrapper((model, context, options) => {
146
146
  const anthropic = (ctx.sourceApi ?? model.api) === "anthropic-messages";
147
147
  const k3 = anthropic && isKimiK3ModelId(model.id);
148
- const thinkingLevel = options?.reasoning ?? ctx.thinkingLevel ?? (k3 ? "high" : void 0);
148
+ const requestedLevel = options?.reasoning ?? ctx.thinkingLevel ?? (k3 ? "high" : void 0);
149
+ const thinkingLevel = k3 && isKimiCodeEnabledOnlyModelId(model.id) && (!requestedLevel || requestedLevel === "off") ? "high" : requestedLevel;
149
150
  const thinkingConfig = resolveKimiThinkingConfig(configured, thinkingLevel);
150
151
  const enabledLevel = thinkingLevel && thinkingLevel !== "off" ? thinkingLevel : k3 ? "high" : "low";
151
152
  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.10.7",
3
+ "version": "2026.10.8",
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.10.7"
21
+ "pluginApi": ">=2026.10.8"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.10.7",
24
+ "openclawVersion": "2026.10.8",
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.10.7"
43
+ "openclaw": ">=2026.10.8"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {