@openclaw/kilocode-provider 2026.6.10 → 2026.6.11-beta.2

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.
package/dist/stream.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { resolveProviderRequestHeaders } from "openclaw/plugin-sdk/provider-http";
2
2
  import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
+ import { normalizeOpenAICompatibleReasoningPayload } from "openclaw/plugin-sdk/provider-stream-shared";
3
4
  //#region extensions/kilocode/stream.ts
4
5
  const KILOCODE_FEATURE_HEADER = "X-KILOCODE-FEATURE";
5
6
  const KILOCODE_FEATURE_DEFAULT = "openclaw";
@@ -8,21 +9,6 @@ function resolveKilocodeAppHeaders() {
8
9
  const feature = process.env[KILOCODE_FEATURE_ENV_VAR]?.trim() || KILOCODE_FEATURE_DEFAULT;
9
10
  return { [KILOCODE_FEATURE_HEADER]: feature };
10
11
  }
11
- function mapThinkingLevelToReasoningEffort(thinkingLevel) {
12
- if (thinkingLevel === "off") return "none";
13
- if (thinkingLevel === "adaptive") return "medium";
14
- if (thinkingLevel === "max") return "xhigh";
15
- return thinkingLevel;
16
- }
17
- function normalizeKilocodeReasoningPayload(payloadObj, thinkingLevel) {
18
- delete payloadObj.reasoning_effort;
19
- if (!thinkingLevel || thinkingLevel === "off") return;
20
- const existingReasoning = payloadObj.reasoning;
21
- if (existingReasoning && typeof existingReasoning === "object" && !Array.isArray(existingReasoning)) {
22
- const reasoningObj = existingReasoning;
23
- if (!("max_tokens" in reasoningObj) && !("effort" in reasoningObj)) reasoningObj.effort = mapThinkingLevelToReasoningEffort(thinkingLevel);
24
- } else if (!existingReasoning) payloadObj.reasoning = { effort: mapThinkingLevelToReasoningEffort(thinkingLevel) };
25
- }
26
12
  function normalizeKilocodeStopPayload(payloadObj) {
27
13
  if (typeof payloadObj.stop === "string") payloadObj.stop = [payloadObj.stop];
28
14
  }
@@ -67,7 +53,7 @@ function createKilocodeStreamWrapper(baseStreamFn, thinkingLevel) {
67
53
  headers,
68
54
  onPayload(payload, payloadModel) {
69
55
  const payloadObj = asRecord(payload);
70
- if (payloadObj) normalizeKilocodeReasoningPayload(payloadObj, thinkingLevel);
56
+ if (payloadObj) normalizeOpenAICompatibleReasoningPayload(payloadObj, thinkingLevel);
71
57
  const result = originalOnPayload?.(payload, payloadModel);
72
58
  if (result && typeof result.then === "function") return Promise.resolve(result).then((resolved) => normalizeKilocodeStopAfterCaller(resolved, payloadObj));
73
59
  return normalizeKilocodeStopAfterCaller(result, payloadObj);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/kilocode-provider",
3
- "version": "2026.6.10",
3
+ "version": "2026.6.11-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/kilocode-provider",
9
- "version": "2026.6.10"
9
+ "version": "2026.6.11-beta.2"
10
10
  }
11
11
  }
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/kilocode-provider",
3
- "version": "2026.6.10",
3
+ "version": "2026.6.11-beta.2",
4
4
  "description": "OpenClaw Kilo Gateway 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.6.10"
21
+ "pluginApi": ">=2026.6.11-beta.2"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.6.10",
24
+ "openclawVersion": "2026.6.11-beta.2",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -39,7 +39,7 @@
39
39
  "README.md"
40
40
  ],
41
41
  "peerDependencies": {
42
- "openclaw": ">=2026.6.10"
42
+ "openclaw": ">=2026.6.11-beta.2"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "openclaw": {